Skip to content

BigQuery NextPageToken incorrectly returns null #4678

@cometfish

Description

@cometfish

At some point the NextPageToken field on BigQueryPage stopped working - it was working previously, but now it is always set to null.
I had not changed anything in my code, so I suspect the Google BigQuery API might have changed and broken something...?

Sample code:

BigQueryJob job = bqclient.CreateQueryJob("SELECT * FROM mytable", query_params, query_options);

BigQueryJob result;
do
{
    Thread.Sleep(500);
    result = bqclient.GetJob(job.Reference);
} while (result.Status.State.ToUpper() == "PENDING" || result.Status.State.ToUpper() == "RUNNING");

BigQueryResults res = result.GetQueryResults();
BigQueryPage page = res.ReadPage(100);

At the end of this code, res.TotalRows was 233, page.Rows.Count was 100, but page.NextPageToken was null

(I have since rewritten my code to use bqclient.ExecuteQuery() instead, but thought you might want to look into it.)

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions