You are on page 1of 2

6/4/2015

UpdateStrategyTransformationinInformatica

Home

DataWarehouse

Informatica

InformaticaScenarios

Oracle

Unix

Hadoop

Subscribe

UpdateStrategyTransformationinInformatica
Updatestrategytransformationisanactiveandconnectedtransformation.Updatestrategy
transformationisusedtoinsert,update,anddeleterecordsinthetargettable.Itcanalso

Search...

Search

PopularPosts
SedCommandinUnixandLinuxExamples

rejecttherecordswithoutreachingthetargettable.Whenyoudesignatargettable,youneed
todecidewhatdatashouldbestoredinthetarget.
Whenyouwanttomaintainahistoryorsourceinthetargettable,thenforeverychangein
thesourcerecordyouwanttoinsertanewrecordinthetargettable.
Whenyouwantanexactcopyofsourcedatatobemaintainedinthetargettable,thenifthe

TopExamplesofAwkCommandinUnix
FindCommandinUnixandLinuxExamples
CutCommandinUnix(Linux)Examples

sourcedatachangesyouhavetoupdatethecorrespondingrecordsinthetarget.

InformaticaScenarioBasedInterviewQuestionswith
AnswersPart1

Thedesignofthetargettabledecideshowtohandlethechangestoexistingrows.Inthe

StringFunctionsinHive

informatica,youcansettheupdatestrategyattwodifferentlevels:
SessionLevel:Configuringatsessionlevelinstructstheintegrationserviceto
eithertreatallrowsinthesameway(Insertorupdateordelete)oruseinstructions
codedinthesessionmappingtoflagfordifferentdatabaseoperations.
MappingLevel:Useupdatestrategytransformationtoflagrowsforinert,update,
deleteorreject.
FlaggingRowsinMappingwithUpdateStrategy:
Youhavetoflageachrowforinserting,updating,deletingorrejecting.Theconstantsand
theirnumericequivalentsforeachdatabaseoperationarelistedbelow.

SQLQueriesInterviewQuestionsOraclePart1
DateFunctionsinHive
TypesofDimensionsindatawarehouse
GrepCommandinUnixandLinuxExamples

HaveQuestions?FollowMe
vijaybhaskar
Addtocircles

DD_INSERT:Numericvalueis0.UsedforflaggingtherowasInsert.
DD_UPDATE:Numericvalueis1.UsedforflaggingtherowasUpdate.
DD_DELETE:Numericvalueis2.UsedforflaggingtherowasDelete.
DD_REJECT:Numericvalueis3.UsedforflaggingtherowasReject.
Theintegrationservicetreatsanyothernumericvalueasaninsert.
UpdateStrategyExpression:
Youhavetoflagrowsbyassigningtheconstantnumericvaluesusingtheupdatestrategy
expression.Theupdatestrategyexpressionpropertyisavailableinthepropertiestabofthe
updatestrategytransformation.
339havemeincircles

Viewall

Eachrowistestedagainsttheconditionspecifiedintheupdatestrategyexpressionanda
constantvalueisassignedtoit.Asampleexpressionisshowbelow:

IIF(department_id=10,DD_UPDATE,DD_INSERT)

MostlyIIFandDECODEfunctionsareusedtotestforaconditioninupdatestrategy
transformation.
UpdateStrategyandLookupTransformations:
Updatestrategytransformationisusedmostlywithlookuptransformation.Therowfromthe
sourcequalifieriscomparedwithrowfromlookuptransformationtodeterminewhetheritis
alreadyexistsoranewrecord.Basedonthiscomparison,therowisflaggedtoinsertor
updateusingtheupdatestrategytransformation.
UpdateStrategyandAggregatorTransformations:
Ifyouplaceanupdatestrategybeforeanaggregatortransformation,thewaytheaggregator
transformationperformsaggregatecalculationsdependsontheflaggingoftherow.For
example,ifyouflagarowfordeleteandthenlaterusetherowtocalculatethesum,thenthe
integrationservicesubtractsthevalueappearinginthisrow.Ifitsflaggedforinsert,thenthe

http://www.folkstalk.com/2012/05/updatestrategytransformationin.html

1/2

6/4/2015

UpdateStrategyTransformationinInformatica

aggregatoraddsitsvaluetothesum.
ImportantNote:
Updatestrategyworksonlywhenwehaveaprimarykeyonthetargettable.Ifthereisno
primarykeyavailableonthetargettable,thenyouhavetospecifyaprimarykeyinthetarget
definitioninthemappingforupdatestrategytransformationtowork.
RecommendedReading:
UpdateStrategySessionLevelSettings
SQLTransformation
InformaticaScenarios
UpdateStrategyTransformationinInformatica
StoredProcedureTransformationinInformatica
LookupTransformationinInformatica
Ifyoulikethisarticle,thenpleaseshareitorclickonthegoogle+1button.

NewerPost

Home

pnrstatus

http://www.folkstalk.com/2012/05/updatestrategytransformationin.html

OlderPost

privacypolicy

2/2

You might also like