Skip to content

Commit

Permalink
Merge pull request #471 from GoogleCloudPlatform/fixup-bigquery-samples
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot authored Aug 22, 2016
2 parents 5b7ff95 + 8144a69 commit 06e2199
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bigquery/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bigquery/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 06e2199

Please sign in to comment.