I'm using Python to run a query on a BigQuery dataset and then put the results into a Python dataset. The query runs OK; I can see a temporary table is created for the results in the dataset in BQ, but when using the query client's to_dataset method, it falls over on the 504 Deadline Exceeded error
client = bigquery.Client( credentials=credentials, project= projectID )
dataset = client.dataset('xxx')
table_ref = dataset.table('xxx')
JobConfig = bigquery.QueryJobConfig(destination = table_ref)
client.delete_table(table_ref, not_found_ok=True)
QueryJob = client.query(queryString, location='EU', job_config=JobConfig)
QueryJob.result()
results = client.list_rows(table_ref, timeout =100).to_dataframe()
It all runs fine until the last line. I've added a timeout argument to the list_rows method, but it hasn't helped.
I'm running this on a Windows virtual machine, with Python 3.8 installed.
(I've also tested the same code on my laptop and it worked just fine - don't know what's different.)