From 89f1299b3164b51fb0f29bc600a34ded59c10682 Mon Sep 17 00:00:00 2001 From: Stephanie A <129541811+DevStephanie@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:18:16 -0600 Subject: [PATCH] docs: Updates `query` to `query and wait` in samples/desktopapp/user_credentials.py (#1787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updates file * Updates files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Updates * edits --------- Co-authored-by: Owl Bot --- samples/desktopapp/user_credentials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/desktopapp/user_credentials.py b/samples/desktopapp/user_credentials.py index 487a56c5f..68236d126 100644 --- a/samples/desktopapp/user_credentials.py +++ b/samples/desktopapp/user_credentials.py @@ -61,10 +61,10 @@ def main(project: str) -> None: WHERE name = 'William' GROUP BY name; """ - query_job = client.query(query_string) + results = client.query_and_wait(query_string) # Print the results. - for row in query_job.result(): # Wait for the job to complete. + for row in results: # Wait for the job to complete. print("{}: {}".format(row["name"], row["total"])) # [END bigquery_auth_user_query]