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

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


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. 


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


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.


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

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?