🔄

dbt Interview Questions

2 free questions to get you started. Unlock all sections (Normal, Code & Logic) with Pro.

Free sample — easy bait
1

What is dbt and where does it fit in the data stack? Normal

dbt (data build tool) is used for the “T” in ELT: it runs SQL transformations inside your data warehouse. You write SQL in models, use ref() to build a DAG of dependencies, and dbt handles run order, testing, and documentation. It doesn’t move data from source to warehouse—an orchestrator (e.g. Airflow) does that. dbt runs in the warehouse (Snowflake, BigQuery, Redshift, etc.) and produces tables/views that analytics and BI use.

2

What are the main materialization types in dbt? Normal

View: Model is built as a view (no physical table; always fresh, can be slower). Table: Full rebuild each run; good for smaller datasets. Incremental: Only new/changed rows are processed after the first run; good for large fact tables. Ephemeral: Not materialized in the warehouse; compiled into a CTE in dependent models. Choose by data volume and how often you need to refresh.

Unlock all dbt interview questions

25+ questions across models, testing, incremental, macros, and project design — with full answers.

Upgrade to Pro
Models & refs
3

What is ref() and why use it instead of raw table names? Normal

Unlock with Pro for the answer.

4

Write a staging model that selects from source and renames columns. Code

Unlock with Pro for the code.

5

Staging vs intermediate vs marts — how do you structure a dbt project? Logic

Unlock with Pro for the answer.

Testing & documentation
6

How does dbt testing work (schema tests vs custom tests)? Normal

Unlock with Pro for the answer.

7

Add unique and not_null tests to a model in YAML. Code

Unlock with Pro for the YAML.

8

When would you use a singular test vs a generic test? Logic

Unlock with Pro for the answer.

Incremental & performance
9

How do incremental models work? What is the incremental_strategy? Normal

Unlock with Pro for the answer.

10

Write an incremental model that appends new rows based on a date column. Code

Unlock with Pro for the code.

11

How would you implement SCD Type 2 in dbt? Logic

Unlock with Pro for the answer.

Macros, packages & deployment
12

What are dbt macros and when do you use them? Normal

Unlock with Pro for the answer.

13

How do you run only a subset of models (e.g. select or exclude)? Code

Unlock with Pro for the answer.

14

How would you deploy dbt in CI/CD with Slim CI? Logic

Unlock with Pro for the answer.