Skip to content

Commit

Permalink
docs: update query_external_sheets_permanent_table.py to use query_an…
Browse files Browse the repository at this point in the history
…d_wait API (#1778)

Co-authored-by: Salem Boyland <salemb@google.com>
Co-authored-by: Kira <kirnendra@google.com>
  • Loading branch information
3 people committed Jan 26, 2024
1 parent dbf10de commit a7be88a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/query_external_sheets_permanent_table.py
Expand Up @@ -69,10 +69,10 @@ def query_external_sheets_permanent_table(dataset_id: str) -> None:
# Example query to find states starting with "W".
sql = 'SELECT * FROM `{}.{}` WHERE name LIKE "W%"'.format(dataset_id, table_id)

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

# Wait for the query to complete.
w_states = list(query_job)
w_states = list(results)
print(
"There are {} states with names starting with W in the selected range.".format(
len(w_states)
Expand Down

0 comments on commit a7be88a

Please sign in to comment.