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
  • Loading branch information
Salem Boyland committed Jan 16, 2024
1 parent 0b5c1d5 commit 19c4e26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/query_external_sheets_permanent_table.py
Original file line number Diff line number Diff line change
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 19c4e26

Please sign in to comment.