Skip to content

Commit

Permalink
docs: update to use API (#1781)
Browse files Browse the repository at this point in the history
Co-authored-by: Salem Boyland <salemb@google.com>
Co-authored-by: Kira <kirnendra@google.com>
  • Loading branch information
3 people authored Jan 26, 2024
1 parent a7be88a commit 81563b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/query_external_gcs_temporary_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def query_external_gcs_temporary_table() -> None:
# Example query to find states starting with 'W'.
sql = 'SELECT * FROM `{}` WHERE name LIKE "W%"'.format(table_id)

query_job = client.query(sql, job_config=job_config) # Make an API request.
results = client.query_and_wait(sql, job_config=job_config) # Make an API request.

w_states = list(query_job) # Wait for the job to complete.
w_states = list(results) # Wait for the job to complete.
print("There are {} states with names starting with W.".format(len(w_states)))
# [END bigquery_query_external_gcs_temp]

0 comments on commit 81563b0

Please sign in to comment.