Hi All ,
I have tried to implement CDC on Views , i have imported the customized JKM ,
i have developed interface by dragging view in source and table in target ,
i have executed it before checking the Jounalization data only box ,
all records from source to target transferred successfully ,
now i have checked the Jounalization data only box and i have added a new row in source from backend then
immediateley it got reflected in view and i executed that interface again then i can see the new row in target also ,
this is because of CDC on View and i have done updation also , it worked successfully , but when i delete a row in source
and execute that interface it is not working .
Is there any seperate process to handle deleted records in CDC ?
What IKM are you using?
There is an option 'SYNC_JRN_DELETE' in 'IKM Oracle Incremental Update' that does what your looking for, using this :
delete from <%=odiRef.getTable("L","TARG_NAME","A")%>
where exists (
from <%=odiRef.getTable("L","INT_NAME","A")%> <%=odiRef.getInfo("DEST_TAB_ALIAS_WORD")%> I
where <%=odiRef.getColList("", odiRef.getTable("L","TARG_NAME","A") + ".[COL_NAME] = I.[COL_NAME]", "\n\t\tand \t", "", "UK")%>
and IND_UPDATE = 'D'
I dont know how your cdc is working for insert and update using instead of trigger. If your are doing dml operation on your table, then are you able to see them in the J$ table ????
Again if you are doing DML operation on the view having a instead of trigger then you might get records in J$ table but is it reflecting in the base table ??
Then I believe CDC is not going work here. Because your trigger created on a view.
You follow the generic process. you may go for using flex field or else you can go for the alternative ,me and Sutirtha were talking in other thread. delete rows in the target table using odi interface
copy the code generated for that step and pest it here. What are the key columns you have defined (please provide here for both source and target) ???
Try with the other way that is UD flag. mark the specific column as UD1 and then use below codes
delete from <%=snpRef.getTable("L","TARG_NAME","A")%>
(<%=snpRef.getColList("","[COL_NAME]", ", ", "", "(UD1)")%>) IN
(select <%=snpRef.getColList("","[COL_NAME]", ", ", "", "(UD1)")%> from <%=snpRef.getTable("L","INT_NAME","A")%>)