Skip to content

Commit

Permalink
docs: update snippets.py to use query_and_wait
Browse files Browse the repository at this point in the history
  • Loading branch information
DevStephanie committed Jan 16, 2024
1 parent 0b5c1d5 commit 37ba433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def test_client_query_total_rows(client, capsys):
'WHERE state = "TX" '
"LIMIT 100"
)
query_job = client.query(
query_job = client.query_and_wait(
query,
# Location must match that of the dataset(s) referenced in the query.
location="US",
Expand Down Expand Up @@ -551,7 +551,7 @@ def test_query_results_as_dataframe(client):
LIMIT 10
"""

df = client.query(sql).to_dataframe()
df = client.query_and_wait(sql).to_dataframe()
# [END bigquery_query_results_dataframe]
assert isinstance(df, pandas.DataFrame)
assert len(list(df)) == 2 # verify the number of columns
Expand Down

0 comments on commit 37ba433

Please sign in to comment.