Courses / Course 04
dbt in Practice
The tool most data teams use to turn SQL into a tested, documented project.
- IntermediateLevel
- about 1.5 hoursTo complete
- 5 lessonsWith checked exercises
- FreeNo account needed
What you will learn
- Structure a project into sources, staging and marts
- Write built-in and custom tests
- Reuse logic with macros
- Build incremental models that handle late data
Syllabus
- 1Sources, staging and marts14 min
How a dbt project is organised, and why every model has one job.
- 2Tests that catch real problems14 min
A dbt test is a query that returns the bad rows. Zero rows means the test passes.
- 3Macros and documentation12 min
Write a rule once and reuse it everywhere, then explain your models so others can use them.
- 4Incremental models14 min
Process only the new data each run, without missing rows that arrive late.
- 5Mini project: five seasons of city bikes18 min
Build a tested mart that compares every bike season from 2021 to 2025.
The data you will use
Helsinki City Bikes
Real open data from the city bike system in Helsinki and Espoo. Bikes are available from April to October each year, so there is no data for the winter months.
Tables: stations, daily_trips
Nordic Shop
A small online shop based in Finland that sells electronics, home goods, sports gear, books and outdoor clothing. Customers sign up, place orders on the website or in the app, and each order contains one or more products.
Tables: customers, products, orders, order_items
The lesson Sources, staging and marts walks you through every table and column. Under every code box you can also open a list of the tables and what each column means.
Learn in public on GitHub
Do the exercises in the browser, or in the public course repo so your work shows on your GitHub profile.
Fork the course repo
One click on GitHub gives you your own copy with every exercise and dataset.
Solve and open a pull request
Put your answers in your own folder and open a pull request. A bot checks them and comments with ✅ or ❌.
Join the graduates
Finished a course? Add your name to GRADUATES.md. Your work stays on your GitHub profile for recruiters to see.
What you will build
Turn five seasons of Helsinki city bike trips into a tested season mart.
Based on a real project: Helsinki City Bikes