0% found this document useful (0 votes)
245 views2 pages

Update Strategy Transformation in Informatica

The update strategy transformation in Informatica is used to insert, update, and delete records in a target table. It can flag rows for insert, update, delete, or reject without modifying the target. The transformation is often used with lookup transformations to determine if a row already exists and needs updating. It can also be placed before aggregator transformations to influence how aggregates are calculated based on the flag. The transformation requires a primary key on the target table in order to function properly.

Uploaded by

Raj
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)
245 views2 pages

Update Strategy Transformation in Informatica

The update strategy transformation in Informatica is used to insert, update, and delete records in a target table. It can flag rows for insert, update, delete, or reject without modifying the target. The transformation is often used with lookup transformations to determine if a row already exists and needs updating. It can also be placed before aggregator transformations to influence how aggregates are calculated based on the flag. The transformation requires a primary key on the target table in order to function properly.

Uploaded by

Raj
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/ 2

Home

DataWarehouse

Informatica

InformaticaScenarios

Oracle

Unix

Hadoop

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

DateFunctionsinHive

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

StringFunctionsinHive
SQLQueriesInterviewQuestionsOraclePart1
GrepCommandinUnixandLinuxExamples
TypesofDimensionsindatawarehouse

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.
657havemeincircles

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

Viewall

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

NewerPost

pnrstatus

Home

OlderPost

privacypolicy

You might also like