2
votes

When we need to fetch whole table data from BQ, it's easy to do it with tabledata: list - https://cloud.google.com/bigquery/docs/reference/v2/tabledata/list . We use startIndex and maxResults for pagination.

The problem is that sometimes startIndex stops working and we get data always from row 0 to maxResults. After several hours it works again.

We found out that it happens 3-5 hours after table creation and/or streaming inserts in it. First hours everything is ok, then startIndex not working, than ok again.

1
Can you share your project_id and a few timestamps for when you observed these incorrect responses?Michael Sheldon
Michael, just now (22.11.2014 22:56 UTC+3) GET googleapis.com/bigquery/v2/projects/docdoc-01/datasets****/tables/requests_d*****_11_2014/data?maxResults=1&startIndex=100 or 1 - the same row returned.mot
@MichaelSheldon, any news so far?mot

1 Answers

1
votes

For a more robust solution, prefer using "pageToken" instead of paginating with "startIndex".