Skip to content

Commit 955a4cd

Browse files
SalemJordenSalem Boylandkiraksi
authored
docs: update the query with no cache sample to use query_and_wait API (#1770)
Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]>
1 parent d1161dd commit 955a4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/query_no_cache.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def query_no_cache() -> None:
2626
FROM `bigquery-public-data.samples.shakespeare`
2727
GROUP BY corpus;
2828
"""
29-
query_job = client.query(sql, job_config=job_config) # Make an API request.
29+
results = client.query_and_wait(sql, job_config=job_config) # Make an API request.
3030

31-
for row in query_job:
31+
for row in results:
3232
print(row)
3333
# [END bigquery_query_no_cache]

0 commit comments

Comments
 (0)