SQL Transformation with dbt
Build version-controlled, tested SQL transformation layers with dbt: modular models, incremental materializations, snapshots and generated documentation.
4 objectives 6 steps about 135 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Structure a dbt project into sources, staging, intermediate and mart models linked with ref() and source(), and explain the resulting dependency graph.
- Choose view, table, incremental or ephemeral materializations and implement an incremental model with a unique key and a late-data lookback.
- Capture Type 2 history with snapshots and reuse logic with macros and Jinja while keeping compiled SQL readable.
- Document models and run dbt build (models plus tests) in CI on every pull request, building only changed models and their dependents.
Lesson plan
6 steps, about 135 min · 5 of 5 lessons available so far
- Why Transformations Belong in Version-Controlled SQL Concept · 15 min
- Lab: Sources, Staging Models and the ref() Graph Lab · 30 min
- Materializations and Incremental Models Worked example · 25 min
- Snapshots, Macros and Keeping Jinja in Check Lab · 25 min
- Lab: Docs and dbt build in Pull-Request CI Lab · 25 min
- Check: Review a dbt Pull Request Knowledge check · 8 questions
Practise it
Turn raw e-commerce tables into a dbt project with staging models, one incremental fact model, an SCD Type 2 snapshot of customers and a documented mart; a CI job must run dbt build on every pull request and fail when a model or test breaks.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.