Skip to content

What each core dbt command actually does

dbt provides a set of core commands that run, test, document, and inspect your project. Understanding when to use each command—and how they interact through selection syntax and the DAG—is essential for efficient development and CI workflows. dbt build is the most commonly tested command because it consolidates multiple steps into one graph-aware operation.

1 · Learn the must-know

  • dbt run executes models only (materializes them as tables/views), while dbt build runs models, tests, snapshots, and seeds together in DAG order, stopping downstream nodes if an upstream test fails.
  • dbt test executes schema tests (e.g., unique, not_null) and singular tests defined in the tests/data-tests folder, but does not build or refresh the underlying models first.
  • dbt seed loads CSV files from the seeds directory into the warehouse as tables, useful for static reference or lookup data, not for large or frequently changing datasets.
  • dbt snapshot captures point-in-time changes to mutable source tables using a defined strategy (timestamp or check), enabling type-2 slowly changing dimension tracking.
  • dbt docs generate compiles project metadata (including compiled SQL, column-level descriptions, and lineage) into a manifest and catalog, which dbt docs serve then renders as a browsable website.
  • dbt show compiles and previews the result set of a model or ad hoc SQL without materializing it in the warehouse, useful for quick debugging during development.
  • Selection flags like --select, --exclude, and graph operators (e.g., +model_name, model_name+) work across run, test, build, and snapshot to scope execution to specific parts of the DAG.

2 · Check your understanding

Check this objectiveFree · always available

You maintain this snapshot: {% snapshot orders_snapshot %} {{ config( target_schema='snapshots', unique_key='order_id', strategy='timestamp', updated_at='updated_at', ) }} select * from {{ source('erp', 'orders') }} {% endsnapshot %}A backend script updates the status column on some rows directly in the database without ever touching updated_at. Snapshot runs since then have not recorded those status changes. Which change to the config fixes this?

Your objective map0 tried · 0 answered correctly · 31 untouched

What you have tried across dbt Analytics Engineering's objectives, not a readiness score.

Developing and optimizing dbt models45.16% of the exam*0 of 14 tried
Managing dbt models governance9.68% of the exam*0 of 3 tried
Debugging data modeling errors16.13% of the exam*0 of 5 tried
Troubleshooting and optimizing dbt pipelines6.45% of the exam*0 of 2 tried
Implementing dbt tests9.68% of the exam*0 of 3 tried
Implementing and maintaining external dependencies6.45% of the exam*0 of 2 tried
Leveraging the dbt state6.45% of the exam*0 of 2 tried

* Our estimate. dbt Labs publishes no section weights.

3 · Keep going