-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Bigtable: docs Snippet only includes half of documentation #7522
Copy link
Copy link
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.api: spannerIssues related to the Spanner API.Issues related to the Spanner API.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.
Description
Small problem with snippets_table.py for google.cloud.bigtable.row.DirectRow.clear documentation only showing half the example code (e.g. not actually showing the running of the clear command)
This is because the test has two parts and the snippit is only including the first.
def test_bigtable_row_clear():
# [START bigtable_row_clear]
from google.cloud.bigtable import Client
client = Client(admin=True)
instance = client.instance(INSTANCE_ID)
table = instance.table(TABLE_ID)
row_key = b"row_key_1"
row_obj = table.row(row_key)
row_obj.set_cell(COLUMN_FAMILY_ID, COL_NAME1, b"cell-val")
# [END bigtable_row_clear]
mutation_size = row_obj.get_mutations_size()
assert mutation_size > 0
# [START bigtable_row_clear]
row_obj.clear()
# [END bigtable_row_clear]
mutation_size = row_obj.get_mutations_size()
assert mutation_size == 0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.api: spannerIssues related to the Spanner API.Issues related to the Spanner API.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.
