1

I am fetching cases from salesforce using python salesforce api. I have more than 800k cases. SOQL query Limit is 2000. if i am using OFFSET also, maximum offset value i can give is 2000. I want to fetch all 800k rows for analysis. i know there is a querymore() method in java . But How to achieve this using python ?

0

You could use either java or python to access either the salesforce SOAP or REST webservices.

SOAP will provide the query locator id that you can use to query more records.

The REST api provides a "nextRecordsUrl" for queries that exceed the set batch size for the query, and it functions essentially the same way. Make sure you are using the

https://<instance>.salesforce.com/services/data/v38.0/query?q=

endpoint and not a custom endpoint that has apex run the query.

2
  • Thanks for the quick response!! i did not notice that there is also a queryall() method available in python rest api , which uses nextrecordsurl to fetch all the data.
    – sabya
    Apr 11 '17 at 9:16
  • Nice, if your application can handle all that data all at once, that sounds like it would be convenient to use.
    – martin
    Apr 11 '17 at 9:18

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.