Skip to content

Commit ef89f9e

Browse files
SalemJordenSalem Boylandkiraksichalmerlowe
authored
Docs: update the query destination table legacy file to use query_and_wait API (#1775)
* docs: update query destination table legacy file to use query_and_wait API * docs: update the query_destination_table_legacy.py to use the query_and_wait API --------- Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]> Co-authored-by: Chalmer Lowe <[email protected]>
1 parent 410f71e commit ef89f9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/client_query_destination_table_legacy.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ def client_query_destination_table_legacy(table_id: str) -> None:
3636
"""
3737

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

4243
print("Query results loaded to the table {}".format(table_id))
4344
# [END bigquery_query_legacy_large_results]

0 commit comments

Comments
 (0)