Introduction to dbt Core
dbt Setup for Azure PostgreSQL
SQL and Jinja Templating
dbt Tests
Incremental Models, Docs, and Snapshots
Building Your First Mart
Practice
Assignment
Gotchas & Pitfalls
Week 10 Lesson Plan (Teachers)
SQL and Jinja Templating
Content coming soon...
Suggested Topics
- What Jinja is: a Python-based templating language embedded in SQL
- The ref() function: referencing other models to build a dependency graph
- The source() function: referencing raw tables defined in schema.yml
- Jinja control flow: if/else statements and for loops in SQL
- Using variables and environment-based configuration with var()
- Macros: reusable Jinja functions for common SQL patterns
- When Jinja helps: DRY code, environment switching, conditional logic
- When Jinja hurts: over-abstraction that makes SQL unreadable
- Debugging compiled SQL: using dbt compile to see the generated output
The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

*https://hackyourfuture.net/*
Found a mistake or have a suggestion? Let us know in the feedback form.