Skip to content

Commit 89dfcb6

Browse files
SalemJordenSalem Boylandkiraksi
authored
docs: update client_query_w_named_params.py to use query_and_wait 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 <[email protected]> Co-authored-by: Kira <[email protected]>
1 parent ab0cf4c commit 89dfcb6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

samples/client_query_w_named_params.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ def client_query_w_named_params() -> None:
3333
bigquery.ScalarQueryParameter("min_word_count", "INT64", 250),
3434
]
3535
)
36-
query_job = client.query(query, job_config=job_config) # Make an API request.
36+
results = client.query_and_wait(
37+
query, job_config=job_config
38+
) # Make an API request.
3739

38-
for row in query_job:
40+
for row in results:
3941
print("{}: \t{}".format(row.word, row.word_count))
4042
# [END bigquery_query_params_named]

0 commit comments

Comments
 (0)