Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 21e632f

Browse filesBrowse files
authored
Remove max_results argument from table.fetch_data() call.
The sample uses islice instead, which demonstrates that fetch_data returns an iterable.
1 parent 2db0c9c commit 21e632f
Copy full SHA for 21e632f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎bigquery/cloud-client/snippets.py

Copy file name to clipboardExpand all lines: bigquery/cloud-client/snippets.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,8 @@ def list_rows(dataset_name, table_name, project=None):
125125
# Reload the table so that the schema is available.
126126
table.reload()
127127

128-
# Load at most 25 results per page. You can change the max_results
129-
# argument to load more rows from BigQuery at a time.
130-
rows = list(itertools.islice(table.fetch_data(max_results=25), 25))
128+
# Load at most 25 results.
129+
rows = list(itertools.islice(table.fetch_data(), 25))
131130

132131
# Use format to create a simple table.
133132
format_string = '{!s:<16} ' * len(table.schema)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.