Skip to content

Commit

Permalink
Docs: update the query destination table legacy file to use query_and…
Browse files Browse the repository at this point in the history
…_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 <salemb@google.com>
Co-authored-by: Kira <kirnendra@google.com>
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
  • Loading branch information
4 people committed Jan 25, 2024
1 parent 410f71e commit ef89f9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions samples/client_query_destination_table_legacy.py
Expand Up @@ -36,8 +36,9 @@ def client_query_destination_table_legacy(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_legacy_large_results]

0 comments on commit ef89f9e

Please sign in to comment.