Skip to content

Commit

Permalink
docs: update client_query_destination_table.py to use query_and_wait API
Browse files Browse the repository at this point in the history
  • Loading branch information
Salem Boyland committed Jan 23, 2024
1 parent 7741d8a commit 82ac16f
Showing 1 changed file with 3 additions and 2 deletions.
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.
request = client.query_and_wait(sql, job_config=job_config) # Make an API request.
request.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 comments on commit 82ac16f

Please sign in to comment.