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 <salemb@google.com> Co-authored-by: Kira <kirnendra@google.com>
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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy