Bird
0
0

You wrote this snapshot config:

medium📝 Debug Q14 of 15
dbt - Advanced Patterns
You wrote this snapshot config:
snapshots:
  - name: order_snapshot
    strategy: timestamp
    updated_at: updated_at_column

But dbt throws an error. What is the likely cause?
AThe 'updated_at' key should be inside 'config' block
BThe 'strategy' value 'timestamp' is invalid
CThe 'updated_at' key is missing quotes
DThe 'updated_at' key should be 'updated_at_column'
Step-by-Step Solution
Solution:
  1. Step 1: Check snapshot config keys for timestamp strategy

    For 'timestamp' strategy, the correct key is updated_at_column, not updated_at.
  2. Step 2: Identify the error cause

    Using updated_at causes dbt to error because it expects updated_at_column.
  3. Final Answer:

    The 'updated_at' key should be 'updated_at_column' -> Option D
  4. Quick Check:

    Timestamp strategy key = updated_at_column [OK]
Quick Trick: Use 'updated_at_column' key for timestamp strategy [OK]
Common Mistakes:
MISTAKES
  • Using 'updated_at' instead of 'updated_at_column'
  • Misplacing keys outside config block
  • Assuming strategy value is wrong

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes