Module row (2.3.3)
Stay organized with collections
Save and categorize content based on your preferences.
User-friendly container for Google Cloud Bigtable Row.
Classes
AppendRow
AppendRow(row_key, table)Google Cloud Bigtable Row for sending append mutations.
These mutations are intended to augment the value of an existing cell and uses the methods:
append_cell_valueincrement_cell_value
The first works by appending bytes and the second by incrementing an integer (stored in the cell as 8 bytes). In either case, if the cell is empty, assumes the default empty value (empty string for bytes or 0 for integer).
row_key
bytes
The key for the current row.
ConditionalRow
ConditionalRow(row_key, table, filter_)Google Cloud Bigtable Row for sending mutations conditionally.
Each mutation has an associated state: :data:True or :data:False.
When commit-ed, the mutations for the :data:True
state will be applied if the filter matches any cells in
the row, otherwise the :data:False state will be applied.
A ConditionalRow accumulates mutations in the same way a
DirectRow does:
set_celldeletedelete_celldelete_cells
with the only change the extra state parameter::
row_cond = table.row(b'row-key2', filter_=row_filter) row_cond.set_cell(u'fam', b'col', b'cell-val', state=True) row_cond.delete_cell(u'fam', b'col', state=False)
row_key
bytes
The key for the current row.
filter_
.RowFilter
Filter to be used for conditional mutations.
DirectRow
DirectRow(row_key, table=None)Google Cloud Bigtable Row for sending "direct" mutations.
These mutations directly set or delete cell contents:
set_celldeletedelete_celldelete_cells
These methods can be used directly::
row = table.row(b'row-key1') row.set_cell(u'fam', b'col1', b'cell-val') row.delete_cell(u'fam', b'col2')
row_key
bytes
The key for the current row.
table
Table
(Optional) The table that owns the row. This is used for the :meth: commit only. Alternatively, DirectRows can be persisted via mutate_rows.
Row
Row(row_key, table=None)Base representation of a Google Cloud Bigtable Row.
This class has three subclasses corresponding to the three RPC methods for sending row mutations:
DirectRowforMutateRowConditionalRowforCheckAndMutateRowAppendRowforReadModifyWriteRow
row_key
bytes
The key for the current row.