โ† All Data Engineering Flashcard Decks

Slowly Changing Dimensions (SCDs) Flashcards

7 cards from real Data Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Slowly Changing Dimensions (SCDs) flashcards as text
  1. In dbt, the snapshot feature primarily implements which SCD type?

    Answer: Type 2

    dbt snapshots capture row changes over time with valid_from/valid_to, implementing Type 2.

  2. A dbt snapshot using strategy 'check' detects changes by:

    Answer: Comparing specified columns between runs

    The check strategy compares listed columns to decide whether a new version is needed.

  3. The 'timestamp' snapshot strategy in dbt relies on:

    Answer: An updated-at column that reliably changes on every update

    The timestamp strategy trusts an updated_at field to detect modified records.

  4. What risk arises if a source's updated_at column is unreliable while using the timestamp strategy?

    Answer: Missed or false change detection corrupting history

    An unreliable timestamp causes changes to be missed or spuriously recorded, breaking history.

  5. When using MERGE to maintain a Type 2 dimension, the WHEN MATCHED clause typically:

    Answer: Expires the current row when tracked columns differ

    On a match with changed attributes, MERGE closes the existing version before a new insert.

  6. Which idempotency concern is important when re-running an SCD load?

    Answer: Re-running should not create duplicate versions for unchanged data

    Idempotent SCD loads detect no-change rows so reruns don't spawn redundant versions.

  7. A streaming source emits frequent updates to a customer score. To avoid Type 2 version explosion you should:

    Answer: Move the volatile score to a mini-dimension or treat it as Type 1

    Rapidly changing attributes belong in a mini-dimension or as Type 1 to prevent row bloat.