What does dbt do in a modern data stack, and what are its main features?
What the interviewer wants to hear
- Handles the T in ELT, transforming data inside the warehouse with SQL
- Models are SELECT statements built as views or tables
- ref() and source() build the dependency graph and lineage
- Tests, documentation and freshness checks are built in
- Brings software practices: version control, code review, CI and environments
Model answer
dbt is the transformation layer in an ELT stack. Loaders like Fivetran or Airbyte land raw data in the warehouse, and dbt turns it into clean, modelled tables using SQL. Each model is a SELECT statement in a file, and dbt materialises it as a view, a table or an incremental table. Models call ref() for other models and source() for raw tables, so dbt knows the dependency graph, runs things in the right order and produces lineage and documentation. You add tests such as unique, not_null and relationships in YAML, plus source freshness checks, and they run with every build. Because it is just code in Git, you get pull requests, code review, CI that builds changed models in a separate schema, and separate dev and prod targets. It brings software engineering habits to analytics work.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Data Engineer questions
- Describe a data pipeline you built or would build, from source to dashboard.
- What is the difference between an OLTP database and an OLAP data warehouse?
- Explain a star schema and why it is used in data warehouses.
- What data quality checks would you add to a pipeline?
- Why use an orchestration tool like Airflow instead of cron jobs?
- What is a slowly changing dimension, and how do SCD Types 1, 2 and 3 differ?
- Why would you store analytics data as Parquet rather than CSV or JSON?
- What is change data capture (CDC), and why do data teams use it?
- Explain Kafka topics, partitions, offsets and consumer groups to a new teammate.