How to get OFFSET to work for sql queries using the api through a python script?

since I’ve hit the limit of 10,000 results from a query I wanted to try and get all entries using a while loop, however I can’t seem to get OFFSET to work despite the documentation mentioning its an option. my current query is:

“select _id from {} OFFSET {} limit {}”.format(table_name, offset, limit)

the error im getting is ConnectionError: [Errno 400] {“error_message”:“parse error: unexpected OFFSET near TableName”}. im new to sql as well as the api, so I could imagine this being a classic user error, any help would be appreciated.

I thought I had tried this but apparently you need to do limit first then offset. the documentation says this:
" * Limit options are in MySQL format. The general syntax is OFFSET ... LIMIT .... You may obmit OFFSET or LIMIT."

Thank you for pointing out. We’ll fix the documentation.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.