0
votes

I am trying to run a query on BigQuery table and store the the result in locally.

getQueryResults API has maxResult parameter. Which says I can specify maximum number of rows to fetch. However, even after specifying it to 10,000 it fetches only few rows and in random manner.

If I specify it to small number, i.e. 10, then it works perfectly fine.

is there a way I can force to fetch 10,000 rows ?

https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/getQueryResults

1

1 Answers

0
votes

getQueryResults returns up to maxResult rows in the response. If it returns fewer rows, you need to pass the pageToken returned in the response to another getQueryResults call in order to fetch the next page of rows from the server.

The client libraries implement paging so that you don't need to do this yourself