Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: update query_external_sheets_permenent_table.py to use query_and_wait API #1778

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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