[go: up one dir, main page]

Skip to content

Commit

Permalink
docs(samples): table variable fix (#1287)
Browse files Browse the repository at this point in the history
Updated table variable in "# Print row data in tabular format." to point at the correct table_id.


Fixes https://togithub.com/googleapis/python-bigquery/issues/1286
  • Loading branch information
adhiggs committed Jan 24, 2023
1 parent fa8f6ec commit a71888a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/browse_table_data.py
Expand Up @@ -47,7 +47,7 @@ def browse_table_data(table_id: str) -> None:
print("Downloaded {} rows from table {}".format(len(rows), table_id))

# Print row data in tabular format.
rows_iter = client.list_rows(table, max_results=10)
rows_iter = client.list_rows(table_id, max_results=10)
format_string = "{!s:<16} " * len(rows_iter.schema)
field_names = [field.name for field in rows_iter.schema]
print(format_string.format(*field_names)) # Prints column headers.
Expand Down

0 comments on commit a71888a

Please sign in to comment.