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
When loading a Type 2 dimension, a record's tracked attribute changes. What is the correct sequence?
Answer: Expire the current row, then insert a new row marked current
You close the existing version (set end_date, is_current=false) and insert a fresh current row.
Which technique efficiently detects whether any tracked column changed during a Type 2 load?
Answer: Comparing a hash of the tracked columns
Hashing the tracked columns lets a single comparison detect any change quickly.
A late-arriving dimension means a fact references a dimension member that:
Answer: Does not yet exist in the dimension when the fact loads
Late-arriving dimensions require inserting a placeholder member so the fact can be loaded.
How is a high-end_date often represented for the current Type 2 row?
Answer: A far-future sentinel date like 9999-12-31
A far-future sentinel keeps BETWEEN range queries simple while marking the row as open.
What problem can occur if a non-tracked attribute is mistakenly configured as Type 2?
Answer: Unnecessary version explosion bloating the dimension
Treating volatile non-essential columns as Type 2 creates many rows and inflates storage.
In a hybrid Type 6 SCD, which behaviors are combined?
Answer: Type 1, 2, and 3 (1+2+3=6) in one dimension
Type 6 blends overwrite, new-row history, and a current-value column for flexible reporting.
A mini-dimension is commonly used to:
Answer: Pull rapidly changing attributes out of a large dimension
Mini-dimensions isolate fast-changing attributes to prevent version explosion in the main dimension.