SpinTheMic
Pro

dbt · Beginner

What are the materializations in dbt, and when do you use each?

By Anurag Pandey, Lead Data Engineer ·

The short answer

A materialization decides how dbt builds a model in the warehouse. The built-in ones are view (the default), table, incremental, ephemeral and materialized view. You choose by query cost, data size and how fresh the data must be.

Practice this out loud

Opens this question on SpinTheMic. Start without signing up; sign in free for an AI report card.

Say it like this

About 50 seconds out loud. Use it as a model, then put it in your own words.

A materialization tells dbt how to build a model in the warehouse. A view is the default: nothing is stored, so it's always fresh, but every query re-runs the logic. A table rebuilds the full result on each run, which is fast to query but slow to build for big data. Incremental builds the table once and then only processes new or changed rows on later runs, which suits large event tables. Ephemeral isn't built at all; dbt inlines it as a CTE into the models that use it. And materialized view creates a materialized view on platforms that support it. My default is to start with views, move to tables when queries get slow, and use incremental only when a table rebuild costs too much.

What interviewers look for

  • You name the built-in materializations and know view is the default.
  • You give a reason for each choice: freshness, build cost, query cost.
  • You show judgement about when incremental is worth the extra complexity.

Common mistakes

  • Making everything incremental by default. It adds logic you must maintain.
  • Saying ephemeral models create temporary tables. They are inlined as CTEs.
  • Forgetting that the choice is set in config, not in the SQL itself.

Follow-up questions to expect

  1. 1When would an ephemeral model hurt you?
  2. 2How do you set a materialization for a whole folder?
  3. 3What changes when you switch a model from table to incremental?
Practice this out loud

Opens this question on SpinTheMic. Start without signing up; sign in free for an AI report card.

Checked against

All interview question guides