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 :
<%=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", "","")%>
<%=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?
Use a variable as your resource name in your datastore, then refresh this variable , or pass it as a start up parameter, this gives you dynamic source / target object names, only really works if you have the same set of columns across all your iteration you want to run it for though.
I had gone through this document,and from other sources also got a same answer that it cant be used.But is there a way it can be done?
Actually we have many number of the small tables with just 10 records to be brought into the warehouse.The idea is to instead of doing it via an interface , why not try with a control table with an just the relevant entries and a procedure as above posted code.
Some ideas would help.