From de55dd34b9a27f27d2e59d41b2fd800d8c621e47 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Fri, 14 Jun 2019 11:46:05 -0700 Subject: [PATCH 1/3] b/116968956 Remove location as it is now autodetected. See bug b/116968956 . --- bigquery/docs/snippets.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bigquery/docs/snippets.py b/bigquery/docs/snippets.py index b11dccfbfd09..3518e0914693 100644 --- a/bigquery/docs/snippets.py +++ b/bigquery/docs/snippets.py @@ -445,8 +445,6 @@ def test_load_and_query_partitioned_table(client, to_delete): query_job = client.query( sql, - # Location must match that of the dataset(s) referenced in the query. - location="US", job_config=job_config, ) # API request From 1c1175e0ae6ba9724f6ee870a44d4b54b02069bc Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Mon, 17 Jun 2019 10:13:07 -0700 Subject: [PATCH 2/3] Update snippets.py --- bigquery/docs/snippets.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bigquery/docs/snippets.py b/bigquery/docs/snippets.py index 3518e0914693..287ab22412e5 100644 --- a/bigquery/docs/snippets.py +++ b/bigquery/docs/snippets.py @@ -443,10 +443,7 @@ def test_load_and_query_partitioned_table(client, to_delete): bigquery.ScalarQueryParameter("end_date", "DATE", datetime.date(1899, 12, 31)), ] - query_job = client.query( - sql, - job_config=job_config, - ) # API request + query_job = client.query(sql, job_config=job_config) # API request rows = list(query_job) print("{} states were admitted to the US in the 1800s".format(len(rows))) From 01db34da64d89f4e34f6b7c373ab954bceaf0285 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Mon, 17 Jun 2019 10:13:51 -0700 Subject: [PATCH 3/3] Update snippets.py --- bigquery/docs/snippets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bigquery/docs/snippets.py b/bigquery/docs/snippets.py index 287ab22412e5..7c6c6902170d 100644 --- a/bigquery/docs/snippets.py +++ b/bigquery/docs/snippets.py @@ -443,7 +443,8 @@ def test_load_and_query_partitioned_table(client, to_delete): bigquery.ScalarQueryParameter("end_date", "DATE", datetime.date(1899, 12, 31)), ] - query_job = client.query(sql, job_config=job_config) # API request + # API request + query_job = client.query(sql, job_config=job_config) rows = list(query_job) print("{} states were admitted to the US in the 1800s".format(len(rows)))