Bird
0
0

You wrote this dbt model config:

medium📝 Debug Q6 of 15
dbt - Performance Optimization
You wrote this dbt model config:
config(
  materialized='table',
  partition_by={'field': 'order_date', 'data_type': 'timestamp'},
  clustering='customer_id'
)

Why does this cause an error?
AClustering should be a list, not a string
BPartitioning data_type 'timestamp' is invalid
CMaterialized type 'table' does not support clustering
DField 'order_date' must be lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Check clustering syntax

    Clustering expects a list of columns, but a string was given.
  2. Step 2: Validate other config parts

    Partitioning with 'timestamp' is valid, 'table' supports clustering, and field case is not an error.
  3. Final Answer:

    Clustering should be a list, not a string -> Option A
  4. Quick Check:

    Clustering requires list syntax [OK]
Quick Trick: Always use a list for clustering columns [OK]
Common Mistakes:
MISTAKES
  • Using string instead of list for clustering
  • Misunderstanding valid partition data types
  • Assuming materialization blocks clustering

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes