Skip to content

Commit dbf10de

Browse files
SalemJordenSalem Boylandkiraksichalmerlowe
authored
docs: update sample for query_to_arrow to use query_and_wait API (#1776)
Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]> Co-authored-by: Chalmer Lowe <[email protected]>
1 parent ef89f9e commit dbf10de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/query_to_arrow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def query_to_arrow() -> "pyarrow.Table":
4444
FROM races r
4545
CROSS JOIN UNNEST(r.participants) as participant;
4646
"""
47-
query_job = client.query(sql)
48-
arrow_table = query_job.to_arrow() # Make an API request.
47+
results = client.query_and_wait(sql)
48+
arrow_table = results.to_arrow() # Make an API request.
4949

5050
print(
5151
"Downloaded {} rows, {} columns.".format(

0 commit comments

Comments
 (0)