0
0
dbtdata~10 mins

Materializations strategy in dbt - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the materialization to table in a dbt model.

dbt
{{ config(materialized = '[1]') }}
Drag options to blanks, or click blank then click option'
Aview
Btable
Cincremental
Dephemeral
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'view' instead of 'table' creates a virtual table, not a physical one.
Using 'incremental' requires additional configuration.
2fill in blank
medium

Complete the code to define an incremental materialization with a unique key.

dbt
{{ config(
  materialized = 'incremental',
  unique_key = '[1]'
) }}
Drag options to blanks, or click blank then click option'
Aid
Bdate
Cname
Dvalue
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-unique column like 'name' can cause incorrect incremental updates.
Leaving unique_key undefined for incremental models causes errors.
3fill in blank
hard

Fix the error in the materialization config to use the correct keyword for ephemeral models.

dbt
{{ config(materialized = '[1]') }}
Drag options to blanks, or click blank then click option'
Atransient
Btemporary
Cephemeral
Dvirtual
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'temporary' or 'transient' which are not valid dbt materializations.
Confusing ephemeral with view materialization.
4fill in blank
hard

Fill both blanks to create a model materialized as incremental with a filter on updated_at column.

dbt
{{ config(materialized = '[1]') }}

select * from events
where updated_at > '[2]'
Drag options to blanks, or click blank then click option'
Aincremental
Btable
C2023-01-01
D2022-12-31
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table' instead of 'incremental' for incremental loading.
Using an incorrect date format or older date.
5fill in blank
hard

Fill all three blanks to define a materialization strategy with table, unique_key, and incremental filter.

dbt
{{ config(
  materialized = '[1]',
  unique_key = '[2]'
) }}

select * from events
where created_at > '[3]'
Drag options to blanks, or click blank then click option'
Aincremental
Bid
C2023-06-01
Dtable
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing incremental materialization with table without proper config.
Using wrong date format or missing unique_key.