• Christopher Currie
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All,

We believe we've hit a bug with the BULK API. When trying to perform a large query using PKChunking and an ORDER BY keyword the query fails.

Specifically, it appears that the BULK API is trying to submit multiple batches on different ranges (as it should), but since it's appending the range filter after the ORDER BY clause it's failing with the following error:

(msg=InvalidBatch : Failed to process query: MALFORMED_QUERY: Field_name FROM Account ORDER BY Id where Id >= '001150000yyyyyy' and ^ ERROR at Row:1:Column:xxxx unexpected token: 'where'), aborting

A sample SOQL query that will fail when Sforce-Enable-PKChunking header is set to True:

'SELECT Id,Name from Account ORDER BY Id'

Any suggestions/thoughts would be highly appreciated!

Thanks in advance,
Ariel.