Bird
0
0

You wrote this dbt model config:

medium📝 Debug Q14 of 15
dbt - Performance Optimization
You wrote this dbt model config:
config(
  materialized='incremental',
  unique_key=['id']
)

select * from source_table

But the model fails to run. What is the likely error?
A<code>unique_key</code> should be a string, not a list
B<code>materialized</code> must be set to 'table' for incremental
CThe <code>select</code> statement is missing a <code>where</code> clause
D<code>config</code> cannot be used with incremental models
Step-by-Step Solution
Solution:
  1. Step 1: Check the type of unique_key in config

    In dbt, unique_key must be a string naming the column, not a list.
  2. Step 2: Identify the error cause

    Passing unique_key as a list causes a config error, so the model fails.
  3. Final Answer:

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

    unique_key type must be string [OK]
Quick Trick: unique_key is a single column name string, not a list [OK]
Common Mistakes:
MISTAKES
  • Passing unique_key as list instead of string
  • Confusing materialized types
  • Thinking config disallows incremental

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes