Bird
0
0

You wrote this dbt model config but get an error:

medium📝 Debug Q14 of 15
dbt - Performance Optimization
You wrote this dbt model config but get an error:
config(
  materialized='table',
  partition_by='order_date',
  cluster_by=['customer_id']
)

What is the likely cause of the error?
AMissing comma after cluster_by list
Bpartition_by should be a dictionary, not a string
Cmaterialized cannot be 'table'
Dcluster_by should be a string, not a list
Step-by-Step Solution
Solution:
  1. Step 1: Check partition_by syntax

    Partitioning requires a dictionary with 'field' and 'data_type', not just a string.
  2. Step 2: Verify cluster_by and materialized

    cluster_by as a list is correct, and materialized='table' is valid.
  3. Final Answer:

    partition_by should be a dictionary, not a string -> Option B
  4. Quick Check:

    partition_by needs dict, not string [OK]
Quick Trick: partition_by needs dict with field and data_type [OK]
Common Mistakes:
MISTAKES
  • Using string instead of dict for partition_by
  • Changing cluster_by to string incorrectly
  • Assuming materialized='table' is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes