Bird
0
0

You wrote this snapshot config:

medium📝 Debug Q6 of 15
dbt - Advanced Patterns
You wrote this snapshot config:
snapshots:
  - name: user_snapshot
    strategy: timestamp
    unique_key: user_id

When running dbt snapshot, you get an error about missing updated_at. What is the fix?
AAdd the 'updated_at' column name to the snapshot config
BRemove the unique_key from the config
CChange strategy to 'check' without check_cols
DRename the snapshot to match the source table
Step-by-Step Solution
Solution:
  1. Step 1: Identify required fields for timestamp strategy

    The timestamp strategy requires an updated_at column to detect changes.
  2. Step 2: Fix missing updated_at error

    Adding the updated_at column name to the config resolves the error. Other options do not address the missing column.
  3. Final Answer:

    Add the 'updated_at' column name to the snapshot config -> Option A
  4. Quick Check:

    Timestamp strategy needs updated_at column [OK]
Quick Trick: Timestamp snapshots require updated_at column specified [OK]
Common Mistakes:
MISTAKES
  • Ignoring updated_at requirement
  • Removing unique_key mistakenly
  • Changing strategy without fixing config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes