Académique Documents
Professionnel Documents
Culture Documents
RouterTransformationinODIDWTeam
WelcometoDWTeam
Tue,07Apr2015
Home
ODI
Java
OpenDiscussion
ContactMe
Today'sPopularArticlesandPosts:
Howtosetjdkpathinwindows7
LookupinODI11g
OpenToolinODIusingJava
ConfigureODI11gLocalAgent
RenameAllFilesinaDirectory
TransactionControlinODI
Search
HomeODIRouterTransformationinODI
RouterTransformationinODI:
Wednesday,August29,2012,15:23
ODI[12comments]
RouterTransformationinODI:
HiGuys!!!!
Hereisthepostyouwerelookingfor.IhadtosparefewtimeasIwasgettingsomanyemailsonthis.Youcanreferthispostifyouareinterestedto
usemultipleinterfaceforaccomplishingthesame.Ifyouarethinkingofasingleinterfacethenhereisthesolution.
SourceTable:EMP
Targettable:EMP_TGT1,EMP_TGT2,EMP_TGT3
KM:IKMIncrementalUpdate
Pleasecreatebelowtwotables
createtableTABLE_NAME(
TIDNUMBER,
TNAMEVARCHAR2(30)
)
createtableCONDITION_NAME(
CIDNUMBER,
CNAMEVARCHAR2(15)
)
NowreverseEMP,EMP_TGT1.Dontbotheraboutthat#GET_Tasgiveninbelowimage.Wewilldothatpartattheend.
Nowcreate5odivariablesCHECK_C,CHECK_T,GET_C,GET_T,LOOP
http://dwteam.in/routertransformationinodi/
1/15
4/7/2015
http://dwteam.in/routertransformationinodi/
RouterTransformationinODIDWTeam
2/15
4/7/2015
RouterTransformationinODIDWTeam
CreatetheinterfacewithsourceasEMPandtargetasEMP_TGT1andthenexecuteit.
http://dwteam.in/routertransformationinodi/
3/15
4/7/2015
RouterTransformationinODIDWTeam
Onceaboveinterfacewillrunsuccessfullythencreateafilterasgiveninbelowimage.
http://dwteam.in/routertransformationinodi/
4/15
4/7/2015
RouterTransformationinODIDWTeam
NowcreateanewODIprocedurewithbelowsteps.
http://dwteam.in/routertransformationinodi/
5/15
4/7/2015
http://dwteam.in/routertransformationinodi/
RouterTransformationinODIDWTeam
6/15
4/7/2015
RouterTransformationinODIDWTeam
CreateanewoptionCONDITION_NAMEintheproceduretoprovidetheconditionseparatedbycommas.
JustrightclickonprocedureandclickonNewOption.
Wellnowsaveitandcometothenextstepoftheprocedurethatisinsertconditionsandputbelowcodesinsideit.
declare
CNTNUMBER:=0
CONDVARCHAR2(40):=<%=odiRef.getOption(CONDITION_NAME)%>
begin
SELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL
CNT:=CNT+1
whileCNT!=0loop
INSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT))
http://dwteam.in/routertransformationinodi/
7/15
4/7/2015
RouterTransformationinODIDWTeam
CNT:=CNT1
endloop
end
INSERTINTOTABLE_NAME(TID,TNAME)
SELECTTSEQ.NEXTVAL,TABLE_NAMEFROMUSER_TABLESWHERETABLE_NAMELIKEEMP_TGT%
Nextopenthetargetdatastoreandmodifytheresourcenameto#GET_T.Thisvariablewillreadtablenamesdynamically.Youcansaythisisthe
reverseofloadingmultiplefilestoonetargettablewheresourcedatastorewillkeepthisvariable.
Nowarrangealltheobjectasgiveninbelowdiagram.Remember1stLOOPvariableassignvalue=1andinnextLOOPvariableincrementby1.
SimilarlyCHECK_Tvariableshouldbegreaterthan0inevaluatemode.
http://dwteam.in/routertransformationinodi/
8/15
4/7/2015
RouterTransformationinODIDWTeam
YOuaredone.Letsexecutethepackage.Hereisthesessiondetailsfromoperator.
http://dwteam.in/routertransformationinodi/
9/15
4/7/2015
RouterTransformationinODIDWTeam
Thatsallguys .NothingimpossibleinODIifyoucandevelopthelogic.
Commentsarewelcome.
AbouttheAuthor
Bhabanihaswritten53storiesonthissite.
http://dwteam.in/routertransformationinodi/
10/15
4/7/2015
RouterTransformationinODIDWTeam
CurrentlyBhabaniisworkingasaConsultantatOracle.HehasgoodexpertiseonOracle,OracleDataIntegrator,PervasiveDataIntegrator,
SSAS,SSRSandSSIS.HeisalsocontributinginODIOTNforumforlast3years.HeisfromIndia.Ifyouwanttoreachhimthenpleasevisitcontact
mepage.Ifyouhaveanydoubtsorconcernsontheabovearticle,pleaseputyourquestionhere.DwTeamwilltrytoresponditassoonaspossible.
Alsodontforgettoprovideyourcomments/suggestions/feedbackforfurtherimprovement.Thanksforyourtime.
12ResponsestoRouterTransformationinODI
1.
Pritamsays:
August30,2012at9:59am
ThanksBhabani,FinallyIgotthepost.Manymanythanksforthis.Itscorrectthatthisisjustthereverseofreadingmultiplefilesfromone
folder..Idontknowwhyitdidntcametomymind.ButIliketheIKMMultitableInsert
Reply
2.
Suryasays:
September1,2012at11:37am
HiBhabani,
Itwas100%niceworkout,butinthispostallthe3targettablesdescriptionssame..sowecanacheiveusingevencaseconditionsinmapping
level,buthowwecandodatamovementtomultipletargetswithdiffrentdescriptions(linkeininformatica.
BestRegards,
Surya
Reply
Bhabanisays:
September1,2012at3:09pm
ThenyoushouldgoforIKMmultitableinsert.Tablesofdifferentstructuremeansyouhavetousedifferentinterface.
Reply
3.
key2says:
September1,2012at9:16pm
Itsanicepost.
Reply
4.
lorensays:
September5,2012at7:55am
ThatsgreatworkBhabaniGreatlogicandcustomization.Youguysarereallydoinggreatjob.Nowadaysiamnotseeingmuchreplyfromyou
onOTN.
Reply
5.
RAMsays:
January2,2013at12:48pm
declare
CNTNUMBER:=0
CONDVARCHAR2(40):=
begin
SELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL
CNT:=CNT+1
whileCNT!=0loop
INSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT))
CNT:=CNT1
endloop
end
WHENIAMUSINGTHEABOVEPROCEDUREIGETTHEERROR
ODI1228:TaskLVSH_ROUTERPROCEDURE(Procedure)failsonthetargetORACLEconnectionLVSH_TRG.
CausedBy:java.sql.SQLException:ORA06550:line3,column20:
PLS00103:Encounteredthesymbolwhenexpectingoneofthefollowing:
HOWTORESOLVETHEABOVEERROR
Reply
http://dwteam.in/routertransformationinodi/
11/15
4/7/2015
6.
RouterTransformationinODIDWTeam
RAMsays:
January2,2013at1:13pm
HI,
PLEASEGIVEMETHEREPLYFORTHECAUSEOFERROR
ODI1228:TaskLVSH_ROUTERPROCEDURE(Procedure)failsonthetargetORACLEconnectionLVSH_TRG.
CausedBy:java.sql.SQLException:ORA06550:line3,column20:
PLS00103:EncounteredthesymbolEXCEPTIONwhenexpectingoneofthefollowing:
Reply
7.
RAMsays:
January2,2013at1:14pm
THETARGETCODEIS
declare
CNTNUMBER:=0
CONDVARCHAR2(40):=ExceptiongetOption(CONDITION_NAME):Optiondoesnotexist(CONDITION_NAME)
begin
SELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL
CNT:=CNT+1
whileCNT!=0loop
INSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT))
CNT:=CNT1
endloop
end
Reply
8.
RAMsays:
January2,2013at1:19pm
HiBhabani,
AMDONETHISPROCESS.
STEP1:TAKINGFIVEVARAIBLES
LV_C,LV_T,LV_G_C,LV_G_T,LV_V
STEP2:CREATEDTHEPROCEDUREWITHDROPTABLETABLE_NAME,CONDITIONNAME,DROPSEQ,DROP
SEQ1,CRETAESEQ,CREATESEQ1,INSERTPROCEDURECODE,STEP23:CREATEDTHEOPTION:CONDITION_NAME
Reply
9.
paul.routsays:
March20,2013at8:14am
Thanksalotyouranswersolvedallmyproblemsaftersevearldaysstruggling
Reply
10.
Cnusays:
June29,2013at4:25pm
HiBhabani,
whenitrythiscodeigetthiserror.
BeanShellscripterror:Sourcedfile:inlineevaluationof:out.print(declare\nCNTNUMBER:=0\nCONDVARCHAR2(40):=\u2019)
out.print(odiR...TokenParsingError:Lexicalerroratline2,column28.Encountered:\u201c(8220),after::
BSFinfo:INSERTCONDITIONSatline:0column:columnNo
out.print(declare\nCNTNUMBER:=0\nCONDVARCHAR2(40):=\u2019)
out.print(odiRef.getOption(\u201cCONDITION_NAME\u201d))
out.print(\u2018\nbegin\nSELECTREGEXP_COUNT(COND,\u2019,\u2019)INTOCNTFROMDUAL\nCNT:=CNT+1\nwhileCNT!=0
loop\nINSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,\u2018[^,]+\u2019,1,CNT
))\nCNT:=CNT1\nendloop\nend)
******ORIGINALTEXT******
declare
CNTNUMBER:=0
CONDVARCHAR2(40):=
begin
SELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL
CNT:=CNT+1
http://dwteam.in/routertransformationinodi/
12/15
4/7/2015
RouterTransformationinODIDWTeam
whileCNT!=0loop
INSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT))
CNT:=CNT1
endloop
end
Reply
11.
saisays:
December16,2014at7:45am
Hi,
whenitrythiscodeigotthiserrorbyrunningpackageatinsertconditions
BeanShellscripterror:Sourcedfile:inlineevaluationof:out.print(declare\nCNTNUMBER:=0\nCONDVARCHAR2(100):=\u2019)
out.print(odi...TokenParsingError:Lexicalerroratline2,column28.Encountered:\u201c(8220),after::
BSFinfo:InsertConditionsatline:0column:columnNo
out.print(declare\nCNTNUMBER:=0\nCONDVARCHAR2(100):=\u2019)
out.print(odiRef.getOption(\u201cCONDITION_NAME\u201d))
out.print(\u2018\nbegin\nSELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL\nCNT:=CNT+1\nwhileCNT!=0
loop\nINSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT))\nCNT:=CNT
1\nendloop\nend)
******ORIGINALTEXT******
declare
CNTNUMBER:=0;
CONDVARCHAR2(100):=;
begin
SELECTREGEXP_COUNT(COND,,)INTOCNTFROMDUAL;
CNT:=CNT+1;
whileCNT!=0loop
INSERTINTOCONDITION_NAMEVALUES(CSEQ.NEXTVAL,REGEXP_SUBSTR(COND,[^,]+,1,CNT));
CNT:=CNT1;
endloop;
end;
Reply
LeaveaReply
Youremailaddresswillnotbepublished.Requiredfieldsaremarked*
Name*
Email*
Website
Areyouahuman?
6=thirty
Comment
YoumayusetheseHTMLtagsandattributes:<ahref=""title=""><abbr
title=""><acronymtitle=""><b><blockquotecite=""><cite><code>
<deldatetime=""><em><i><qcite=""><strike><strong>
PostComment
SendmailinODIusingGmailCredentialsdwteam.in
ODIInterviewQuestions
PoweredbyXenataSolutions
http://dwteam.in/routertransformationinodi/
13/15
4/7/2015
http://dwteam.in/routertransformationinodi/
RouterTransformationinODIDWTeam
14/15
4/7/2015
http://dwteam.in/routertransformationinodi/
RouterTransformationinODIDWTeam
15/15