Skip to content

Commit a7be88a

Browse files
SalemJordenSalem Boylandkiraksi
authored
docs: update query_external_sheets_permanent_table.py to use query_and_wait API (#1778)
Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]>
1 parent dbf10de commit a7be88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/query_external_sheets_permanent_table.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def query_external_sheets_permanent_table(dataset_id: str) -> None:
6969
# Example query to find states starting with "W".
7070
sql = 'SELECT * FROM `{}.{}` WHERE name LIKE "W%"'.format(dataset_id, table_id)
7171

72-
query_job = client.query(sql) # Make an API request.
72+
results = client.query_and_wait(sql) # Make an API request.
7373

7474
# Wait for the query to complete.
75-
w_states = list(query_job)
75+
w_states = list(results)
7676
print(
7777
"There are {} states with names starting with W in the selected range.".format(
7878
len(w_states)

0 commit comments

Comments
 (0)