0

I understand query_all and query_more, but I can't seem to get more than 2000 records from an external data source object. I've tried this a few ways, and below is Python. Note that if I use the (commented-out) Asset query, the initial results['done'] is false and we get all (250K) records. However, on items_my_Sharepoint__x (fake name for this post), 2000 records are returned and the initial results['done'] is True.
Any thoughts on why this is and how to get more than 2000 records on this external data source object?

i=0  
query = "SELECT DownloadUrl__c,  Name__c FROM items_my_Sharepoint__x"
#query = "SELECT Id FROM Asset"
results = SF.sf_service.query(query)
for record in results['records']:
    i=i+1

print results['done']

while (results['done']==False):
    results = SF.sf_service.query_more(results['nextRecordsUrl'], True)
    for record in results['records']:
        i=i+1
print i  

  
8

Your Answer

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

Browse other questions tagged or ask your own question.