Skip to content

Commit 68ebbe1

Browse files
SalemJordenSalem Boylandkiraksitswast
authored
docs: update client_query_destination_table.py sample to use query_and_wait (#1783)
* docs: update client_query_destination_table.py to use query_and_wait API * docs: update client_query_destination_table.py to use query_and_wait API --------- Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]> Co-authored-by: Tim Swast <[email protected]>
1 parent 6176fcc commit 68ebbe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/client_query_destination_table.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ def client_query_destination_table(table_id: str) -> None:
3232
"""
3333

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

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

0 commit comments

Comments
 (0)