CLI Reference
sqb dbt
Coordinate dbt and SQLBuild projects.
Orchestrate dbt and SQLBuild together. Each subcommand runs dbt first, then SQLBuild, with selection logic across both project graphs. dbt remains responsible for dbt-owned models; SQLBuild validates and executes SQLBuild-owned models downstream. See Using SQLBuild with dbt for scope and selection behavior.
sqb dbt plan
Section titled “sqb dbt plan”Preview combined dbt and SQLBuild work without executing.
sqb dbt plan [--select <selector>...] [--exclude <selector>...] [--json] [--verbose]Shows which dbt models will run, which SQLBuild models will run, and the dbt/SQLBuild commands that would be executed.
sqb dbt run
Section titled “sqb dbt run”Run dbt models first, then SQLBuild models.
sqb dbt run [--select <selector>...] [--exclude <selector>...]sqb dbt build
Section titled “sqb dbt build”Build dbt models first (including dbt tests), then SQLBuild models with audits.
sqb dbt build [--select <selector>...] [--exclude <selector>...]sqb dbt run and sqb dbt build have no JSON output: they reject --json with C238 before
dbt starts. Use sqb dbt plan --json for a machine-readable preview of the combined work.
Plan safety policies
Section titled “Plan safety policies”After dbt finishes, sqb dbt run and sqb dbt build apply the same plan safety policies as
sqb build before any SQLBuild model executes: blocked model and column
migrations, compatibility-view conflicts, the target’s execution_limits.max_models, the
snapshot full-refresh policy, table_type_downgrade, time_travel_retention_decrease, and
missing_migration_origin. sqb dbt has no --allow-* flags. A policy that requires
confirmation asks for the typed confirmation on an interactive terminal and refuses otherwise;
build the affected models with sqb build and its allow flag instead, or relax the policy. A
refusal at this point leaves completed dbt work in place and builds no SQLBuild models.
sqb dbt debug
Section titled “sqb dbt debug”Run dbt diagnostics followed by SQLBuild diagnostics.
sqb dbt debug [--no-connection]Selectors
Section titled “Selectors”All sqb dbt commands accept --select and --exclude. Selectors work across both dbt and SQLBuild:
# SQLBuild model with dbt dependenciessqb dbt build --select downstream_orders
# Full upstream chain including dbtsqb dbt build --select +downstream_orders
# Downstream of modified dbt modelssqb dbt build --select state:modified+
# SQLBuild models by tagsqb dbt build --select tag:nightly
# SQLBuild models by pathsqb dbt build --select path:models/marts
# Exclude by tagsqb dbt build --select fact_orders+ --exclude tag:nightlySee Selection for full details on how selectors route work between dbt and SQLBuild.
Configuration
Section titled “Configuration”Configure the dbt project location in sqlbuild_project.toml:
[dbt]project_dir = "../dbt_project"profiles_dir = "../profiles"target_path = "../dbt_project/target"See Project Configuration for all fields.
SQLBuild-owned work in sqb dbt plan, run and build connects with the target’s build
warehouse group. dbt itself
keeps using the warehouse from its profile. These commands do not accept --warehouse, because
their remaining arguments pass through to dbt.