Skip to content

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.

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.

Run dbt models first, then SQLBuild models.

sqb dbt run [--select <selector>...] [--exclude <selector>...]

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

sqb dbt build [--select <selector>...] [--exclude <selector>...]

Run dbt diagnostics followed by SQLBuild diagnostics.

sqb dbt debug [--no-connection]

All sqb dbt commands accept --select and --exclude. Selectors work across both dbt and SQLBuild:

# SQLBuild model with dbt dependencies
sqb dbt build --select downstream_orders
# Full upstream chain including dbt
sqb dbt build --select +downstream_orders
# Downstream of modified dbt models
sqb dbt build --select state:modified+
# SQLBuild models by tag
sqb dbt build --select tag:nightly
# SQLBuild models by path
sqb dbt build --select path:models/marts
# Exclude by tag
sqb dbt build --select fact_orders+ --exclude tag:nightly

See Selection for full details on how selectors route work between dbt and SQLBuild.

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.