arjun kori arjun kori - 3 months ago 18
Node.js Question

Error : Still Getting Error after setting allowLargeResults to true in job configuration?

I have written bigquery in my code.
I want to fetch larger result.

I also set the propertie allowLargeResult:true , But Still i am getting the Error : Response too large to return. Consider setting allowLargeResults to true in your job configuration. For more information, see http

Here is my Node.js Code :

var google = require('googleapis');
var bigquery = google.bigquery('v2');

var authClient = new google.auth.JWT(
null, ['']);

var request2 = {
projectId: 'project-bank',
startIndex: 0,
maxResults: 100000,
timeoutMs: 10000,
allowLargeResults: true
auth: authClient

var list1 =, function(err, result) {
if (err) {
console.log("### 2 " + err);
} else {

Please help !


Your result might be too large to return and you are missing the destination table as that is mandatory when you set allowLargeResults true, as you cannot return large result instead you need to write to a destination table. If you later want to get the data, you need to export the table to GCS and then download from GCS.

Returning large query results

Normally, queries have a maximum response size 128 MB compressed. If you plan to run a query that might return larger results, you can set allowLargeResults to true in your job configuration.

Queries that return large results take longer to execute, even if the result set is small, and are subject to additional limitations:

  • You must specify a destination table.
  • You can't specify a top-level ORDER BY, TOP or LIMIT clause. Doing so negates the benefit of using allowLargeResults, because the query output can no longer be computed in parallel.
  • Window functions can return large query results only if used in conjunction with a PARTITION BY clause.