I am trying to load a set of Accounts into Salesforce from a CSV file. I have configured the usual Datamapper, Upsert SFDC Step with Batch Commit and a Batch Step that handles only failures (logs for now). My OnComplete has a simple Logger. I have intentionally created CSV with bad data. I have an external ID in the CSV.
My requirement is to process failed records differently based on the failure status. If it failed due to Bad Data, I would like to stop processing the record. If it failed due to Parent Key not found, I would like to retry. My batch Step to process Only errors, doesn't know why it failed. Somehow, I would like to pass the "Why it failed" to my failure processing bacth step.
I'm sure this is a simple pattern, but am unable to figure out how to correlate :(