0
0
dbtdata~10 mins

Warehouse-specific optimizations 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'
Aincremental
Btable
Cview
Dephemeral
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'view' instead of 'table' creates a view, not a table.
Using 'incremental' requires additional configuration.
2fill in blank
medium

Complete the code to enable clustering on the column 'customer_id' in a Snowflake table.

dbt
config(clustering = ['[1]'])
Drag options to blanks, or click blank then click option'
Aorder_date
Bproduct_id
Ccustomer_id
Dregion
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a column not used in queries reduces clustering benefits.
Forgetting to specify clustering keys in a list.
3fill in blank
hard

Fix the error in the incremental model config to correctly specify the unique key.

dbt
config(materialized='incremental', unique_key='[1]')
Drag options to blanks, or click blank then click option'
Aamount
Bdate
Ccustomer
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-unique column causes incremental loads to fail.
Leaving unique_key empty or incorrect.
4fill in blank
hard

Fill both blanks to create a Snowflake model with clustering on 'region' and materialized as a table.

dbt
config(materialized='[1]', clustering=['[2]'])
Drag options to blanks, or click blank then click option'
Atable
Bview
Cregion
Dcustomer_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'view' materialization with clustering (not supported).
Clustering on a column not used in queries.
5fill in blank
hard

Fill all three blanks to define an incremental model with unique key 'order_id', materialized as incremental, and clustered by 'order_date'.

dbt
config(materialized='[1]', unique_key='[2]', clustering=['[3]'])
Drag options to blanks, or click blank then click option'
Atable
Bincremental
Corder_id
Dorder_date
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing materialization types incorrectly.
Using wrong columns for unique key or clustering.