
Mapping: SCD Type 2 Effective Date
Posted by: Sreehari Desai
SCD Type 2 tracks historical data by creating multiple records for a given dimension entity (e.g Customer) with different effective periods. Unlimited history can be preserved.
Overview

A Slowly Changing Dimension (SCD) is a dimension that stores and manages both current and historical data over time in a data warehouse. It is considered and implemented as one of the most critical ETL tasks in tracking the history of dimension records.A Type 2 SCD retains the full history of values. When the value of a chosen attribute changes, the current record is closed. A new record is created with the changed data values and this new record becomes the current record. Each record contains the effective date and expiration date to identify the time period between which the record was active.In this Type 2 SCD, the old values will not be replaced, but a new row containing the new values will be added to the customer table. So at any point of time, the difference between the old values and new values can be retrieved and easily be compared. This would be very useful for reporting.
Cust_Key | Cust_No | Name | City | State | Country | Phone_No | Start_Date | End_Date |
---|---|---|---|---|---|---|---|---|
01 | 1001 | John | NewYork | NY | USA | 8312222222 | 01-JAN-1990 | 31-DEC-9999 |
02 | 1002 | Micheal | NewYork | NY | USA | 9848022338 | 01-JAN-1990 | 14-MAR-2014 |
03 | 1002 | Micheal | Greensboro | NC | USA | 9848022338 | 15-Mar-2014 | 31-DEC-9999 |
Features
System Requirements:
- Informatica PowerCenter 9.1 or above.