8000 BigQuery Snippets: Use autodetected location by grant · Pull Request #8341 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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