2
votes

In the API Docs section Browsing Table Data, there is a reference to the "permitted response data size"; however, that link is dead. Experimentation revealed that requests with maxResults=50000 are usually successful, but as I near maxResults=100000 I begin to get errors from the BigQuery server.

This is happening while I page through a large table (or set of query results), so after each page is received, I request the next one; it thus doesn't matter to me what the page size is, but it does affect the communication with BigQuery.

What is the optimal value for this parameter?

2

2 Answers

3
votes

Here is some explanations: https://developers.google.com/bigquery/docs/reference/v2/jobs/query?hl=en

The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.

To sum up: max size is 10MB, no row count limit.

You can choose value of maxResult parameter based on your usage of app. If you want show data on the report, then you need to set low value for fast showing first page. If you need to load data to other app, then you can use max possible value (record size * row count < 10MB).

0
votes

As you say, you manually set maxResults = 100000 to page through result set, it will get errors from BigQuery server. What errors you will get? Could you paste the error message?