Intermediate
Open
Pro
Choose an SCD Strategy for Each Attribute in a Customer Dimension
Your dim_customer table has these attributes, and stakeholders have
given you the following requirements:
email— corrections should just fix the record; nobody needs to know a customer's old, typo'd email address.sales_region— Finance needs commission and revenue reports to reflect the region that was active at the time each sale happened, even after a customer is reassigned to a new region.loyalty_tier— Marketing wants to compare a customer's behavior immediately before and after their most recent tier change (e.g., "did spend increase after upgrading to Gold"), but doesn't need arbitrarily deep history beyond the single most recent change.original_acquisition_channel— how the customer was first acquired (e.g., "paid-search", "referral") should never change once set, regardless of any later re-attribution logic elsewhere in the business.
- Assign an SCD type (0, 1, 2, or 3) to each of the four attributes and justify each choice against the stated requirement.
- Is it correct to say "the dim_customer table uses SCD Type 2"? Explain what's imprecise about describing SCD type at the table level rather than the attribute level, using this example.
- Sketch the column-level DDL changes needed to support all four
attributes with their assigned strategies in a single physical
dim_customertable.
Share this question