Skip to content

Practice: dbt problems

Practice tracks: PySpark & SQL (84) · dbt (25) · Airflow (10) · Python (52)

25 free dbt interview problems: write models with source() and ref(), Jinja, macros, data tests and incremental models, graded on hidden tests.

Sources & staging

source(), renaming and casting, null-safe filters and deduplicating change data.

Refs & marts

ref(), joining staging models into one row per entity without fan-out.

Jinja, vars & packages

loops, if blocks, var(), target and dbt_utils macros.

Macros

reusable SQL with arguments and defaults.

Data tests

singular and generic tests, and writing schema.yml tests that catch broken data without false alarms.

Incremental models

is_incremental(), {{ this }}, unique_key, strategies, late data and reruns over several days.

Snapshots

SCD Type 2 history with the timestamp and check strategies and hard deletes, over several runs.

PySpark problems · Learn