API documentation for bigtable.data.mutations
module.
Classes
AddToCell
AddToCell(family: str, qualifier: bytes | str, value: int, timestamp_micros: int)
Adds an int64 value to an aggregate cell. The column family must be an aggregate family and have an "int64" input type or this mutation will be rejected.
Note: The timestamp values are in microseconds but must match the
granularity of the table (defaults to MILLIS
). Therefore, the given value
must be a multiple of 1000 (millisecond granularity). For example:
1571902339435000
.
Exceptions | |
---|---|
Type | Description |
TypeError |
If qualifier is not bytes or str . |
TypeError |
If value is not int . |
TypeError |
If timestamp_micros is not int . |
ValueError |
If value is out of bounds for a 64-bit signed int. |
ValueError |
If timestamp_micros is less than 0. |
DeleteAllFromFamily
DeleteAllFromFamily(family_to_delete: str)
Mutation to delete all cells from a column family.
DeleteAllFromRow
DeleteAllFromRow()
Mutation to delete all cells from a row.
DeleteRangeFromColumn
DeleteRangeFromColumn(
family: str,
qualifier: bytes,
start_timestamp_micros: typing.Optional[int] = None,
end_timestamp_micros: typing.Optional[int] = None,
)
Mutation to delete a range of cells from a column.
Exceptions | |
---|---|
Type | Description |
ValueError |
If start_timestamp_micros is greater than end_timestamp_micros . |
Mutation
Mutation()
Abstract base class for mutations.
This class defines the interface for different types of mutations that can be applied to Bigtable rows.
RowMutationEntry
RowMutationEntry(
row_key: bytes | str,
mutations: (
google.cloud.bigtable.data.mutations.Mutation
| list[google.cloud.bigtable.data.mutations.Mutation]
),
)
A single entry in a MutateRows
request.
This class represents a set of mutations to apply to a specific row in a Bigtable table.
Exceptions | |
---|---|
Type | Description |
ValueError |
If mutations is empty or contains more than _MUTATE_ROWS_REQUEST_MUTATION_LIMIT mutations. |
SetCell
SetCell(
family: str,
qualifier: bytes | str,
new_value: bytes | str | int,
timestamp_micros: typing.Optional[int] = None,
)
Mutation to set the value of a cell.
Exceptions | |
---|---|
Type | Description |
TypeError |
If qualifier is not bytes or str . |
TypeError |
If new_value is not bytes , str , or int . |
ValueError |
If timestamp_micros is less than _SERVER_SIDE_TIMESTAMP . |