sir it will be bit ok but my problem is i want to set the value of V_cond variable either while using this variable at package in variable properties (step type=set_variable)
and in value i want to write dynamic query that that retrieve data from db at runtime on my desired condition then i will set that value to variable
can it be possible ..............
or 2nd question is
or can we use substitution API(<% odiref.getTable("TARG_NAME") %>) in procedure so that i can dynamically retrieve the table name from interface
Mr. FPonte can i write this query will this query be executed.........
select status from source.x
where table_name='<% odiref.getTable("TARG_NAME") %>';
if it is not possible then why? or if it is possible then how any logical reason? because it returns the target table name from ddl of currently used table in the interface while we are not calling that function in any particular interface
Yes, you can. Just be careful the way you call the ODI API. I think its case sensitive.
I did a test, created an interface that load a temporary table. The interface creates the target table and write one row to it.
My Mapping was like this:
Source Datastore (You can use any other table):
TB_TEMP_TABLE (RECORDID number) Alias T1
Target Datastore - TB_MYTEST
Column - Mapping
RECORDID - T1,ID
MY_TABLE_NAME - '<%=odiRef.getTable("L","TARG_NAME","D")%>'
The result was the target table TB_MYTEST with the following row:
Please, have a look at this documentation. It will be helpful.
no mr.FPonte ......
because when u write this '<%=odiRef.getTable("L","TARG_NAME","D")%>'
in variable how it will pick the target table.
if u use this in particular interface he can easily pick the target table of that particular interface in which it is being used .................................
Elaborate Please ......
It's an internal ODI function. If you use this construction this function will get from the current interface.
Review this link.