Newer Version Available

This content describes an older version of this product. View Latest

Limits

Note the following limits specific to Bulk API.
API usage limits
Bulk API use is subject to the standard API usage limits. Each HTTP request counts as one call for the purposes of calculating usage limits.
Batch content
Each batch must contain exactly one CSV, XML, or JSON file containing records for a single object, or the batch is not processed and stateMessage is updated. Use the Enterprise WSDL for the correct format for object records.
Batch Allocation
You can submit up to 15,000 batches per rolling 24-hour period. You can’t create batches associated with a job that is more than 24 hours old. If a batch is submitted to a closed job, the batch will not be created, however it will still count against the batch allocation as a submitted batch.
Batch lifespan
Batches and jobs that are older than 7 days are removed from the queue if they are in a terminal state (completed or failed). The seven days are measured from the youngest batch associated with a job, or the age of the job if there are no batches. You can’t create batches associated with a job that is more than 24 hours old.
Batch size
  • Batches for data loads can consist of a single CSV, XML, or JSON file that is no larger than 10 MB.
  • A batch must contain some content or an error occurs.
For binary content limits, see General Limits.
Batch processing time
Batches are processed in chunks. The chunk size depends on the API version. In API version 20.0 and earlier, the chunk size is 100 records. In API version 21.0 and later, the chunk size is 200 records. There’s a 5-minute limit for processing each chunk. Also, if it takes longer than 10 minutes to process a whole batch, the Bulk API places the remainder of the batch back in the queue for later processing. If the Bulk API continues to exceed the 10-minute limit on subsequent attempts, the batch is placed back in the queue and reprocessed up to 10 times before the batch is permanently marked as failed.
Even if the batch failed, some records could have completed successfully. If you get a timeout error when processing a batch, split your batch into smaller batches, and try again.

Bulk queries have an extra 2-minute limit for processing the query, which is separate from the batch processing limit.

Note

Compression
The only valid compression value is gzip. Compression is optional, but recommended. Compression doesn’t affect the character limits defined in Batch size.
Job abort
Any user with correct permission can abort a job. Only the user who created a job can close it.
Job close
Only the user who created a job can close it. Any user with correct permission can abort a job.
Job content
Each job can specify one operation and one object. Batches associated with this job contain records of one object. Optionally, you can specify serial processing mode, which is used only when previously submitted asynchronous jobs have accidentally produced contention because of locks. Use only when advised by Salesforce.
Job external ID
You can't edit the value of an external ID field in JobInfo. When specifying an external ID, the operation must be upsert. If you try to use it with create or update, an error is generated.
Job lifespan
Batches and jobs that are older than 7 days are removed from the queue if they are in a terminal state (completed or failed). The seven days are measured from the youngest batch associated with a job, or the age of the job if there are no batches. You can’t create batches associated with a job that is more than 24 hours old.
Job open time
The maximum time that a job can remain open is 24 hours. The Bulk API doesn't support clients that, for example, post one batch every hour for many hours.
Job status in job history
After a job has completed, the job status and batch result sets are available for seven days after which this data is deleted permanently.
Job status change
When you submit a POST body with a change in job status, you can only specify the status field value. If operation or entity field values are specified, an error occurs.
Portal users
Regardless of whether the “API Enabled” profile permission is granted, portal users (Customer Portal, Self-Service portal, and Partner Portal) can't access Bulk API.
SOQL
Bulk API does not support queries with any of the following:
  • GROUP BY, OFFSET, or TYPEOF clauses
  • Aggregate functions such as COUNT()
  • Date functions in GROUP BY clauses (date functions in WHERE clauses are supported)
  • Compound address fields or compound geolocations fields