E5FD docs: update `client_query_destination_table.py` sample to use `query_and_wait` by SalemJorden · Pull Request #1783 · googleapis/python-bigquery · 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
5 changes: 3 additions & 2 deletions samples/client_query_destination_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def client_query_destination_table(table_id: str) -> None:
"""

# Start the query, passing in the extra configuration.
query_job = client.query(sql, job_config=job_config) # Make an API request.
query_job.result() # Wait for the job to complete.
client.query_and_wait(
sql, job_config=job_config
) # Make an API request and wait for the query to finish.

print("Query results loaded to the table {}".format(table_id))
# [END bigquery_query_destination_table]
0