Package Classes (2.25.0)

Summary of entries of Classes for bigtable.

Classes

AppProfile

Representation of a Google Cloud Bigtable AppProfile.

We can use a AppProfile to:

  • reload itself
  • create itself
  • update itself
  • delete itself

Backup

Representation of a Google Cloud Bigtable Backup.

A :class: Backup can be used to:

  • create the backup
  • update the backup
  • delete the backup

MutationsBatchError

Error in the batch request

MutationsBatcher

A MutationsBatcher is used in batch cases where the number of mutations is large or unknown. It will store DirectRow in memory until one of the size limits is reached, or an explicit call to flush() is performed. When a flush event occurs, the DirectRow in memory will be sent to Cloud Bigtable. Batching mutations is more efficient than sending individual request.

This class is not suited for usage in systems where each mutation must be guaranteed to be sent, since calling mutate may only result in an in-memory change. In a case of a system crash, any DirectRow remaining in memory will not necessarily be sent to the service, even after the completion of the mutate() method.

Note on thread safety: The same MutationBatcher cannot be shared by multiple end-user threads.

Client

Client for interacting with Google Cloud Bigtable API.

Cluster

Representation of a Google Cloud Bigtable Cluster.

We can use a Cluster to:

  • reload itself
  • create itself
  • update itself
  • delete itself
  • disable_autoscaling itself

ColumnFamily

Representation of a Google Cloud Bigtable Column Family.

We can use a ColumnFamily to:

  • create itself
  • update itself
  • delete itself

GCRuleIntersection

Intersection of garbage collection rules.

For example:

.. literalinclude:: snippets_table.py :start-after: [START bigtable_api_create_family_gc_intersection] :end-before: [END bigtable_api_create_family_gc_intersection] :dedent: 4

GCRuleUnion

Union of garbage collection rules.

For example:

.. literalinclude:: snippets_table.py :start-after: [START bigtable_api_create_family_gc_union] :end-before: [END bigtable_api_create_family_gc_union] :dedent: 4

GarbageCollectionRule

Garbage collection rule for column families within a table.

Cells in the column family (within a table) fitting the rule will be deleted during garbage collection.

A string gc_expression can also be used with API requests, but that value would be superceded by a gc_rule. As a result, we don't support that feature and instead support via native classes.

MaxAgeGCRule

Garbage collection limiting the age of a cell.

For example:

.. literalinclude:: snippets_table.py :start-after: [START bigtable_api_create_family_gc_max_age] :end-before: [END bigtable_api_create_family_gc_max_age] :dedent: 4

MaxVersionsGCRule

Garbage collection limiting the number of versions of a cell.

For example:

.. literalinclude:: snippets_table.py :start-after: [START bigtable_api_create_family_gc_max_versions] :end-before: [END bigtable_api_create_family_gc_max_versions] :dedent: 4

BigtableDataClientAsync

Create a client instance for the Bigtable Data API

Client should be created within an async context (running event loop)

TableAsync

Main Data API surface

Table object maintains table_id, and app_profile_id context, and passes them with each call

MutationsBatcherAsync

Allows users to send batches using context manager API:

Runs mutate_row, mutate_rows, and check_and_mutate_row internally, combining to use as few network requests as required

Will automatically flush the batcher:

  • every flush_interval seconds
  • after queue size reaches flush_limit_mutation_count
  • after queue reaches flush_limit_bytes
  • when batcher is closed or destroyed

FailedMutationEntryError

Represents a single failed RowMutationEntry in a bulk_mutate_rows request. A collection of FailedMutationEntryErrors will be raised in a MutationsExceptionGroup

FailedQueryShardError

Represents an individual failed query in a sharded read rows operation

InvalidChunk

Exception raised to invalid chunk data from back-end.

MutationsExceptionGroup

Represents one or more exceptions that occur during a bulk mutation operation

Exceptions will typically be of type FailedMutationEntryError, but other exceptions may be included if they are raised during the mutation operation

RetryExceptionGroup

Represents one or more exceptions that occur during a retryable operation

ShardedReadRowsExceptionGroup

Represents one or more exceptions that occur during a sharded read rows operation

DeleteAllFromFamily

Mutation to delete all cells from a column family.

DeleteAllFromRow

Mutation to delete all cells from a row.

DeleteRangeFromColumn

Mutation to delete a range of cells from a column.

Mutation

Abstract base class for mutations.

This class defines the interface for different types of mutations that can be applied to Bigtable rows.

RowMutationEntry

A single entry in a MutateRows request.

This class represents a set of mutations to apply to a specific row in a Bigtable table.

SetCell

Mutation to set the value of a cell.

AppendValueRule

Rule to append a value to a cell's value.

IncrementRule

Rule to increment a cell's value.

ReadModifyWriteRule

Abstract base class for read-modify-write rules.

ReadRowsQuery

Class to encapsulate details of a read row request

RowRange

Represents a range of keys in a ReadRowsQuery

Cell

Model class for cell data

Does not represent all data contained in the cell, only data returned by a query. Expected to be read-only to users, and written by backend

Row

Model class for row data returned from server

Does not represent all data contained in the row, only data returned by a query. Expected to be read-only to users, and written by backend

Can be indexed by family and qualifier to get cells in the row::

cells = row["family", "qualifier"]

ApplyLabelFilter

Filter to apply labels to cells.

Intended to be used as an intermediate filter on a pre-existing filtered result set. This way if two sets are combined, the label can tell where the cell(s) originated.This allows the client to determine which results were produced from which part of the filter.

BlockAllFilter

Row filter that doesn't match any cells.

CellsColumnLimitFilter

Row filter to limit cells in a column.

CellsRowLimitFilter

Row filter to limit cells in a row.

CellsRowOffsetFilter

Row filter to skip cells in a row.

ColumnQualifierRegexFilter

Row filter for a column qualifier regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

ColumnRangeFilter

A row filter to restrict to a range of columns.

Both the start and end column can be included or excluded in the range. By default, we include them both, but this can be changed with optional flags.

ConditionalRowFilter

Conditional row filter which exhibits ternary behavior.

Executes one of two filters based on another filter. If the predicate_filter returns any cells in the row, then true_filter is executed. If not, then false_filter is executed.

FamilyNameRegexFilter

Row filter for a family name regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

LiteralValueFilter

Row filter for an exact value.

PassAllFilter

Row filter equivalent to not filtering at all.

RowFilter

Basic filter to apply to cells in a row.

These values can be combined via RowFilterChain, RowFilterUnion and ConditionalRowFilter.

RowFilterChain

Chain of row filters.

Sends rows through several filters in sequence. The filters are "chained" together to process a row. After the first filter is applied, the second is applied to the filtered output and so on for subsequent filters.

RowFilterUnion

Union of row filters.

Sends rows through several filters simultaneously, then merges / interleaves all the filtered results together.

If multiple cells are produced with the same column and timestamp, they will all appear in the output row in an unspecified mutual order.

RowKeyRegexFilter

Row filter for a row key regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

RowSampleFilter

Matches all cells from a row with probability p.

SinkFilter

Advanced row filter to skip parent filters.

StripValueTransformerFilter

Row filter that transforms cells into empty string (0 bytes).

TimestampRange

Range of time with inclusive lower and exclusive upper bounds.

TimestampRangeFilter

Row filter that limits cells to a range of time.

ValueRangeFilter

A range of values to restrict to in a row filter.

Will only match cells that have values in this range.

Both the start and end value can be included or excluded in the range. By default, we include them both, but this can be changed with optional flags.

ValueRegexFilter

Row filter for a value regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

EncryptionInfo

Encryption information for a given resource.

If this resource is protected with customer managed encryption, the in-use Google Cloud Key Management Service (KMS) key versions will be specified along with their status.

Instance

Representation of a Google Cloud Bigtable Instance.

We can use an Instance to:

  • reload itself
  • create itself
  • update itself
  • delete itself

AppendRow

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_value
  • increment_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).

Cell

Representation of a Google Cloud Bigtable Cell.

ConditionalRow

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_cell
  • delete
  • delete_cell
  • delete_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)

DirectRow

Google Cloud Bigtable Row for sending "direct" mutations.

These mutations directly set or delete cell contents:

  • set_cell
  • delete
  • delete_cell
  • delete_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')

InvalidChunk

Exception raised to invalid chunk data from back-end.

PartialRowData

Representation of partial row in a Google Cloud Bigtable Table.

These are expected to be updated directly from a ._generated.bigtable_service_messages_pb2.ReadRowsResponse

Row

Base representation of a Google Cloud Bigtable Row.

This class has three subclasses corresponding to the three RPC methods for sending row mutations:

  • DirectRow for MutateRow
  • ConditionalRow for CheckAndMutateRow
  • AppendRow for ReadModifyWriteRow

InvalidReadRowsResponse

Exception raised to invalid response data from back-end.

InvalidRetryRequest

Exception raised when retry request is invalid.

PartialCellData

This class is no longer used and will be removed in the future

PartialRowsData

Convenience wrapper for consuming a ReadRows streaming response.

ApplyLabelFilter

Filter to apply labels to cells.

Intended to be used as an intermediate filter on a pre-existing filtered result set. This way if two sets are combined, the label can tell where the cell(s) originated.This allows the client to determine which results were produced from which part of the filter.

BlockAllFilter

Row filter that doesn't match any cells.

CellsColumnLimitFilter

Row filter to limit cells in a column.

CellsRowLimitFilter

Row filter to limit cells in a row.

CellsRowOffsetFilter

Row filter to skip cells in a row.

ColumnQualifierRegexFilter

Row filter for a column qualifier regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

ColumnRangeFilter

A row filter to restrict to a range of columns.

Both the start and end column can be included or excluded in the range. By default, we include them both, but this can be changed with optional flags.

ConditionalRowFilter

Conditional row filter which exhibits ternary behavior.

Executes one of two filters based on another filter. If the base_filter returns any cells in the row, then true_filter is executed. If not, then false_filter is executed.

ExactValueFilter

Row filter for an exact value.

FamilyNameRegexFilter

Row filter for a family name regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

PassAllFilter

Row filter equivalent to not filtering at all.

RowFilter

Basic filter to apply to cells in a row.

These values can be combined via RowFilterChain, RowFilterUnion and ConditionalRowFilter.

RowFilterChain

Chain of row filters.

Sends rows through several filters in sequence. The filters are "chained" together to process a row. After the first filter is applied, the second is applied to the filtered output and so on for subsequent filters.

RowFilterUnion

Union of row filters.

Sends rows through several filters simultaneously, then merges / interleaves all the filtered results together.

If multiple cells are produced with the same column and timestamp, they will all appear in the output row in an unspecified mutual order.

RowKeyRegexFilter

Row filter for a row key regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

RowSampleFilter

Matches all cells from a row with probability p.

SinkFilter

Advanced row filter to skip parent filters.

StripValueTransformerFilter

Row filter that transforms cells into empty string (0 bytes).

TimestampRange

Range of time with inclusive lower and exclusive upper bounds.

TimestampRangeFilter

Row filter that limits cells to a range of time.

ValueRangeFilter

A range of values to restrict to in a row filter.

Will only match cells that have values in this range.

Both the start and end value can be included or excluded in the range. By default, we include them both, but this can be changed with optional flags.

ValueRegexFilter

Row filter for a value regular expression.

The regex must be valid RE2 patterns. See Google's RE2 reference_ for the accepted syntax.

.. _RE2 reference: https://github.com/google/re2/wiki/Syntax

RowRange

Convenience wrapper of google.bigtable.v2.RowRange

RowSet

Convenience wrapper of google.bigtable.v2.RowSet

Useful for creating a set of row keys and row ranges, which can be passed to yield_rows method of class:.Table.yield_rows.

ClusterState

Representation of a Cluster State.

Table

Representation of a Google Cloud Bigtable Table.

  • create the table
  • delete the table
  • list_column_families in the table

TableMismatchError

Row from another table.

TooManyMutationsError

The number of mutations for bulk request is too big.

Modules

app_profile

User-friendly container for Google Cloud Bigtable AppProfile.

backup

A user-friendly wrapper for a Google Cloud Bigtable Backup.

batcher

User friendly container for Google Cloud Bigtable MutationBatcher.

client

Parent client for calling the Google Cloud Bigtable API.

This is the base from which all interactions with the API occur.

In the hierarchy of API concepts

cluster

User friendly container for Google Cloud Bigtable Cluster.

column_family

User friendly container for Google Cloud Bigtable Column Family.

mutations_batcher

API documentation for bigtable.data._async.mutations_batcher module.

exceptions

API documentation for bigtable.data.exceptions module.

mutations

API documentation for bigtable.data.mutations module.

read_modify_write_rules

API documentation for bigtable.data.read_modify_write_rules module.

read_rows_query

API documentation for bigtable.data.read_rows_query module.

data.row

API documentation for bigtable.data.row module.

data.row_filters

Filters for Google Cloud Bigtable Row classes.

encryption_info

Class for encryption info for tables and backups.

instance

User-friendly container for Google Cloud Bigtable Instance.

row

User-friendly container for Google Cloud Bigtable Row.

row_data

Container for Google Cloud Bigtable Cells and Streaming Row Contents.

row_filters

Filters for Google Cloud Bigtable Row classes.

row_set

User-friendly container for Google Cloud Bigtable RowSet

table

User-friendly container for Google Cloud Bigtable Table.