Skip to content

Commit 81563b0

Browse files
SalemJordenSalem Boylandkiraksi
authored
docs: update to use API (#1781)
Co-authored-by: Salem Boyland <[email protected]> Co-authored-by: Kira <[email protected]>
1 parent a7be88a commit 81563b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/query_external_gcs_temporary_table.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def query_external_gcs_temporary_table() -> None:
3838
# Example query to find states starting with 'W'.
3939
sql = 'SELECT * FROM `{}` WHERE name LIKE "W%"'.format(table_id)
4040

41-
query_job = client.query(sql, job_config=job_config) # Make an API request.
41+
results = client.query_and_wait(sql, job_config=job_config) # Make an API request.
4242

43-
w_states = list(query_job) # Wait for the job to complete.
43+
w_states = list(results) # Wait for the job to complete.
4444
print("There are {} states with names starting with W.".format(len(w_states)))
4545
# [END bigquery_query_external_gcs_temp]

0 commit comments

Comments
 (0)