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

  • 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 '19 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 '19 at 17:46
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.