Working with Bulk Insert Error Handling

To familiarize you with the work flow of bulk insert error handling, an example is provided.

In this example, the adapter attempts to execute a bulk insert that contains the following five records. Here, correct means a record without errors and wrong means a record with errors.
  • M1 (correct)
  • M2 (wrong)
  • M3 (correct)
  • M4 (correct)
  • M5 (wrong)
Based on the prerequisites in Prerequisites of Using Bulk Insert Error Handling, the following process shows how bulk insert error handling handles these five records:
  1. When the bulk commit size arrives, the adapter starts to commit this bulk insert into the database.
  2. When the adapter hits the error message (M2), bulk insert error handling inserts this error message into the exceptions table.
  3. Then the adapter handles the remaining records, and when it hits the error record (M5), bulk insert error handling inserts this error record into the exceptions table.
  4. Check the database after processing the bulk insert operation, you can see that all error records (M2 and M5) are in the exceptions table, and the correct records (M1, M3, and M4) are in the destination table.
Note: If an adapter configuration contains multiple services of Subscription Service, each service handles an exception logic based on its own configurations. Therefore, the exception logic of each service might be different.