Bird
0
0

Which of the following is the correct way to apply clustering in a dbt model using config()?

easy📝 Syntax Q12 of 15
dbt - Performance Optimization
Which of the following is the correct way to apply clustering in a dbt model using config()?
Aconfig(cluster_by = 'column_name')
Bconfig(clusters = ['column_name'])
Cconfig(clustering = ['column_name'])
Dconfig(clustering_columns = 'column_name')
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct config syntax for clustering in dbt

    The correct syntax uses the key clustering with a list of column names.
  2. Step 2: Compare options to the correct syntax

    Only config(clustering = ['column_name']) uses clustering = ['column_name'], which matches the correct form.
  3. Final Answer:

    config(clustering = ['column_name']) -> Option C
  4. Quick Check:

    Correct config key and list format = config(clustering = ['column_name']) [OK]
Quick Trick: Remember clustering uses 'clustering' key with list syntax [OK]
Common Mistakes:
MISTAKES
  • Using wrong config key names
  • Passing string instead of list
  • Using plural or incorrect keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes