diff --git a/samples/query_no_cache.py b/samples/query_no_cache.py index 7501b7fc0..b942e5010 100644 --- a/samples/query_no_cache.py +++ b/samples/query_no_cache.py @@ -26,8 +26,8 @@ def query_no_cache() -> None: FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus; """ - query_job = client.query(sql, job_config=job_config) # Make an API request. + results = client.query_and_wait(sql, job_config=job_config) # Make an API request. - for row in query_job: + for row in results: print(row) # [END bigquery_query_no_cache]