2

We've been using the BulkAPI (XML/SOAP) successfully for several months now and were looking to migrate over to the BulkAPI v2.0.

However, when submitting a job (queryAll) to the 2.0 API we're getting a Failed status on the job with query > 4100 chars (this is common query length when doing a Select on ALL fields from Account/Lead/Etc). If I reduce the number of fields to select the query will work.

Has there been a query length change from 1.0 -> 2.0? These queries ran fine on the SOAP API.

Edit: found docs stating SOQL length can be up to 20k https://help.salesforce.com/articleView?id=000333028&language=en_US&type=1&mode=1

2
  • Hey @harlow, a few clarification questions: What's the typical runtime of the query? What is the current COUNT() on the table you're querying from? Is there any error you're seeing other than the Failed status?
    – Brand0R
    Dec 19, 2019 at 15:05
  • 1
    The job completes pretty quickly. I have it on a 15sec ping loop and it's typically done by first or second loop. Always < 30sec. The count is ~100. I set the date range to a small window while testing it out. No other error message besides "Failed" in the job info
    – harlow
    Dec 19, 2019 at 17:46

1 Answer 1

0

Looks like the SOQL WHERE clause only allows 4k chars in v47.0: https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_soslsoql.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .