Tutorial 1 · dbt track
dbt Core Architecture & Internals
Most dbt material teaches you what to type. This tutorial explains what dbt Core does with it. It follows one dbt run through the Python process, from the command line to the SQL your warehouse receives and the JSON files left in target/.
Why learn the internals?
- Debugging gets much faster. Once you know which phase produced an error (config, parse, graph, compile or execute), you know where to look.
- Advanced Jinja makes sense. Questions like "why does
run_queryreturnNone?" or "why can't a model see a variable set in a macro?" are answered by the architecture. - Orchestration improves. Selection, partial parsing, artifacts and state comparison decide how quickly and safely Airflow can drive dbt.
Chapters
About module paths
Python module and class names (such as dbt.parser.manifest.ManifestLoader) refer to the dbt-core 1.9 source tree. dbt Labs moves code between dbt-core, dbt-common and dbt-adapters from release to release. The concepts stay the same, but check the paths against the version you have installed before relying on one.