Interview practice question
Building an SCD Type 2 dimension in BigQuery
Data Engineering · BigQuery · Intermediate
How would you maintain a Type 2 customer dimension in BigQuery from daily customer snapshots?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Compare today's data to current rows using a hash of tracked attributes.
- Close changed rows by setting end date and is_current false.
- Insert new versions and new customers.
- Use MERGE or a transaction for atomicity.
- Or use dbt snapshots.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.