I'm trying to list the data in a table using the python api:
tableDataList = tableDataCollection.list(**params).execute(http=http)
Allowed params:
list(projectId=*, datasetId=*, tableId=*, pageToken=None, maxResults=None, startIndex=None)
The error I receive is:
apiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/bigquery/v2/projects/myproject/queries?alt=json returned "Response too large to return.">
Currently I create a query job and receive the destinationTable back, and on that destinationTable I list the data (for performance among other). I've read that I can use allowLargeResults
but I can't find it on the tabledata.list
or jobs.query
endpoints. Where do I set that or how do I overcome issue? Data is only about 90mb for 97k rows.
UPDATE:
I've changed the query to use a destination table (with jobs.insert
) on which I can then set the allowLargeResults
to True
.
body = {
'configuration': {
'query': {
'createDisposition': 'CREATE_IF_NEEDED',
'writeDisposition': 'WRITE_TRUNCATE',
'useQueryCache': False,
'allowLargeResults': True,
'destinationTable': {
'projectId': PROJECT_ID,
'datasetId': DATASET_ID,
'tableId': 'tmp_{0}'.format(TABLE_ID),
},
'query': query,
}
}
}
However, I still receive the same error:
ResponseTooLarge: Response too large to return.