set dataset_location as the default location. (#1399)

This commit is contained in:
hongye-sun 2019-05-31 19:58:19 -07:00 committed by Kubernetes Prow Robot
parent 87b96a0a7a
commit 88bca8223d
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ def query(query, project_id, dataset_id=None, table_id=None,
Returns:
The API representation of the completed query job.
"""
client = bigquery.Client(project=project_id)
client = bigquery.Client(project=project_id, location=dataset_location)
if not job_config:
job_config = bigquery.QueryJobConfig()
job_config.create_disposition = bigquery.job.CreateDisposition.CREATE_IF_NEEDED