mot
mot

Reputation: 115

Google BigQuery: Unstable tabledata: list behaviour when using startIndex

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.

Upvotes: 2

Views: 199

Answers (1)

Felipe Hoffa
Felipe Hoffa

Reputation: 59245

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

Upvotes: 1

Related Questions