Skip to content

Commit

Permalink
BigQuery Snippets: Use autodetected location (#8341)
Browse files Browse the repository at this point in the history
  • Loading branch information
grant authored and busunkim96 committed Jun 18, 2019
1 parent 0737737 commit 7dc367e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bigquery/docs/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +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,
# Location must match that of the dataset(s) referenced in the query.
location="US",
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)))
Expand Down

0 comments on commit 7dc367e

Please sign in to comment.