Documentation Index
Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt
Use this file to discover all available pages before exploring further.
sqb build
Compiles, plans, and executes the full build lifecycle including seeds, SQL unit tests, model materialization, and audits.Usage
Flags
| Flag | Description |
|---|---|
--no-sql-validation | Skip compile-time SQL syntax validation |
--defer-to | Resolve unselected model references against another environment |
--full-refresh | Drop and rebuild all selected models from scratch |
--fail-fast | Stop on first failure and skip remaining nodes |
--concurrency | Number of worker connections (default: 1) |
--verbose, -v | Show lifecycle SQL inline after each model |
--start-cursor-ts | Override start cursor for timestamp incremental models (ISO format) |
--end-cursor-ts | Override end cursor for timestamp incremental models (ISO format) |
--start-cursor-int | Override start cursor for integer incremental models |
--end-cursor-int | Override end cursor for integer incremental models |
--select, -s | Select specific models |
--exclude | Exclude specific models |
Execution order
- Seeds are loaded first
- Source audits run before their dependent models
- SQL unit tests run before their target model
- Models are materialized in DAG topological order
- Audits run after their attached model completes
Output
Deferred builds
Use--defer-to to resolve unselected model references against another environment. This lets you build a subset of models in dev while referencing production tables for everything else:
manifest.json is required. Deferred references resolve directly against the live environment.
Failure behavior
When a model fails:- Downstream models are automatically blocked and skipped
- Staging/delta tables are retained for inspection
- Failure details show the model name, failed phase, and error message
Fingerprints
After a successful build, SQLBuild writes query fingerprints to_sqlbuild_fingerprints in the target schema. These are used by plan to detect query changes on subsequent runs.
Runtime artifacts
Build writes executed lifecycle SQL totarget/run/models/. These files contain the actual SQL that was executed, including resolved cursor bounds and runtime substitutions.
