Skip to content

CLI reference

sqt compile

Compile the project into canonical SQL, DDL, graph, test, and audit artifacts.

Compile every project resource without connecting to ClickHouse.

sqt compile
sqt compile --project-dir /path/to/project
sqt compile --target-dir /tmp/sqltide-target

The default output root is project-level target/:

target/
manifest.json
sqltide_dag.json
compiled/
models/<pipeline>/<model>.sql
resources/sources/...
resources/models/...
audits/...
tests/...

SQLTide builds the static target in staging and replaces compiled/, manifest.json, and sqltide_dag.json individually with atomic filesystem operations and rollback on publication failure. The three owners are not exposed as one graph-atomic snapshot. Runtime artifacts under target/run/ are preserved. Sensitive Kafka broker userinfo and source settings are redacted. Executable build workflows require connected warehouse state and are not compile artifacts.

OptionPurpose
--project-dir PATHProject root
--target-dir PATHReplace the project target/ root
--target NAMESelect a project target
--vars JSONVariable overrides as one JSON object

compile works in both modes and remains connection-free.