function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MaxFrielMaxFriel 

Not commiting changes on error in Bulk API data load....

All,

I am using the Bulk Data Api to upsert a large number of records.  If one of those records fails I would not like the successful changes commited.  Is there a way to achieve this.  On the BulkConnection I see there is an abortJob method.  If I abort a job after it has already run through a few batchs will be undo the changes that have already been made?  Is there any easier way to do this?  Thanks in advance for any help. 

MaxFrielMaxFriel

After reading the documentation, aborting the job obviously won't do it.  Has anyone ever done this before?  Any recomendations?

dkadordkador

No, once the changes from a processed batch are committed, there's no way to roll them back.  This is baked into the design of the bulk API - we cannot provide what you're asking for without severely severely affecting processing speed.

MaxFrielMaxFriel

AllOrNone option is not available in the bulk API, it is on the Web Services API

govindb1.396432156444516E12govindb1.396432156444516E12
Hi ,

I am also facing the same issue. I want to rollback the complete batch if any of the record gets failed.

Any solution anyone?