From 3152a31bc026ec97045105ae4e69d631a9d63c82 Mon Sep 17 00:00:00 2001 From: Salem Boyland Date: Thu, 11 Jan 2024 15:51:55 -0600 Subject: [PATCH] docs: update the query w/ array params sample to use query_and_wait API --- samples/client_query_w_array_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client_query_w_array_params.py b/samples/client_query_w_array_params.py index 25592a94a..341e983b6 100644 --- a/samples/client_query_w_array_params.py +++ b/samples/client_query_w_array_params.py @@ -35,8 +35,8 @@ def client_query_w_array_params() -> None: bigquery.ArrayQueryParameter("states", "STRING", ["WA", "WI", "WV", "WY"]), ] ) - query_job = client.query(query, job_config=job_config) # Make an API request. + results = client.query_and_wait(query, job_config=job_config) # Make an API request. - for row in query_job: + for row in results: print("{}: \t{}".format(row.name, row.count)) # [END bigquery_query_params_arrays]