Day 33Phase 07 · dbt + Data Quality
dbt Core & Modeling
The curriculum for this day stays visible. The lesson, code, and workspace unlock with a pass.
By the end of today you can
- Structure SQL transformations into modular dbt models referencing upstream dependencies with {{ ref() }}.
- Configure generic data tests (unique, not_null, accepted_values, relationships) to validate transformation outputs.
- Compile templated Jinja and SQL models into a reproducible Directed Acyclic Graph.
What is dbt?
Without dbt, analysts paste duplicate SQL snippets into disconnected BI dashboards with zero version control.
dbt centralizes data transformation logic into a single version-controlled repository shared across the engineering team.
This is the first section of the lesson. The rest unlocks with a pass.
Core topics: dbt architecture & compilation to native SQL, Sources, staging models & column renaming, ref() DAG generation & lineage, Generic tests (not_null, unique, accepted_values, relationships), dbt macros & Jinja templating, SCD Type 2 snapshots (check vs timestamp strategy)
Build: dbt transformation engine: raw sources → staging clean views → dimensional fact mart with automated lineage graph compilation and snapshot history tracking.
Never hardcode database or schema names in SQL. Always use {{ source() }} and {{ ref() }} to guarantee atomic DAG compilation and environment isolation.
Already have a pass? Go to your account. Need a pass? See pricing.