We are implementing a Bulk API V2 client in order to insert hundreds of thousands of records. Our current implementation is the following :
- first we create a job
- we add a batch containing all the record to insert and add it to the created batch
- we close the job so salesforce can start the processing of the records.
Salesforce automatically creates chunks of 200 records from the uploaded data :
The problem is that our triggers and workflows are quite complicated, and inserting 200 records in a single apex transaction hits governor limits (CPU time).
Is it possible to reduce the chunk size to 50 records for example ? I see no options in the bulk api allowing that.
Or do we need to go back to Bulk API V1 to do that ?
Thanks for your help.