Reputation: 59
I have a scenario in ODI 12c where i need to delete the records from target table on a where condition.
SQL Interpretation of ODI Logic:
delete from target table where intergation_table.column <> target_table.column .
is it possible to do in ODI 12c if yes please help me with a solution.
Upvotes: 0
Views: 2363
Reputation: 59
Answer to this is mentioned below, ODI doesn't provide the conditional delete of data based upon source selection so we can modify the KM step to achieve this , Mark the column with user defined flag and use it in the KM , Column name in I$ would be same as target so we can use the same code <%=odiRef.getTargetColList("", "T.[COL_NAME]", ", ", "\n", "UD1")%> in both target and I$ tables:
DELETE FROM <%=odiRef.getTable("L","TARG_NAME","A")%> T
WHERE <%=odiRef.getTargetColList("", "T.[COL_NAME]", ", ", "\n", "UD1")%>
IN
(
SELECT <%=odiRef.getTargetColList("", "[COL_NAME]", ", ", "\n", "UD1")%>
FROM <%=odiRef.getTable("L","INT_NAME","A")%>)
Upvotes: 1