This discussion is archived
4 Replies Latest reply: Jan 29, 2013 10:12 PM by 901916 RSS

Can substitution methods other than the Global be used in a procedure ?

901916 Explorer
Currently Being Moderated
Hi All,

I am very much new to ODI .Apologies if the question seems silly.
As part of an exercise I am working with ODI variables and substitution methods.
My question is substitution methods like odiRef.getColList,odiRef.getFrom,getTargetColList() used in KM's for Code Generation while executing an interface,
can they be used in a ODI procedure giving the necessary parameters as they require .

Eg : Command on source :
select     
     <%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "")%>
from <%=odiRef.getObjectName( "TABLE_NAME" )%>

Command on target :
insert into <%=odiRef.getTable("L", "TABLE_NAME", "D")%>
(
     <%=odiRef.getColList("", "[CX_COL_NAME]", ",\n\t", "","")%>
)
values
(
     <%=odiRef.getColList("", ":[CX_COL_NAME]", ",\n\t", "","")%>
)
Ofcourse ,this is what an interface does but my requirement is to pass table name as variables and run this code iteratively to load targets,which again will be passed as variable.
Will this run as a ODI procedure ?I tried and am getting exception errors.The getobjectName being global works fine with the proper table name generated in the code,but the getCollist does not work .Hence wanted to know if this standalone procedure is possible or will this code run only as part of KM over a interface?

Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points