[go: up one dir, main page]

Skip to content

Commit

Permalink
docs: update client_query_w_named_params.py to use query_and_wait
Browse files Browse the repository at this point in the history
… API (#1782)

* docs: update client_query_w_named_params.py to use query_and_wait API

* Update client_query_w_named_params.py

lint

---------

Co-authored-by: Salem Boyland <salemb@google.com>
Co-authored-by: Kira <kirnendra@google.com>
  • Loading branch information
3 people committed Feb 12, 2024
1 parent ab0cf4c commit 89dfcb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/client_query_w_named_params.py
Expand Up @@ -33,8 +33,10 @@ def client_query_w_named_params() -> None:
bigquery.ScalarQueryParameter("min_word_count", "INT64", 250),
]
)
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.word, row.word_count))
# [END bigquery_query_params_named]

0 comments on commit 89dfcb6

Please sign in to comment.