So I am new to the Bulk API provided by Salesforce and I was going through their developers guide. I have few questions that need some clarification:
- Bulk API Query part of the guide says that one can retrieve a batch of 1GB at once and one can retrieve 15 such batches. However, I also read that there is a batch size limitation of 10,000 records. Does this apply to Bulk Query also?
- I went through the sample java bulk query code. And the part where the code says: for(int i=0; i<10000; i++) { Thread.sleep(i==0 ? 30 * 1000 : 30 * 1000); //30 sec . . . Many developers have explained that this 10,000 value is being used to set the batch size but I don't get it how is it being used to set the batch size. From my understanding it is just for the number of retries to check if the batch is completed. URL for code location in developer guide: https://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_using_bulk_query.htm
- How does creating a job determines number of batches that need to be created to retrieve all the data. Is it handled automatically? Or do we need write some code to do that?
- Is there a proper code sample available so that I can go through that and understand things.
- How do I use the PK chunking header in Java code?
Thanks, Prateek