Tuesday, 10 July 2012

ODI Actions Using getSrcTableList


Using getSrcTableList

The following example concatenates the list of the source tables of an interface for logging purposes.
For following KM code:
insert into MYLOGTABLE
(
INTERFACE_NAME,
DATE_LOADED,
SOURCE_TABLES
)
values
(
'<%=odiRef.getPop("POP_NAME")%>',
current_date,
'' <%=odiRef.getSrcTablesList("|| ", "'[RES_NAME]'", " || ',' || ", "")%>
)
Generates the following statement:
insert into MYLOGTABLE
(
INTERFACE_NAME,
DATE_LOADED,
SOURCE_TABLES
)
values
(
'Int. CUSTOMER',
current_date,
'' || 'SRC_CUST' || ',' || 'AGE_RANGE_FILE' || ',' || 'C$0_CUSTOMER'
)

No comments:

Post a Comment