Professional Documents
Culture Documents
CompletereferencetoInformatica:SCDType1
Data WareHousing
INTRODUCTION
ETLLifeCycle
WhatIsInformatica
ClientComponents
Unix-Shell Scripts
PL SQL
Contact Us
PERFORMANCE TUNING
Sunday,17April2011
SCDType1
NecessityOfPerformancetuning
IdentificationOfbottleNecks
OptimizationofBottlenecks
ServicesBehindScene
SlowlyChangingDimensions(SCDs)aredimensionsthathavedatathatchanges
PerformancetuningofLookup
TryURHand'sonAdmin
Console
slowly,ratherthanchangingonatimebased,regularschedule
PushDownOptimization
Forexample,youmayhaveadimensioninyourdatabasethattracksthesalesrecordsof
TESTING
DifferenceBetween7.1
and8.6
Informatica8.6
Installation
ADVANCED CONCEPTS
MappingParameter's&
Variable
Mapplets
Partitioning
yourcompany'ssalespeople.Creatingsalesreportsseemssimpleenough,untila
salespersonistransferredfromoneregionalofficetoanother.Howdoyourecordsucha
UnitTesting
changeinyoursalesdimension?
IntegrationTesting
Youcouldsumoraveragethesalesbysalesperson,butifyouusethattocomparethe
performanceofsalesmen,thatmightgivemisleadinginformation.Ifthesalespersonthat
UAT
InformaticaTesting
wastransferredusedtoworkinahotmarketwheresaleswereeasy,andnowworksina
Debugger
marketwheresalesareinfrequent,hertotalswilllookmuchstrongerthantheother
ConstraintBasedloading
salespeopleinhernewregion,eveniftheyarejustasgood.Oryoucouldcreateasecond
TargetLoadPlan
salespersonrecordandtreatthetransferredpersonasanewsalesperson,butthat
createsproblemsalso.
INTERVIEW ZONE
Scheduler
DealingwiththeseissuesinvolvesSCDmanagementmethodologies:
InformaticaRealTimeInterviewQuestions
TypesofTask's1
Type1:
InformaticaExperiencedInterview
Questionspart1
Workingwithlinks
TypesofTask's2
IndirectMethodfor
Loading
SCDType1
SCDType2
SCDType3
TheType1methodologyoverwritesolddatawithnewdata,andthereforedoesnottrack
historicaldataatall.Thisismostappropriatewhencorrectingcertaintypesofdataerrors,
misspelledinthepast.)
InformaticaExperiencedInterview
Questionspart3
Hereisanexampleofadatabasetablethatkeepssupplierinformation:
InformaticaExperiencedInterview
Questionspart4
DataWarehousingconceptBasedInterview
Questions
suchasthespellingofaname.(Assumingyouwon'teverneedtoknowhowitusedtobe
IncrementalAggregation
MappingTemplates
InformaticaExperiencedInterview
Questionspart2
GridProcessing
FrequentlyUsed
Functions
WorkFlowVariables
TRANSFORMATION
Filter
Expression
Router
Sorter
Rank
TransactionControl
SourceQualifier
StoredProcedure
123
ABC
TOTAL VISITS
Inthisexample,Supplier_CodeisthenaturalkeyandSupplier_Keyisasurrogatekey.
Technically,thesurrogatekeyisnotnecessary,sincethetablewillbeuniquebythe
naturalkey(Supplier_Code).However,thejoinswillperformbetteronanintegerthanona
characterstring.
NowimaginethatthissuppliermovestheirheadquarterstoIllinois.Theupdatedtable
wouldsimplyoverwritethisrecord:
FEEDS
Supplier_Key Supplier_Code Supplier_Name Supplier_State
123
ABC
AcmeSupplyCo IL
SQLTransformation
Normalizer
SequenceGenerator
Aggregator
17
AcmeSupplyCo CA
TheobviousdisadvantagetothismethodofmanagingSCDsisthatthereisnohistorical
recordkeptinthedatawarehouse.Youcan'ttellifyoursuppliersaretendingtomoveto
DISCUSSION FORUM
DiscussionForum
Share 512people
likethis.
theMidwest,forexample.ButanadvantagetoType1SCDsisthattheyareveryeasyto
maintain.
Union
Joiner
UpdateStrategy
ExplanationwithanExample:
SourceTable:(010111)TargetTable:(010111)
LookUp
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
1/6
5/14/2016
CompletereferencetoInformatica:SCDType1
Empno
Ename
Sal
101
1000
102
2000
Enteryouremailaddress:
Subscribe
DeliveredbyFeedBurner
103
3000
Empno
Ename
Sal
101
1000
102
2000
103
3000
Thenecessityofthelookuptransformationisillustratedusingtheabovesourceandtarget
table.
SourceTable:(010211)TargetTable:(010211)
Empno Ename
Sal
Empno
Ename
Sal
101
1000
101
1000
102
2500
102
2500
103
3000
103
3000
104
4000
104
4000
InthesecondMonthwehaveonemoreemployeeaddeduptothetablewiththe
EnameDandsalaryoftheEmployeeischangedtothe2500insteadof2000.
Step1:IstoimportSourceTableandTargettable.
Createatablebynameemp_sourcewiththreecolumnsasshownaboveinoracle.
Importthesourcefromthesourceanalyzer.
Inthesamewayasabovecreatetwotargettableswiththenamesemp_target1,
emp_target2.
GotothetargetsMenuandclickongenerateandexecutetoconfirmthecreationof
thetargettables.
Thesnapshotoftheconnectionsusingdifferentkindsoftransformationsareshown
below.
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
2/6
5/14/2016
CompletereferencetoInformatica:SCDType1
Step2:Designthemappingandapplythenecessarytransformation.
Hereinthistransformationweareabouttousefourkindsoftransformationsnamely
Lookuptransformation,ExpressionTransformation,FilterTransformation,Update
Transformation.Necessityandtheusageofallthetransformationswillbe
discussedindetailbelow.
LookupTransformation:Thepurposeofthistransformationistodeterminewhetherto
insert,Delete,Updateorrejecttherowsintotargettable.
Thefirstthingthatwearegoannadoistocreatealookuptransformationand
connecttheEmpnofromthesourcequalifiertothetransformation.
ThesnapshotofchoosingtheTargettableisshownbelow.
WhatLookuptransformationdoesinourmappingisitlooksintothetargettable
(emp_table)andcomparesitwiththeSourceQualifieranddetermineswhetherto
insert,update,deleteorrejectrows.
InthePortstabweshouldaddanewcolumnandnameitasempno1andthisis
columnforwhichwearegonnaconnectfromtheSourceQualifier.
TheInputPortforthefirstcolumnshouldbeunchkedwhereastheotherportslike
Outputandlookupboxshouldbechecked.Forthenewlycreatedcolumnonlyinput
andoutputboxesshouldbechecked.
InthePropertiestab(i)Lookuptablename>Emp_Target.
(ii)LookupPolicyonMultipleMismatch>useFirstValue.
(iii)ConnectionInformation>Oracle.
IntheConditionstab(i)ClickonAddanewcondition
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
3/6
5/14/2016
CompletereferencetoInformatica:SCDType1
(ii)LookupTableColumnshouldbeEmpno,TransformationportshouldbeEmpno1and
Operatorshould=.
ExpressionTransformation:AfterwearedonewiththeLookupTransformationweare
usinganexpressiontransformationtocheckwhetherweneedtoinserttherecordsthe
samerecordsorweneedtoupdatetherecords.ThestepstocreateanExpression
Transformationareshownbelow.
Dragallthecolumnsfromboththesourceandthelookuptransformationanddrop
themallontotheExpressiontransformation.
NowdoubleclickontheTransformationandgotothePortstabandcreatetwonew
columnsandnameitasinsertandupdate.Boththesecolumnsaregonnabeour
outputdatasoweneedtohavecheckmarkonlyinfrontoftheOutputcheckbox.
TheSnapshotfortheEdittransformationwindowisshownbelow.
Theconditionthatwewanttoparsethroughouroutputdataarelistedbelow.
InputIsNull(EMPNO1)
Outputiif(Notisnull(EMPNO1)andDecode(SAL,SAL1,1,0)=0,1,0).
Wearealldonehere.ClickonapplyandthenOK.
FilterTransformation:wearegonnahavetwofiltertransformationsonetoinsertand
othertoupdate.
ConnecttheInsertcolumnfromtheexpressiontransformationtotheinsertcolumn
inthefirstfiltertransformationandinthesamewaywearegonnaconnectthe
updatecolumnintheexpressiontransformationtotheupdatecolumninthesecond
filter.
LaternowconnecttheEmpno,Ename,Salfromtheexpressiontransformationto
bothfiltertransformation.
Ifthereisnochangeininputdatathenfiltertransformation1forwardsthecomplete
inputtoupdatestrategytransformation1andsameoutputisgonnaappearinthe
targettable.
Ifthereisanychangeininputdatathenfiltertransformation2forwardsthe
completeinputtotheupdatestrategytransformation2thenitisgonnaforwardthe
updatedinputtothetargettable.
GotothePropertiestabontheEdittransformation
(i)Thevalueforthefiltercondition1isInsert.
(ii)Thevalueforthefiltercondition1isUpdate.
TheCloserviewofthefilterConnectionisshownbelow.
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
4/6
5/14/2016
CompletereferencetoInformatica:SCDType1
UpdateStrategyTransformation:Determineswhethertoinsert,delete,updateorreject
therows.
DragtherespectiveEmpno,EnameandSalfromthefiltertransformationsanddrop
themontherespectiveUpdateStrategyTransformation.
NowgotothePropertiestabandthevaluefortheupdatestrategyexpressionis0
(onthe1stupdatetransformation).
NowgotothePropertiestabandthevaluefortheupdatestrategyexpressionis1
(onthe2ndupdatetransformation).
Weareallsetherefinallyconnecttheoutputsoftheupdatetransformationstothe
targettable.
Step3:CreatethetaskandRuntheworkflow.
Dontcheckthetruncatetableoption.
ChangeBulktotheNormal.
Runtheworkflowfromtask.
Step4:PreviewtheOutputinthetargettable.
PostedbyNaveenatSunday,April17,2011
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
5/6
5/14/2016
CompletereferencetoInformatica:SCDType1
Nocomments:
PostaComment
Enteryourcomment...
Commentas:
Publish
GoogleAccount
Preview
Linkstothispost
CreateaLink
http://informaticatutorialsnaveen.blogspot.in/2011/04/scdtype1.html
6/6