Skip to content
プロジェクト

概要

Learn dbt Fundamentals hands-on: one jaffle_shop project on local DuckDB (default) or Snowflake, with course map, exercises, and Codespaces.

学習・教育

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
+1
1か月
+4

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

dbt Fundamentals

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

Open in GitHub Codespaces

Take the interactive lessons: run SQL in your browser, answer quizzes and track your progress, with nothing to install.

Open in Codespaces to skip local setup: Python, dependencies and raw data are installed for you, so you can run dbt build --profiles-dir . from oms_dbt_proj right away. Local setup below still works.

This is the same dbt project with two targets in oms_dbt_proj/profiles.yml. Models, sources, and tests are shared; only the target changes.

  • DuckDB (--target duckdb) — default. Runs locally with no warehouse login. Load raw data with python duckdb/load_raw.py, then models land in duckdb/analytics.duckdb.
  • Snowflake (--target snowflake) — same models and sources. Load raw data with snowflake/raw_data.sql, then set SNOWFLAKE_ACCOUNT, SNOWFLAKE_USER, and SNOWFLAKE_PASSWORD.

From oms_dbt_proj:

dbt build --profiles-dir . --target duckdb
dbt build --profiles-dir . --target snowflake

Setup details are in oms_dbt_proj/README.md.

Start here

Never heard of analytics engineering or dbt? Begin with these five short lessons. They need only a little SQL.

  1. What is analytics engineering?
  2. ELT and where dbt fits
  3. Meet the data
  4. How dbt builds tables
  5. Set up the project

Follow the dbt Fundamentals course

Use this project alongside dbt Learn's free dbt Fundamentals course. The course uses the same jaffle_shop data, so each module maps to files you can open and run here. Run dbt build --profiles-dir . once from oms_dbt_proj first.

Module Open Run
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 . then dbt docs serve --profiles-dir .
Deployment .github/workflows/dbt.yml runs on every pull request

Each module page has a Try it exercise. 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.

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

Tools

Three tools to see what a dbt project does. QLineage and qdbd only read files and never touch the warehouse. CTE Diff runs queries through dbt on the DuckDB target.

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
QLineage: how data flows, model to model and column by column. qdbd: how tables relate. An ERD built from your dbt tests. CTE Diff: which rows a SQL change touches, one CTE at a time.

To query the built models in a browser, use the DuckDB UI.

Reference

関連プロジェクトを探す

読み込み中…