Wednesday, December 11, 2024

Explain about SCD type 1, SCD type 2 and SCD type 3 in DataStage/DWH with an example in simple?

Slowly Changing Dimensions (SCD) are used in data warehousing to manage and track changes to dimension data over time. Here are the three main types of SCDs with simple examples:

SCD Type 1

Purpose: Overwrites old data with new data. It doesn't keep any history of changes. Example:

  • Imagine you have a customer table.

  • A customer's address changes from "123 Old St" to "456 New St".

  • In SCD Type 1, you simply update the address to "456 New St" and lose the previous address.

SCD Type 2

Purpose: Maintains full historical data by adding new records when changes occur. Example:

  • Using the same customer table.

  • When the address changes, instead of updating the existing record, a new record is added.

  • Each record will have a version number or effective dates to indicate the time period it was active.

Customer IDNameAddressVersionEffective Date
1John Doe123 Old St12020-01-01
1John Doe456 New St22022-01-01



SCD Type 3

Purpose: Tracks changes using additional columns to store historical data for certain attributes. Example:

  • When the customer's address changes, instead of creating a new record, a new column is added to store the previous address.

Customer IDNameCurrent AddressPrevious Address
1John Doe456 New St123 Old St

Uploading: 13289 of 13289 bytes uploaded.


These methods help manage the evolution of dimensional data over time, allowing for accurate historical reporting and analysis


Related Hashtags:

#datastage #DataStage #Datastage #SQL #sql #dwh #DWH #Dwh

#datawarehouse #datawarehousing #unix #ibmds #ibmdatastage

#BMDatastage #IBMDataStage #interviewquestions #interviewtips 

#interview #interviewprep #interviewskills #interviewpreparation 

#jobinterview #interviews #interviewready #interviewing #jobsearch 

#jobseekers #careeradvice #resumetips #jobinterviewtips #career 

#interviewadvice #jobs #interviewcoaching #job #careerdevelopment 

#interviewoutfit #careertips #interviewcoach #jobsearching #interviewer 

#careercoach #recruitment #resume #hiring

#blog #blogger #fashion #love #instagram

#instagood #photography #lifestyle #travel #blogging #blogpost

#bloggerstyle #follow #style #like #food #bloggers #fashionblogger

#music #art #photooftheday #beauty #bloggerlife #life #influencer 

#k #instadaily #instablog #foodblogger #vlog

#jobinterviews #motivation #jobsearchtips #jobvacancy 

#jobinterviewquestions #jobseeker #resumewriting #jobhunt 

#resumewriter #resumehelp #coding #careergoals #jobhunting 

#knowledge #goals #facts #interviewhelp #jobsinindia #jobseeking 

#interviewseason #recruiting #quotes #questions #instafacts #factsdaily 

#unknownfacts #dailyfacts #hiringnow #factoflife #allfacts

No comments:

Post a Comment

When we use Join stage, Merge Stage and Look Up stage in DataStage ?

  Join, Merge, and Lookup Stages in DataStage These three stages are fundamental in DataStage for performing data integration and transforma...