Reporting Processing Failures
As with the ProcessFiles method, a record might fail to be migrated into our destination table. Depending on the mechanism you use to track which records have or have not been successfully inserted into the destination table, you may not have to create any cleanup code.
For instance, if you have a flag on the source table to specify whether a record has been processed, and you fail to migrate the record, you most likely didn’t mark it as complete. If you did, it is probably a bug in your service or database implementation because record duplication should not occur. Therefore the only thing to do is log an error, because the next time you query unprocessed records, any that had failed previously will be attempted again. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access