dbt Core CLI
$ dbt Official Med Riskdbt Core compiles modular SQL+Jinja analytics models, executes DAG transformations against data warehouses (Snowflake, BigQuery, Postgres, DuckDB), and runs data quality tests. Supports --output json logging, dbt compile offline/dry-run rendering, and dbt ls node selection.
brew install dbt dbt compile, dbt ls --output json, and dbt test are essential local CLI loops for editing models; dbt MCP exposes Semantic Layer and metadata queries.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports dbt ls --output json, --log-format json, --no-use-colors, and machine-readable target/manifest.json & run_results.json artifacts.
- Structured JSON artifacts (
manifest.json,run_results.json),ls --output json, and--log-format json
dbt compile validates Jinja/SQL locally without touching warehouse data, and --select tightly scopes runs; unscoped dbt run can trigger costly full-DAG builds.
dbt compiledry-renders SQL;--selectscopes execution
Python package requiring an adapter (dbt-postgres, dbt-snowflake, dbt-duckdb, etc.) and Python virtualenv.
- Requires
dbt-coreplus warehouse-specific adapter package
Gold standard for modular SQL transformations, lineage graphs, and automated data tests.
- Compiles, materializes, and tests SQL DAGs cleanly
Official dbt-labs/dbt-core under Apache-2.0.
- Official
dbt-labs/dbt-corerepository
Extensive reference documentation for commands, node selection syntax, and artifacts.
- Official docs at docs.getdbt.com/reference/dbt-commands
Security, Auth & Guardrails
Warehouse credentials stored in ~/.dbt/profiles.yml using env_var() Jinja lookups for secrets.
dbt Core is Apache-2.0 open-source; warehouse execution queries incur compute charges on your target cloud warehouse.
# dbt CLI Agent Rules - Always run `dbt ls` and `dbt compile` before `dbt run` or `dbt build`. - Always scope execution with `--select <model>` (never run unscoped `dbt run` across full prod DAGs). - Pass `--log-format json --no-use-colors` when parsing run artifacts or `target/run_results.json`.
Agent-Ready Command Recipes
Safe Read-Only Queries
dbt ls --select +orders --output json
Enumerates upstream/downstream dbt nodes as JSON without running warehouse queries.
dbt compile --select orders --no-use-colors
Renders final warehouse SQL into target/compiled/ to verify syntax and macros safely.
Controlled Writes & Previews
dbt build --select orders --log-format json
Materializes a single scoped model and executes its schema/data assertions with structured logs.
Strengths for Agents
- +
dbt compileanddbt ls --output jsonvalidate DAGs and render SQL before incurring warehouse cost. - + Rich JSON artifacts (
target/manifest.json,target/run_results.json) aid automated debugging. - + Supports
dbt-duckdbfor zero-cost local validation.
Caveats & Pitfalls
- ! Python startup and dependency tree with warehouse adapters can be slow.
- ! Unscoped
dbt run/dbt buildcan execute hundreds of models and incur heavy warehouse billing.