Type(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Type
represents the type of data that is written to, read from,
or stored in Bigtable. It is heavily based on the GoogleSQL standard
to help maintain familiarity and consistency across products and
features.
For compatibility with Bigtable's existing untyped APIs, each
Type
includes an Encoding
which describes how to convert to
or from the underlying data.
Each encoding can operate in one of two modes:
- Sorted: In this mode, Bigtable guarantees that
Encode(X) <= Encode(Y)
if and only ifX <= Y
. This is useful anywhere sort order is important, for example when encoding keys. - Distinct: In this mode, Bigtable guarantees that if
X != Y
thenEncode(X) != Encode(Y)
. However, the converse is not guaranteed. For example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}" are valid encodings of the same JSON value.
The API clearly documents which mode is used wherever an encoding
can be configured. Each encoding also documents which values are
supported in which modes. For example, when encoding INT64 as a
numeric STRING, negative numbers cannot be encoded in sorted mode.
This is because INT64(1) > INT64(-1)
, but
STRING("-00001") > STRING("00001")
.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
bytes_type |
google.cloud.bigtable_admin_v2.types.Type.Bytes
Bytes This field is a member of oneof _ kind .
|
string_type |
google.cloud.bigtable_admin_v2.types.Type.String
String This field is a member of oneof _ kind .
|
int64_type |
google.cloud.bigtable_admin_v2.types.Type.Int64
Int64 This field is a member of oneof _ kind .
|
float32_type |
google.cloud.bigtable_admin_v2.types.Type.Float32
Float32 This field is a member of oneof _ kind .
|
float64_type |
google.cloud.bigtable_admin_v2.types.Type.Float64
Float64 This field is a member of oneof _ kind .
|
bool_type |
google.cloud.bigtable_admin_v2.types.Type.Bool
Bool This field is a member of oneof _ kind .
|
timestamp_type |
google.cloud.bigtable_admin_v2.types.Type.Timestamp
Timestamp This field is a member of oneof _ kind .
|
date_type |
google.cloud.bigtable_admin_v2.types.Type.Date
Date This field is a member of oneof _ kind .
|
aggregate_type |
google.cloud.bigtable_admin_v2.types.Type.Aggregate
Aggregate This field is a member of oneof _ kind .
|
struct_type |
google.cloud.bigtable_admin_v2.types.Type.Struct
Struct This field is a member of oneof _ kind .
|
array_type |
google.cloud.bigtable_admin_v2.types.Type.Array
Array This field is a member of oneof _ kind .
|
map_type |
google.cloud.bigtable_admin_v2.types.Type.Map
Map This field is a member of oneof _ kind .
|
proto_type |
google.cloud.bigtable_admin_v2.types.Type.Proto
Proto This field is a member of oneof _ kind .
|
enum_type |
google.cloud.bigtable_admin_v2.types.Type.Enum
Enum This field is a member of oneof _ kind .
|
Classes
Aggregate
Aggregate(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A value that combines incremental updates into a summarized value.
Data is never directly written or read using type Aggregate
.
Writes will provide either the input_type
or state_type
, and
reads will always return the state_type
.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Array
Array(mapping=None, *, ignore_unknown_fields=False, **kwargs)
An ordered list of elements of a given type. Values of type
Array
are stored in Value.array_value
.
Bool
Bool(mapping=None, *, ignore_unknown_fields=False, **kwargs)
bool Values of type Bool
are stored in Value.bool_value
.
Bytes
Bytes(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Bytes Values of type Bytes
are stored in Value.bytes_value
.
Date
Date(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Date Values of type Date
are stored in Value.date_value
.
Enum
Enum(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A protobuf enum type. Values of type Enum
are stored in
Value.int_value
.
Float32
Float32(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Float32 Values of type Float32
are stored in
Value.float_value
.
Float64
Float64(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Float64 Values of type Float64
are stored in
Value.float_value
.
Int64
Int64(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Int64 Values of type Int64
are stored in Value.int_value
.
Map
Map(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A mapping of keys to values of a given type. Values of type Map
are stored in a Value.array_value
where each entry is another
Value.array_value
with two elements (the key and the value, in
that order). Normally encoded Map values won't have repeated keys,
however, clients are expected to handle the case in which they do.
If the same key appears multiple times, the last value takes
precedence.
Proto
Proto(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A protobuf message type. Values of type Proto
are stored in
Value.bytes_value
.
String
String(mapping=None, *, ignore_unknown_fields=False, **kwargs)
String Values of type String
are stored in
Value.string_value
.
Struct
Struct(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A structured data value, consisting of fields which map to
dynamically typed values. Values of type Struct
are stored in
Value.array_value
where entries are in the same order and number
as field_types
.
Timestamp
Timestamp(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Timestamp Values of type Timestamp
are stored in
Value.timestamp_value
.