Monday, 18 March 2013

Implementing SCD (Slowly Changing Dimensions) Type 2 in Talend


In the previous post, I had shown you, How to implement SCD Type 1 . Today, I am going to implement SCD Type 2.

Unlike SCD Type1, in SCD Type 2, we store all the changes/previous values of the dimension attribute. To implement this, we need to have at least two additional columns in the dimension table i.e. start_date and end_date. We can keep the value of end date as NULL for currently active record.

Summary of Slowly Changing Dimension Type 2
 
1. All the historical changes for the dimension attribute is stored in Dimension Table.
2. New columns (start date and end date) need to be created.
3. New record will be inserted in the Dimension table for every change in the dimension attribute. Hence, Primary Key remains the same but Surrogate Key changes.



You may also like to read..

No comments:

Post a Comment