Logo DWBI.org Login / Sign Up
Sign Up
Have Login?
Login
New Account?
Recovery
Go to Login
SAP Data Services

SAP Data Services Design Pattern: SCD 1 - Using Table Comparison Transform

Updated on Oct 02, 2020

In this tutorial again, we will show you the SAP Data Services design pattern for a Slowly Changing Dimension of Type 1, this time using table comparison transform.

Overview

Design Pattern: Slowly Changing Dimension of Type 1

In our previous article, we have already showed you SCD Type 1 design pattern in BODS. The solution presented in the previous article was more generic in nature. However, in this article we show you the same design pattern by using "Table Comparison Transform" of Data Services.

In dimensional modeling, Type-1 dimensions are those that do not preserve the historical changes in attribute values. Whenever one attribute value changes, the old value is simply updated with the new value.

Pre-requisite knowledge

To know more about dimensional modeling, see the article on Dimension Modeling

To know more about Slowly Changing Dimensions, see this article.

You may also read this article and the allied video that gives you more information about Table Comparison Transform

Implementation Notes

Source and Target Description

For the purpose of demonstrating SCD Type 1 implementation in SAP Data Services (formerly known as BODS), we have chosen the Product table from our RetailData schema. We assume our source is a OLTP database for transaction processing and our target is a dimensional data warehouse.

Source Table

ColumnData TypeNullablePrimary Key
PROD_IDNumber(20, 0)NY
NAMEVarchar(50)NN
PRICENumber(10, 2)NN
LAST_UPDATED_DATEDATEYN

Target Table

ColumnData TypeNullablePrimary Key
PROD_KEYNumber(20, 0)NY
SOURCE_PROD_IDNumber(20, 0)NN
NAMEVarchar(50)NN
PRICENumber(10, 2)NN
LOAD_DATEDATEYN

The meaning of 'Full Loading'

In this Implementation, we will consider the "full loading" scenario. When we say "full load", we mean that every time we read the source table, we actually read the entire table irrespective of the fact whether or not we *need* to read the full table. This is opposite to reading the source table incrementally, or reading only the portion of the data that we really *need*.

Clearly, Full Loading is not always required/desired. For example, if your source table is huge in size - you may not want to read the entire table every time. In such scenario, you will only want to read the portion of the data that got changed in source. Such loading is called "Incremental" or "delta" loading. We will deal with that scenario in the next article. To know more about incremental loading in general, read this article.

Getting More help

We strongly encourage you to go through all our design pattern videos in Youtube here.

Related Design Patterns

To see the generic implementation (without using Table Comparison Transform) of SCD Type 1 in Data Services, see our previous design pattern article here.