BigQuery-If you get a Reason: responseTooLarge error in Python

error contents

JobExecutingException: Reason:responseTooLarge. Message:Response too large to return. 
Consider setting allowLargeResults to true in your job configuration. For more details, 
see https://cloud.google.com/bigquery/querying-data#largequeryresults

Action example 1

to write_to_table allow_large_results=True To add https://github.com/tylertreat/BigQuery-Python/blob/master/bigquery/client.py#L1032

source example

***.py


    client = get_client(PROJECT_ID,
                        service_account= SERVICE_ACCOUNT,
                        private_key_file=key,
                        readonly=False)
...
    job = client.write_to_table(query, allow_large_results=True)
...
    try:
        job_resource = client.wait_for_job(job, timeout=360)
        print job_resource
    except BigQueryTimeoutException:
        print "Timeout"

Recommended Posts

BigQuery-If you get a Reason: responseTooLarge error in Python
If you encounter a "Unicode Decode Error" in Python
When you get an error in python scraping (requests)
[Python] What to check when you get a Unicode Decode Error in Django
What to do if you get a minus zero in Python
How to get a stacktrace in python
Get a token for conoha in python
If you get a Programming Error: (1146, "Table'<table name>' doesn't exist") in Django
If you get a no attribute error in boto3, check the version
[Python] Get the files in a folder with Python
When I get a chromedriver error in Selenium
Get the caller of a function in Python
Get a glimpse of machine learning in Python
Use a custom error page in python / tornado
Get date in Python
What to do if you get a "No versions found" error in pipenv
I get an Import Error in Python Beautiful Soup
Until you insert data into a spreadsheet in Python
What to do if you get an error when importing matplotlib in Python (Mac)
Get YouTube Comments in Python
Take a screenshot in Python
Create a function in Python
Create a dictionary in Python
Get last month in python
Get Terminal size in Python
Make a bookmarklet in Python
Explicitly get EOF in python
Slice error in python (´ ; ω ; `)
Draw a heart in Python
Get Evernote notes in Python
Get Japanese synonyms in Python
Why do you add a main ()-if statement in Python?
How to import a file anywhere you like in Python
Get the number of specific elements in a python list
Developed a library to get Kindle collection list in Python
I tried "How to get a method decorated in Python"
How to get the last (last) value in a list in Python
How to get a list of built-in exceptions in python
What to do if you get Swagger-codegen in python and Import Error: No module named
Solution if the module is installed in Python but you get an error in Jupyter notebook
What to do if you get a Cannot retrieve metalink for repository error in yum
Get Leap Motion data in Python.
I get a UnicodeDecodeError in mecab-python3
Maybe in a python (original title: Maybe in Python)
Write a binary search in Python
[python] Manage functions in a list
If you get Error: That port is already in use. In Django
Hit a command in Python (Windows)
If you get stuck in Cannot load mkl_intel_thread.dll in Python on Windows
Get data from Quandl in Python
Try to get a list of breaking news threads in Python.
Create a DI Container in Python
I get a KeyError in pyclustering.xmeans
Get the desktop path in Python
Do you need a Python re.compile?
Draw a scatterplot matrix in python
Until you put Python in Docker
Write A * (A-star) algorithm in Python
How to get a string from a command line argument in python
Get the script path in Python
Create a binary file in Python