Newer Version Available

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

Using Bulk Query

When adding a batch to a bulk query job, the Content-Type in the header for the request must be either text/csv or application/xml, depending on the content type specified when the job was created. The actual SOQL statement supplied for the batch will be in plain text format.

URI
https://instance_name—api.salesforce.com/services/async/APIversion/job/jobid/batch
Bulk Query Request
Bulk API query doesn't support the following SOQL:
  • COUNT
  • ROLLUP
  • SUM
  • GROUP BY CUBE
  • OFFSET
  • Nested SOQL queries
  • Relationship fields

Additionally, Bulk API can’t access or query compound address or compound geolocation fields.

Note

SOAP Headers, Requests, and Responses

The following are example Bulk Query requests and responses.

Create Bulk Query Batch HTTP Request
Create Bulk Query Batch HTTP Response Body
Get Batch Results HTTP Request
Get Batch Results HTTP Response Body
Get Bulk Query Results HTTP Request
Get Bulk Query Results HTTP Response Body

Java Example Using WSC

The following example logs into an organization using the Partner API, then instantiates a BulkConnection object using the service endpoint from the Partner API login.