Skip to main content

sqb dbt

Orchestrate dbt and SQLBuild together. Each subcommand runs dbt first, then SQLBuild, with selection logic that works across both project graphs. sqb dbt build, sqb dbt run, and sqb dbt plan run the full selection by default and become change-aware with --changes-only, pruning dbt models that have not changed. See Using SQLBuild with dbt for concepts and selection behavior.

sqb dbt plan

Preview combined dbt and SQLBuild work without executing.
Shows which dbt models will run, which dbt models are current and pruned, which SQLBuild models will run, and the dbt/SQLBuild commands that would be executed.

sqb dbt run

Run dbt models first, then SQLBuild models.

sqb dbt build

Build dbt models first (including dbt tests), then SQLBuild models with audits.

sqb dbt test

Run dbt tests first, then SQLBuild unit tests and audits for selected models.
dbt’s test_type:data and test_type:unit selectors are mapped: test_type:data runs SQLBuild audits, test_type:unit runs SQLBuild unit tests. Without a test type selector, both run.

sqb dbt debug

Run dbt diagnostics followed by SQLBuild diagnostics.

Selectors

All sqb dbt commands accept --select and --exclude. Selectors work across both dbt and SQLBuild:
See Selection for full details on how selectors route work between dbt and SQLBuild.

Configuration

Configure the dbt project location in sqlbuild_project.toml:
See Project Configuration for all fields, including replay_on_change and production_ref.