diff --git a/bigquery/cloud-client/snippets.py b/bigquery/cloud-client/snippets.py index bcf534c8d341..49272965b416 100644 --- a/bigquery/cloud-client/snippets.py +++ b/bigquery/cloud-client/snippets.py @@ -104,6 +104,9 @@ def list_rows(dataset_name, table_name, project=None): rows = [] page_token = None + # Load at most 25 results. You can change this to `while True` and change + # the max_results argument to load more rows from BigQuery, but note + # that this can take some time. It's preferred to use a query. while len(rows) < 25: results, total_rows, page_token = table.fetch_data( max_results=25, page_token=page_token) diff --git a/bigquery/cloud-client/snippets_test.py b/bigquery/cloud-client/snippets_test.py index 0a52922b9ac7..ed2f47639fc3 100644 --- a/bigquery/cloud-client/snippets_test.py +++ b/bigquery/cloud-client/snippets_test.py @@ -40,7 +40,7 @@ def test_list_datasets(capsys): def test_list_tables(capsys): - # Requires teh dataset and table to have been created in the test project. + # Requires the dataset and table to have been created in the test project. snippets.list_tables(DATASET_ID) out, _ = capsys.readouterr()