Region
New Zealand Flag
NZ
UK Flag
UK

Slowly Changing Dimensions (SCD) Type 2 in Action

By Julia Gusman, Managing Consultant

Slowly Changing Dimensions (SCDs) type 2 are a concept in dimensional modeling that are used to handle changes in the attributes of a dimension over time, particularly when the history of those changes is important. 

SCD type 2 maintains a history of changes by creating a new row in the dimension table each time a change occurs, instead of simply updating the existing row. Each row includes a unique identifier, a start date, and an end date, which define the time period during which that particular version of the dimension is valid. 

For example, if a customer changes their name or address, a new row would be created in the customer dimension table with a new unique identifier and start date, while the previous row would be ended with an end date. This allows for the tracking of changes over time and the ability to analyze data at different points in history. 

In this short video, I demonstrate how Slowly Changing Dimensions type 2 can be implemented in ETL using sample data. You’ll see how new rows are created in the dimension table for each change, and how the start and end dates are used to track the history of those changes. Additionally, we demonstrate how the fact table is linked to the dimension table using the transaction date. 

If you would like to learn more about Dimensional Modelling, connect with us to see how we can help you.

Share

Facebook
Twitter
LinkedIn
WhatsApp

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies to improve your experience and support our mission.
Read more about it here. By using our sites, you agree to our use of cookies.