Logo DWBI.org Login / Sign Up
Sign Up
Have Login?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Login
New Account?
Recovery
Go to Login
By continuing you indicate that you agree to Terms of Service and Privacy Policy of the site.
SAP Data Services

How to implement SCD Type 2 using History Preserve Transform in Data Services

 
Updated on Oct 01, 2020

This tutorial teaches you how to use the "History Preserving Transform" in SAP Data Services (BODS) by demonstrating a practical use of this transform for the implementation of SCD Type 2. We have also provided hands-on video below so that you can see how to do it yourself.

This article is part of our comprehensive data services tutorial Learning SAP Data Services - Online Tutorial, you may want to check that tutorial first if you have not already done so.

SCD Type 2

SCD stands for slowly changing dimension. An SCD Type 2 mapping tries to capture the changes of a dimension table and store the history of changes in different rows in the target table. We also mark each row with a flag with value 'Y' or 'N' signifying if the row is latest or old.

When loading the target table, we extract only changed record sets from the source so that we do not need to process extra records unnecessarily. In order to extract only the changed records (also known as incremental loading), we use a Query Transform in the data flow.

Table Comparison Transform

In the previous tutorial we have already learnt how to use a table comparison transform. We use the same table comparison transform here so that we can specify the compare columns against the primary key columns which is used for joining.

Table comparison transform basically gives us the Op-code or operational code which helps us identify if the row is already present in the target or not.

History Preserving Transform

In order to correctly implement an SCD Type 2 dimensional table, we need to populate columns like - active flag, valid from, valid to etc. While active flag only tells us if the record is the current record or not, valid from and valid to columns tell us the date ranges within which the record was valid.

History preserving transform lets us specify the valid from and valid to date columns as well as the active/current flag columns.

Hands-on tutorial video that shows you how to use History Preservation Transform in SAP data services (BODS)

PrimeChess

PrimeChess.org

PrimeChess.org makes elite chess training accessible and affordable for everyone. For the past 6 years, we have offered free chess camps for kids in Singapore and India, and during that time, we also observed many average-rated coaches charging far too much for their services.

To change that, we assembled a team of top-rated coaches including International Masters (IM) or coaches with multiple IM or GM norms, to provide online classes starting from $50 per month (8 classes each month + 4 tournaments)

This affordability is only possible if we get more students. This is why it will be very helpful if you could please pass-on this message to others.

Exclucively For Indian Residents: 
Basic - ₹1500
Intermediate- ₹2000
Advanced - ₹2500

Top 10 Articles