Week 10: dbt Transformations
The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0
*https://hackyourfuture.net/*

Built with ❤️ by the HackYourFuture community · Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.
Introduction to dbt Core
dbt Setup for Azure PostgreSQL
SQL and Jinja Templating
Materializations & Layers
dbt Tests
Docs & Extras
Practice
Assignment: Borough Stats
Gotchas & Pitfalls
Slides (PDF)
Career relevance: Week 10 in the NL data job market
Glossary
History of Analytics Engineering
Going Further: Optional Deep Dives
hyf_week_10-subtitled.mp4
Week 10: dbt Transformations
Welcome to Week 10! This week introduces dbt (data build tool), the industry standard for SQL-based data transformations. You will set up dbt for Azure PostgreSQL, learn how Jinja templating extends SQL, write tests to ensure data quality, and build your first mart that will power next week's dashboard.
You continue working with the NYC taxi dataset from Week 9 (raw_trips and raw_zones already loaded in Azure PostgreSQL).
Learning goals
- Install and configure dbt Core to work with Azure PostgreSQL
- Understand the dbt project structure: models, sources, profiles, and macros
- Write SQL models enhanced with Jinja templating for DRY, reusable transformations
- Explain materializations (view, table) and when to use each; understand incremental as a forward reference
- Build a staging/intermediate/mart layer structure with a mart that powers a dashboard
- Implement data tests (not_null, unique, relationships) and unit tests for transformation logic
- Generate and navigate dbt documentation to understand data lineage
Prerequisites
- Completed Week 9 with
raw_trips and raw_zones loaded into the shared Azure PostgreSQL instance
PG_PASSWORD environment variable and access to your personal dev_<your_name> schema
uv installed (used to install dbt-core + dbt-postgres)
Chapters
- Introduction to dbt Core
- dbt Setup for Azure PostgreSQL
- SQL and Jinja Templating
- Materializations & Layers
- dbt Tests
- Docs & Extras
- Practice
- Assignment: Borough Stats
- Gotchas & Pitfalls
Career relevance: Week 10 in the NL data job market
Glossary
History of Analytics Engineering
Going Further: Optional Deep Dives