0% found this document useful (0 votes)
355 views

Datastage Slowly Changing Dimensions

This document provides an overview of slowly changing dimensions (SCDs) and how to implement them using IBM Datastage. It discusses the different types of SCD (Type 1, 2, and multi-tuple) and provides step-by-step instructions on setting up an SCD stage in Datastage to track changes to dimension data over time. Key steps include linking source and reference tables, configuring the SCD stage properties for tracking historical changes, generating surrogate keys for new records, and defining the population logic to handle new and old dimension rows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
355 views

Datastage Slowly Changing Dimensions

This document provides an overview of slowly changing dimensions (SCDs) and how to implement them using IBM Datastage. It discusses the different types of SCD (Type 1, 2, and multi-tuple) and provides step-by-step instructions on setting up an SCD stage in Datastage to track changes to dimension data over time. Key steps include linking source and reference tables, configuring the SCD stage properties for tracking historical changes, generating surrogate keys for new records, and defining the population logic to handle new and old dimension rows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

More NextBlog

Home

DatastageRelated

DatastageTraining

CreateBlog SignIn

BigData

Unix

Database

InterviewRelated

Certifications

DiscussionForum

Feedback

ManythanksforvisitingmyBlog..!!PleasesharethisblogusingbelowsharebuttonsandleaveyourComments/Feedback/Appreciatio
SEARCHYOURPROBLEMSSOLUTIONINTHISBLOG

Search
Like

Tweet

Share

ShareThisBlog..!!
TRANSLATETHISBLOG

DatastageSlowlyChangingDimensions

VISITOR'SVIEWCOUNT

8 0 6 2 5 9

SelectLanguage

LogIn
DatastageImplementationsSlowlyChangingDimensions

ABOUTME:CLICKONG+BUTTONTOFOLLOWME

Devendra Kumar Yadav

BasicsofSCD
SlowlyChangingDimensions(SCDs)aredimensionsthathavedatathatchangesslowly,ratherthanchangingonatimebased,regularschedule.

Follow
181 followers

Type1
TheType1methodologyoverwritesolddatawithnewdata,andthereforedoesnottrackhistoricaldataatall.
Hereisanexampleofadatabasetablethatkeepssupplierinformation:

Supplier_Key Supplier_Code Supplier_Name


123

ABC

Supplier_State

AcmeSupplyCo CA

Inthisexample,Supplier_CodeisthenaturalkeyandSupplier_Keyisasurrogatekey.Technically,thesurrogatekeyisnotnecessary,sincethe
tablewillbeuniquebythenaturalkey(Supplier_Code).However,thejoinswillperformbetteronanintegerthanonacharacterstring.
NowimaginethatthissuppliermovestheirheadquarterstoIllinois.Theupdatedtablewouldsimplyoverwritethisrecord:

Supplier_Key Supplier_Code Supplier_Name


123

ABC

Supplier_State

AcmeSupplyCo IL

OTHERDATASTAGEQUESTIONSSOLUTIONS

2014(34)
2013(48)

Dec(8)
Nov(15)
Type2

Oct(12)

TheType2methodtrackshistoricaldatabycreatingmultiplerecordsforagivennaturalkeyinthedimensionaltableswithseparatesurrogatekeys
and/ordifferentversionnumbers.WithType2,wehaveunlimitedhistorypreservationasanewrecordisinsertedeachtimeachangeismade.
Inthesameexample,ifthesuppliermovestoIllinois,thetablecouldlooklikethis,withincrementedversionnumberstoindicatethesequenceof

Jan(13)
IBMDataStage8.5NewFeatures

changes:

UseofStagesinDatastage8.5or8xSeries

NewDebugfeatureinDataStage8.5

Supplier_Key Supplier_Code Supplier_Name Supplier_State Version

DSParallelProcessing&PartitionTechniques

123

ABC

AcmeSupplyCo CA

DatastageTransformerStageLoopingconcept

124

ABC

AcmeSupplyCo IL

DataModelingConceptinDatawarehouse

DW&BIConceptsInterviewQuestionsandAnswers

Anotherpopularmethodfortupleversioningistoaddeffectivedatecolumns.

Datastage8xEngine/TiersStartandStopProcess

RT_SCTEMPError:NotabletorunDatastageJobs

Supplier_Key Supplier_Code Supplier_Name Supplier_State Start_Date

ParametersUsingParameter/ValueSet/ValueFile

End_Date

123

ABC

AcmeSupplyCo CA

01Jan2000 21Dec2004

124

ABC

AcmeSupplyCo IL

22Dec2004

ThenullEnd_Dateinrowtwoindicatesthecurrenttupleversion.Insomecases,astandardizedsurrogatehighdate(e.g.99991231)maybeused

DeleteDataStagejobsfromthecommandline
MYMOSTPOPULARFREQUENTLYACCESSEDPOSTS
DatastageSlowlyChangingDimensions
Datastage8.5,8.7and9.1Differences
DiskSpaceEstimation

asanenddate,sothatthefieldcanbeincludedinanindex,andsothatnullvaluesubstitutionisnotrequiredwhenquerying.

DatastageTransformerStageLoopingconcept
2012(4)

HowtoImplementSCDusingDataStage8.1SCDstage?

Datapartitioning&collectingmethodsExamples

Step1:Createadatastagejobwiththebelowstructure

1.

SourcefilethatcomesfromtheOLTPsources

2.

Olddimesionreferncetablelink

3.

TheSCDstage

4.

TargetFactTable

5.

DimesionUpdate/Insertlink

IBMDatastage9.1NewlyAddedfeatures
DATASTAGEPerformanceTuningTipsV1.1
SurrogateKeyGeneratorImplementation
ParametersUsingParameter/ValueSet/ValueFile
UseofStagesinDatastage8.5or8xSeries
DatastageInterviewQuestionsandAnswersV1.4
DatastageScenarioBasedQuestion/Answer:1

LISTOFVISITOR'SCOUNTRIES

RECENTLYVISITEDUSER'SLOCATION

LiveTrafficFeed

Figure1

Step2:TosetuptheSCDpropertiesintheSCDstage,openthestageandaccesstheFastPath

Figure2
Step3:Thetab2ofSCDstageisusedspecifythepurposeofeachofthepulledkeysfromthereferenceddimensiontables.

AvisitorfromMontral,Quebecviewed
"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:SurrogateKey
AvisitorfromMumbai,Maharashtraleft
GeneratorImplementation"4minsago
"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DatastageRelated
AvisitorfromHyderabad,AndhraPradesh
ProblemsandSolutions"viadatastageinfoguid
viewed"DEV'SDATASTAGE
e.blogspot.com11minsago
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DatastageJobsBest
AvisitorfromHyderabad,AndhraPradeshleft
PracticesforTuning"12minsago
"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:Searchresultsfor
AvisitorfromBangalore,Karnatakaviewed
funnelstage"viadatastageinfoguid
"DEV'SDATASTAGE
e.blogspot.com.au12minsago
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:SequentialFileBest
AvisitorfromMumbai,Maharashtraleft
PerformanceTips/Settings"17minsago
"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DatastageRelated
AvisitorfromMumbai,Maharashtraviewed
ProblemsandSolutions"viadatastageinfoguid
"DEV'SDATASTAGE
e.blogspot.com24minsago
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:Conductor
AvisitorfromHyderabad,AndhraPradesh
Node,SectionLeadersandPlayers"35minsago
viewed"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DatastageJobsBest
AvisitorfromGrandRapids,Michiganviewed
PracticesforTuning"37minsago
"DEV'SDATASTAGE

PracticesforTuning"37minsago
"DEV'SDATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:IBMDatastage9.1
AvisitorfromIndiaviewed"DEV'S
NewlyAddedfeatures"40minsago
DATASTAGE
TUTORIAL,GUIDES,TRAININGAND
ONLINEHELP4U.UNIX,ETL,DATABASE
RealtimeviewMenu

DAILYHOROSCOPES

DailyHoroscopes

Aries
Libra
3/214/19
9/2310/22
Taurus
Scorpio
4/205/20
10/2311/21
Figure3

Step4:Tab3isusedtoprovidetheseqencegeneratorfile/tablenamewhichisusedtogeneratethenewsurrogatekeysfortheneworlatest
dimesionrecords.Thesearekeyswhichalsogetpassedtothefacttablesfordirectload.

Gemini
5/216/21

Sagittarius
11/2212/21

Cancer
Capricorn
6/227/22
12/221/19
Leo
Aquarius
7/238/22
1/202/18
Virgo

8/239/22

Pisces
2/193/20

Madebyalbinoblacksheep.comTerms

MYBLOGPOSTS

DEV'SDATAWAREHOUSINGHELPGUIDE
DataStageParalleljobsfailwithfailurecode11

Figure4

Step5:TheTab4isusedtosetthepropertiesforconfiguringthedatapopulationlogicforthenewandolddimensionrows.Thetypeofactivies
thatwecanconfigureasapartofthistabare:

1.

GenerationthenewSurrogatekeyvaluestobepassedtothedimensionandfacttable

2.

Mappingthesourcecolumnswiththesourcecolumn

3.

Settingupoftheexpiredvaluesfortheoldrows

4.

Definingthevaluestomarkthecurrentactiverowsoutofmultipletyperows

Figure5

Step6:Setthederivationlogicforthefactasapartofthelasttab.

Figure6
Step7:Completetheremainingsetup,runthejob

Figure7

+1 Recommend this on Google

Reactions:

Like (0)

Useful (0)

Dislike (0)

WHAT'STHIS?

AROUNDTHEWEB

PBHNetwork

IncrediblePicture
GalleriesOfLifeAround
TheWorld

Lifespan

Stack

14FoodsThatWillMake
YouHappier

'XForce'WillBetheNext
XMenMovie

Web2Carz.com

TheTop5CoolestKit
Cars
ALSOONDK.DSXCHANGEDWBITUTORIAL

DEV'SDATASTAGETUTORIAL,GUIDES,TRAINING
ANDONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:ReadersDiscussionQuestion
DEV'SDATASTAGETUTORIAL,GUIDES,TRAINING
AnswersSection51comments
ANDONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DataModelingConceptin
Datawarehouse1comment

1Comment

DEV'SDATASTAGETUTORIAL,GUIDES,TRAINING
ANDONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:NewDebugfeaturein
DEV'SDATASTAGETUTORIAL,GUIDES,TRAINING
DataStage8.52comments
ANDONLINEHELP4U.UNIX,ETL,DATABASE
RELATEDSOLUTIONS:DatastagePerformance
TuningTipsV1.23comments

DK.DSXchangeDWBITutorial

SortbyNewest

Jointhediscussion
maheshtanpure 2yearsago

Articlegivesgoodunderstandingofimplementation..goodjob

Login

Share Favorite

NewerPost

Home

OlderPost

Subscribeto:PostComments(Atom)

DISCLAIMER

Allcontentprovidedonthishttp://datastageinfoguide.blogspot.inblogisforinformationalpurposesonly.Theownerofthisblogmakesnorepresentationsastotheaccuracyorcompleteness
ofanyinformationonthissiteorfoundbyfollowinganylinkonthissite.Theownerofhttp://datastageinfoguide.blogspot.inwillnotbeliableforanyerrorsoromissionsinthisinformationnorfor
theavailabilityofthisinformation.Theownerwillnotbeliableforanylosses,injuries,ordamagesfromthedisplayoruseofthisinformation.

FINDYOURPROBLEMSSOLUTIONHERE..!

Search

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy