Skip to content

Commit

Permalink
docs: clarify 'Table.read_rows' snippet (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com>
Co-authored-by: Tres Seaver <tseaver@palladion.com>
  • Loading branch information
3 people committed Aug 5, 2020
1 parent 89bdd32 commit 5ca8bbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/snippets_table.py
Expand Up @@ -202,9 +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
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)
# [END bigtable_read_rows]
assert len(read_rows) == len(rows)
assert len(total_rows) == len(rows)
# [START bigtable_drop_by_prefix]
from google.cloud.bigtable import Client

Expand Down

0 comments on commit 5ca8bbd

Please sign in to comment.