update failure capturing

Hi All

I have a requirement to capture the failed updates that are issued to the target. more like a no_data_found exception.

And also i nned to capture if any update statements have resulted in more than one update to the target. like sql_row_count<>1 should be captured.

it is just a small exception in the target in pl/sql… how to do it…


dragonwhiz :cn: (BOB member since 2009-09-25)

That’s a good one. Does autocorrect load help? No, I have no idea.


Werner Daehn :de: (BOB member since 2004-12-17)

the thing is even auto correct load wont throw you the error for it. it will correct it and load it… but i need to capture those records whose mentioned op code is wrong ie if the source cdc gives me as U but the record is not present in the target , then i need to log it…


dragonwhiz :cn: (BOB member since 2009-09-25)

The way I did this was to outer join the incoming stream with the target table and then follow that with a CASE transform validating where the primary key IS NOT NULL, then pass the FAILED records to another path where I logged them into an exception table.


Source ---\                      /OK---TC---MapOp---Target
           ---OuterJoin---CASE---
Target ---/                      \FAIL---Qry---ExceptionTarget

nitrobrother :us: (BOB member since 2004-09-08)