Skip to content

CLI Reference

Commands

Every sqlload command, the options they share, and exit codes.

$ sqlload --help
SQL data loading tooling.
Usage: sqlload [OPTIONS] <COMMAND>
Commands:
debug Validate the configuration and test every connection
plan Show what `apply` and `load` would do (exporter: each topic's table and objects)
tables Print `topic<TAB>table<TAB>stream<TAB>group` per topic (`-` when skipped), without Snowflake
apply Create or change tables (exporter: create missing tables, stages and pipes); never loads data
load Load the selected tables of a loader project
run Export until stopped
status Show per-partition lag and committed offsets
logged-state Inspect or change the run log of `state = "logged"` tables
contract Compare each table's declared columns with its live table, or adopt the live columns into the declarations; exits 1 when they differ
copy Copy one table once, between connections named in sqlload.toml or URIs (sqlload.toml is optional)
help Print this message or the help of the given subcommand(s)
Command Page
plan plan
apply apply
load load
copy copy
contract diff, contract generate contract
debug debug
logged-state logged-state, only for Python tables with state="logged"
run, status, tables run, status and tables, for the Kafka exporter

Every command takes these:

Option Default Meaning
-c, --config <FILE> sqlload.toml, or SQLLOAD_CONFIG The configuration file. Python source paths are relative to its folder.
--log-format <FORMAT> text text or json logs, on standard error.
--no-color off Print without colour. Also when NO_COLOR is set or the output isn’t a terminal.
-h, --help Print help.
-V, --version Print the version.
Code Meaning
0 Everything selected succeeded, or agreed (contract diff, logged-state verify).
1 A table failed or was left out by a plan error, a contract difference or state disagreement was found, or the configuration is invalid.
2 The command line couldn’t be parsed.
130 load --follow got a second Ctrl-C or SIGTERM and stopped at once.

--json doesn’t change the exit code. A declined --reload exits 1. From 0.27.0, apply --json and load --json print their result as JSON; see Results as JSON.