Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify 'Table.read_rows' snippet #50

Merged
merged 12 commits into from Aug 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/snippets_table.py
Expand Up @@ -202,14 +202,15 @@ def test_bigtable_write_read_drop_truncate():

# Read full table
partial_rows = table.read_rows()
read_rows = [row for row in partial_rows]

# Read row's value
for row in read_rows:
total_rows = []
for row in partial_rows:
cell = row.cells[COLUMN_FAMILY_ID][col_name][0]
print(cell.value.decode("utf-8"))
total_rows.append(cell)
tseaver marked this conversation as resolved.
Show resolved Hide resolved
# [END bigtable_read_rows]
assert len(read_rows) == len(rows)
assert len(list(total_rows)) == len(rows)
tseaver marked this conversation as resolved.
Show resolved Hide resolved
# [START bigtable_drop_by_prefix]
from google.cloud.bigtable import Client

Expand Down