Skip to content

dbt Fundamentals, hands on

One dbt project, two warehouses: the jaffle_shop DAG from staging to dim_customers

Learn dbt from zero. No analytics engineering background needed, only a little SQL. Every lesson uses the same coffee-shop data, jaffle_shop, and the same dbt project in this repo.

Each lesson mixes three things:

  • Run SQL in your browser. The playgrounds load the raw jaffle_shop data into DuckDB inside the page. No install, no login.
  • Take the quiz. Pick an answer and get instant feedback.
  • Do the exercise. Each Try it edits the real dbt project, with a hint and an answer. Mark it done when it works.

Your progress is saved in this browser.

Start here

New to analytics engineering? Read these five in order. They take about an hour and need nothing installed until lesson 5.

Lesson You learn Progress
1. What is analytics engineering? the problem dbt solves, and who does what on a data team
2. ELT and where dbt fits ETL vs ELT, and what dbt is
3. Meet the data the jaffle_shop tables, and sources, models, tests and docs
4. How dbt builds tables models, ref(), the DAG, dbt build
5. Set up the project the project layout, then your first dbt build

Follow the dbt Fundamentals course

Now follow dbt Learn's free dbt Fundamentals course alongside the project. It uses the same jaffle_shop data, so each module maps to files you can open and run.

Module Open Run Progress
Models models/staging/, models/marts/ dbt run --profiles-dir .
Sources models/staging/*/*_source.yml dbt source freshness --profiles-dir .
Tests models/**/*_schema.yml, tests/ dbt test --profiles-dir .
Documentation models/**/*_doc.md dbt docs generate --profiles-dir .
Deployment .github/workflows/dbt.yml runs on every pull request

Exercises edit the project. To undo one, run git checkout -- oms_dbt_proj from the repo root and delete any files the answer created.

Next steps after Fundamentals

Four short chapters, in the order dbt Learn teaches them. Each one runs offline on DuckDB.

Chapter Progress
1. Generic tests on a mart
2. Macros, Jinja and packages
3. Unit tests and CI
4. Seeds, analyses and snapshots

Tools

QLineage: lifetime_value traced back to stripe.payment.amount

qdbd: how the staging tables join

CTE Diff: the rows a change touches in order_payments

Tool What it shows Progress
QLineage How data flows, model to model and column by column. Reads files only.
qdbd ERD How tables relate: an ERD built from your dbt tests. Reads files only.
CTE Diff Which rows a SQL change touches, one CTE at a time. Runs on DuckDB.
DuckDB UI The built models, queried in a browser tab.

Want to explore the raw data freely? Open the SQL playground.