Can I know how to identify which record failed while insertion using Batch Insert


In my integration i am subscribing the canonical which is having many records (10K+) these records I am trying to insert using bacth insert adapter service with JDBC connection in the DB table,

Please anyone can suggest how do i track from this many of records exactly at which record insertion is failed so that i can track done and make the changes in the record, I dont no if there any built-in service is there to track the batch insert…

There is no way you can track which record failed or put a error handling sequence (try/catch while doing the batchInsert call handing the commit/rollback scenarios) it can help track down the exact error info when db returns back:


Thank you RMG …

the same stratergy used for checking the records failed which is as follows

step 1: execute the batch insert in a loop until size of list is not null
step 2: under loop used inner try catch block which will try to insert all records
step 3: if success exit from loop
step 4: if failure find out how many records inserted and which insertion got failed using select sql service.
keep a track of failed record .
trim down the list of records to next to the record got failed to insert.
and goto step 1 with remaining records.

OK as long it works for you: