+ Start a Discussion

what is the maximum records in result while extract the records using Bulk Query (SOQL)

Hi Experts,

When we use bulk query to extract the records from tables below is the process. (assuming PK chunking is not enable)
1. create a job
2. submit qury in batch
3. check the status of the batch
4. get the result list
5. iterate through result list to get the records from result

I am aware of the limitation mentioned here. like max file size (in one batch) could be of 1gig etc.

What I want to know when we retrieve the records from Result (individual result from result list, step #5 from above) what is the maximum # of records in one result?
Keyur  ModiKeyur Modi
Hi ,

Use the Database.QueryLocator object when you are using a simple query (SELECT) to generate the scope of objects used in the batch job. If you use a querylocator object, the governor limit for the total number of records retrieved by SOQL queries is bypassed. For example, a batch Apex job for the Account object can return a QueryLocator for all account records (up to 50 million records) in an organization. Another example is a sharing recalculation for the Contact object that returns a QueryLocator for all account records in an organization.

Keyur Modi
Thanks Keyur for reply.
I was asking more from BULP API provided by Salesforce.com (not via Apex). When I call Bulk query we follow above pattern. (Sample Java Code can be found here (https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_code_curl_walkthrough.htm))

My question is what is the maximum records which can come in result (under the result list)? If you have already answered it but I could not understand, please help to elaborate in this context.