User friendly container for Google Cloud Bigtable Column Family.
Classes
ColumnFamily
ColumnFamily(column_family_id, table, gc_rule=None)
Representation of a Google Cloud Bigtable Column Family.
We can use a ColumnFamily
to:
create
itselfupdate
itselfdelete
itself
Name | Description |
column_family_id |
str
The ID of the column family. Must be of the form |
table |
Table
The table that owns the column family. |
gc_rule |
(Optional) The garbage collection settings for this column family. |
GCRuleIntersection
GCRuleIntersection(rules)
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
Name | Description |
rules |
list
List of |
GCRuleUnion
GCRuleUnion(rules)
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
Name | Description |
rules |
list
List of |
GarbageCollectionRule
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
MaxAgeGCRule(max_age)
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
Name | Description |
max_age |
The maximum age allowed for a cell in the table. |
MaxVersionsGCRule
MaxVersionsGCRule(max_num_versions)
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
Name | Description |
max_num_versions |
int
The maximum number of versions |