Types of SCD
The various types of SCD are described as follows:
- Type 1 dimension mapping (SCD1): This keeps only current data and does not maintain historical data.
Note
Use SCD1 mapping when you do not want history of previous data.
- Type 2 dimension/version number mapping (SCD2): This keeps current as well as historical data in the table. It allows you to insert new records and changed records using a new column (
PM_VERSION_NUMBER
) by maintaining the version number in the table to track the changes. We use a new columnPM_PRIMARYKEY
to maintain the history.
Note
Use SCD2 mapping when you want to keep a full history of dimension data, and track the progression of changes using a version number.
- Consider there is a column
LOCATION
in theEMPLOYEE
table and you wish to track the changes in the location on employees. Consider a record forEmployee ID 1001
present in yourEMPLOYEE
dimension table.Steve
was initially working in India and then shifted to USA. We are willing to maintain history on the...