1
votes

We're trying to load 120,000 rows from a BigQuery table using tableData.list. Our first call,

https://www.googleapis.com/bigquery/v2/projects/{myProject}/datasets/{myDataSet}/tables/{myTable}/data?maxResults=90000

returns a pageToken as expected and the first 22482 (1 to 22482) rows. We assume this is due to the 10mb serialized JSON limit. Our second call however,

https://www.googleapis.com/bigquery/v2/projects/{myProject}/datasets/{myDataSet}/tables/{myTable}/data?maxResults=90000&pageToken=CIDBB777777QOGQIBCIL6BIQSC7QK===

returns not the next rows, but 22137 rows starting at row 900001 to the 112137, without a pageToken. Strangely, If we change maxResults to 100,000, we get rows starting from 100,000.

We are able to work around this using startRowIndex to page. In this case, we start with the first call being startRowIndex =0 and we never get a pageToken in the response. We keep making calls until all rows are retrieved. However, the concern is without pageTokens, if the row order changes while the calls are being made, the data could be invalid.

We are able to reproduce this behavior on multiple tables with different sizes and structures.

Is there any issue with paging, or should we be structuring our calls differently?

1

1 Answers

0
votes

This is a known, high priority bug. That has been fixed.