Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

dbt Core CLI

$ dbt Official Med Risk
dbt Labs · Database & Data · Apache-2.0 · macos / linux / windows

dbt 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.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install dbt
CLI vs MCP Decision Hybrid (CLI + MCP)

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

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
Trust & Safety 21 / 25

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 compile dry-renders SQL; --select scopes execution
Setup & Portability 12 / 15

Python package requiring an adapter (dbt-postgres, dbt-snowflake, dbt-duckdb, etc.) and Python virtualenv.

  • Requires dbt-core plus warehouse-specific adapter package
Utility & Efficiency 14 / 15

Gold standard for modular SQL transformations, lineage graphs, and automated data tests.

  • Compiles, materializes, and tests SQL DAGs cleanly
Maintenance & Lineage 9 / 10

Official dbt-labs/dbt-core under Apache-2.0.

  • Official dbt-labs/dbt-core repository
Docs & Verifiability 8 / 10

Extensive reference documentation for commands, node selection syntax, and artifacts.

  • Official docs at docs.getdbt.com/reference/dbt-commands

Security, Auth & Guardrails

Auth Modes
Config File Env API Key Service Account OAuth Browser
Credential Storage

Warehouse credentials stored in ~/.dbt/profiles.yml using env_var() Jinja lookups for secrets.

Side Effects
Read-Only Local Write Remote Write Billing Impact
Cost & Quotas

dbt Core is Apache-2.0 open-source; warehouse execution queries incur compute charges on your target cloud warehouse.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List selected models and lineage in JSON
dbt ls --select +orders --output json

Enumerates upstream/downstream dbt nodes as JSON without running warehouse queries.

Compile Jinja SQL locally without executing
dbt compile --select orders --no-use-colors

Renders final warehouse SQL into target/compiled/ to verify syntax and macros safely.

Controlled Writes & Previews

Run targeted model and data tests
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 compile and dbt ls --output json validate DAGs and render SQL before incurring warehouse cost.
  • + Rich JSON artifacts (target/manifest.json, target/run_results.json) aid automated debugging.
  • + Supports dbt-duckdb for zero-cost local validation.

Caveats & Pitfalls

  • ! Python startup and dependency tree with warehouse adapters can be slow.
  • ! Unscoped dbt run / dbt build can execute hundreds of models and incur heavy warehouse billing.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI