@Generated public final class Table extends com.google.protobuf.GeneratedMessage implements TableOrBuilder
A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster.Protobuf type
google.bigtable.admin.v2.Table| Modifier and Type | Class and Description |
|---|---|
static class |
Table.AutomatedBackupConfigCase |
static class |
Table.AutomatedBackupPolicy
Defines an automated backup policy for a table
Protobuf type
google.bigtable.admin.v2.Table.AutomatedBackupPolicy |
static interface |
Table.AutomatedBackupPolicyOrBuilder |
static class |
Table.Builder
A collection of user data indexed by row, column, and timestamp.
|
static class |
Table.ClusterState
The state of a table's data in a particular cluster.
|
static interface |
Table.ClusterStateOrBuilder |
static class |
Table.TimestampGranularity
Possible timestamp granularities to use when keeping multiple versions
of data in a table.
|
static class |
Table.View
Defines a view over a table's fields.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
AUTOMATED_BACKUP_POLICY_FIELD_NUMBER |
static int |
CHANGE_STREAM_CONFIG_FIELD_NUMBER |
static int |
CLUSTER_STATES_FIELD_NUMBER |
static int |
COLUMN_FAMILIES_FIELD_NUMBER |
static int |
DELETION_PROTECTION_FIELD_NUMBER |
static int |
GRANULARITY_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
RESTORE_INFO_FIELD_NUMBER |
static int |
ROW_KEY_SCHEMA_FIELD_NUMBER |
static int |
TIERED_STORAGE_CONFIG_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsClusterStates(String key)
Output only.
|
boolean |
containsColumnFamilies(String key)
The column families configured for this table, mapped by column family ID.
|
boolean |
equals(Object obj) |
Table.AutomatedBackupConfigCase |
getAutomatedBackupConfigCase() |
Table.AutomatedBackupPolicy |
getAutomatedBackupPolicy()
If specified, automated backups are enabled for this table.
|
Table.AutomatedBackupPolicyOrBuilder |
getAutomatedBackupPolicyOrBuilder()
If specified, automated backups are enabled for this table.
|
ChangeStreamConfig |
getChangeStreamConfig()
If specified, enable the change stream on this table.
|
ChangeStreamConfigOrBuilder |
getChangeStreamConfigOrBuilder()
If specified, enable the change stream on this table.
|
Map<String,Table.ClusterState> |
getClusterStates()
Deprecated.
|
int |
getClusterStatesCount()
Output only.
|
Map<String,Table.ClusterState> |
getClusterStatesMap()
Output only.
|
Table.ClusterState |
getClusterStatesOrDefault(String key,
Table.ClusterState defaultValue)
Output only.
|
Table.ClusterState |
getClusterStatesOrThrow(String key)
Output only.
|
Map<String,ColumnFamily> |
getColumnFamilies()
Deprecated.
|
int |
getColumnFamiliesCount()
The column families configured for this table, mapped by column family ID.
|
Map<String,ColumnFamily> |
getColumnFamiliesMap()
The column families configured for this table, mapped by column family ID.
|
ColumnFamily |
getColumnFamiliesOrDefault(String key,
ColumnFamily defaultValue)
The column families configured for this table, mapped by column family ID.
|
ColumnFamily |
getColumnFamiliesOrThrow(String key)
The column families configured for this table, mapped by column family ID.
|
static Table |
getDefaultInstance() |
Table |
getDefaultInstanceForType() |
boolean |
getDeletionProtection()
Set to true to make the table protected against data loss. i.e. deleting
the following resources through Admin APIs are prohibited:
* The table
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Table.TimestampGranularity |
getGranularity()
Immutable.
|
int |
getGranularityValue()
Immutable.
|
String |
getName()
The unique name of the table.
|
com.google.protobuf.ByteString |
getNameBytes()
The unique name of the table.
|
com.google.protobuf.Parser<Table> |
getParserForType() |
RestoreInfo |
getRestoreInfo()
Output only.
|
RestoreInfoOrBuilder |
getRestoreInfoOrBuilder()
Output only.
|
Type.Struct |
getRowKeySchema()
The row key schema for this table.
|
Type.StructOrBuilder |
getRowKeySchemaOrBuilder()
The row key schema for this table.
|
int |
getSerializedSize() |
TieredStorageConfig |
getTieredStorageConfig()
Rules to specify what data is stored in each storage tier.
|
TieredStorageConfigOrBuilder |
getTieredStorageConfigOrBuilder()
Rules to specify what data is stored in each storage tier.
|
boolean |
hasAutomatedBackupPolicy()
If specified, automated backups are enabled for this table.
|
boolean |
hasChangeStreamConfig()
If specified, enable the change stream on this table.
|
int |
hashCode() |
boolean |
hasRestoreInfo()
Output only.
|
boolean |
hasRowKeySchema()
The row key schema for this table.
|
boolean |
hasTieredStorageConfig()
Rules to specify what data is stored in each storage tier.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static Table.Builder |
newBuilder() |
static Table.Builder |
newBuilder(Table prototype) |
Table.Builder |
newBuilderForType() |
protected Table.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static Table |
parseDelimitedFrom(InputStream input) |
static Table |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Table |
parseFrom(byte[] data) |
static Table |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Table |
parseFrom(ByteBuffer data) |
static Table |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Table |
parseFrom(com.google.protobuf.ByteString data) |
static Table |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Table |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Table |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Table |
parseFrom(InputStream input) |
static Table |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Table> |
parser() |
Table.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int CLUSTER_STATES_FIELD_NUMBER
public static final int COLUMN_FAMILIES_FIELD_NUMBER
public static final int GRANULARITY_FIELD_NUMBER
public static final int RESTORE_INFO_FIELD_NUMBER
public static final int CHANGE_STREAM_CONFIG_FIELD_NUMBER
public static final int DELETION_PROTECTION_FIELD_NUMBER
public static final int AUTOMATED_BACKUP_POLICY_FIELD_NUMBER
public static final int TIERED_STORAGE_CONFIG_FIELD_NUMBER
public static final int ROW_KEY_SCHEMA_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageprotected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic Table.AutomatedBackupConfigCase getAutomatedBackupConfigCase()
getAutomatedBackupConfigCase in interface TableOrBuilderpublic String getName()
The unique name of the table. Values are of the form
`projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
string name = 1;getName in interface TableOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The unique name of the table. Values are of the form
`projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
string name = 1;getNameBytes in interface TableOrBuilderpublic int getClusterStatesCount()
TableOrBuilderOutput only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getClusterStatesCount in interface TableOrBuilderpublic boolean containsClusterStates(String key)
Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
containsClusterStates in interface TableOrBuilder@Deprecated public Map<String,Table.ClusterState> getClusterStates()
getClusterStatesMap() instead.getClusterStates in interface TableOrBuilderpublic Map<String,Table.ClusterState> getClusterStatesMap()
Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getClusterStatesMap in interface TableOrBuilderpublic Table.ClusterState getClusterStatesOrDefault(String key, Table.ClusterState defaultValue)
Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getClusterStatesOrDefault in interface TableOrBuilderpublic Table.ClusterState getClusterStatesOrThrow(String key)
Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.Table.ClusterState> cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getClusterStatesOrThrow in interface TableOrBuilderpublic int getColumnFamiliesCount()
TableOrBuilderThe column families configured for this table, mapped by column family ID. Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;getColumnFamiliesCount in interface TableOrBuilderpublic boolean containsColumnFamilies(String key)
The column families configured for this table, mapped by column family ID. Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;containsColumnFamilies in interface TableOrBuilder@Deprecated public Map<String,ColumnFamily> getColumnFamilies()
getColumnFamiliesMap() instead.getColumnFamilies in interface TableOrBuilderpublic Map<String,ColumnFamily> getColumnFamiliesMap()
The column families configured for this table, mapped by column family ID. Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;getColumnFamiliesMap in interface TableOrBuilderpublic ColumnFamily getColumnFamiliesOrDefault(String key, ColumnFamily defaultValue)
The column families configured for this table, mapped by column family ID. Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;getColumnFamiliesOrDefault in interface TableOrBuilderpublic ColumnFamily getColumnFamiliesOrThrow(String key)
The column families configured for this table, mapped by column family ID. Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3;getColumnFamiliesOrThrow in interface TableOrBuilderpublic int getGranularityValue()
Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored in this table. Timestamps not matching the granularity will be rejected. If unspecified at creation time, the value will be set to `MILLIS`. Views: `SCHEMA_VIEW`, `FULL`.
.google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE];
getGranularityValue in interface TableOrBuilderpublic Table.TimestampGranularity getGranularity()
Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored in this table. Timestamps not matching the granularity will be rejected. If unspecified at creation time, the value will be set to `MILLIS`. Views: `SCHEMA_VIEW`, `FULL`.
.google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE];
getGranularity in interface TableOrBuilderpublic boolean hasRestoreInfo()
Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore.
.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasRestoreInfo in interface TableOrBuilderpublic RestoreInfo getRestoreInfo()
Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore.
.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getRestoreInfo in interface TableOrBuilderpublic RestoreInfoOrBuilder getRestoreInfoOrBuilder()
Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore.
.google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getRestoreInfoOrBuilder in interface TableOrBuilderpublic boolean hasChangeStreamConfig()
If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained.
.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;hasChangeStreamConfig in interface TableOrBuilderpublic ChangeStreamConfig getChangeStreamConfig()
If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained.
.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;getChangeStreamConfig in interface TableOrBuilderpublic ChangeStreamConfigOrBuilder getChangeStreamConfigOrBuilder()
If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained.
.google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8;getChangeStreamConfigOrBuilder in interface TableOrBuilderpublic boolean getDeletionProtection()
Set to true to make the table protected against data loss. i.e. deleting the following resources through Admin APIs are prohibited: * The table. * The column families in the table. * The instance containing the table. Note one can still delete the data stored in the table through Data APIs.
bool deletion_protection = 9;getDeletionProtection in interface TableOrBuilderpublic boolean hasAutomatedBackupPolicy()
If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled.
.google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13;
hasAutomatedBackupPolicy in interface TableOrBuilderpublic Table.AutomatedBackupPolicy getAutomatedBackupPolicy()
If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled.
.google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13;
getAutomatedBackupPolicy in interface TableOrBuilderpublic Table.AutomatedBackupPolicyOrBuilder getAutomatedBackupPolicyOrBuilder()
If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled.
.google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13;
getAutomatedBackupPolicyOrBuilder in interface TableOrBuilderpublic boolean hasTieredStorageConfig()
Rules to specify what data is stored in each storage tier. Different tiers store data differently, providing different trade-offs between cost and performance. Different parts of a table can be stored separately on different tiers. If a config is specified, tiered storage is enabled for this table. Otherwise, tiered storage is disabled. Only SSD instances can configure tiered storage.
.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;hasTieredStorageConfig in interface TableOrBuilderpublic TieredStorageConfig getTieredStorageConfig()
Rules to specify what data is stored in each storage tier. Different tiers store data differently, providing different trade-offs between cost and performance. Different parts of a table can be stored separately on different tiers. If a config is specified, tiered storage is enabled for this table. Otherwise, tiered storage is disabled. Only SSD instances can configure tiered storage.
.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;getTieredStorageConfig in interface TableOrBuilderpublic TieredStorageConfigOrBuilder getTieredStorageConfigOrBuilder()
Rules to specify what data is stored in each storage tier. Different tiers store data differently, providing different trade-offs between cost and performance. Different parts of a table can be stored separately on different tiers. If a config is specified, tiered storage is enabled for this table. Otherwise, tiered storage is disabled. Only SSD instances can configure tiered storage.
.google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14;getTieredStorageConfigOrBuilder in interface TableOrBuilderpublic boolean hasRowKeySchema()
The row key schema for this table. The schema is used to decode the raw row
key bytes into a structured format. The order of field declarations in this
schema is important, as it reflects how the raw row key bytes are
structured. Currently, this only affects how the key is read via a
GoogleSQL query from the ExecuteQuery API.
For a SQL query, the _key column is still read as raw bytes. But queries
can reference the key fields by name, which will be decoded from _key using
provided type and encoding. Queries that reference key fields will fail if
they encounter an invalid row key.
For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
following schema:
{
fields {
field_name: "id"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "date"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "product_code"
type { int64 { encoding: big_endian_bytes {} } }
}
encoding { delimited_bytes { delimiter: "#" } }
}
The decoded key parts would be:
id = "some_id", date = "2024-04-30", product_code = 1245427
The query "SELECT _key, product_code FROM table" will return two columns:
/------------------------------------------------------\
| _key | product_code |
| --------------------------------------|--------------|
| "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
\------------------------------------------------------/
The schema has the following invariants:
(1) The decoded field values are order-preserved. For read, the field
values will be decoded in sorted mode from the raw bytes.
(2) Every field in the schema must specify a non-empty name.
(3) Every field must specify a type with an associated encoding. The type
is limited to scalar types only: Array, Map, Aggregate, and Struct are not
allowed.
(4) The field names must not collide with existing column family
names and reserved keywords "_key" and "_timestamp".
The following update operations are allowed for row_key_schema:
- Update from an empty schema to a new schema.
- Remove the existing schema. This operation requires setting the
`ignore_warnings` flag to `true`, since it might be a backward
incompatible change. Without the flag, the update request will fail with
an INVALID_ARGUMENT error.
Any other row key schema update operation (e.g. update existing schema
columns names or types) is currently unsupported.
.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;hasRowKeySchema in interface TableOrBuilderpublic Type.Struct getRowKeySchema()
The row key schema for this table. The schema is used to decode the raw row
key bytes into a structured format. The order of field declarations in this
schema is important, as it reflects how the raw row key bytes are
structured. Currently, this only affects how the key is read via a
GoogleSQL query from the ExecuteQuery API.
For a SQL query, the _key column is still read as raw bytes. But queries
can reference the key fields by name, which will be decoded from _key using
provided type and encoding. Queries that reference key fields will fail if
they encounter an invalid row key.
For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
following schema:
{
fields {
field_name: "id"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "date"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "product_code"
type { int64 { encoding: big_endian_bytes {} } }
}
encoding { delimited_bytes { delimiter: "#" } }
}
The decoded key parts would be:
id = "some_id", date = "2024-04-30", product_code = 1245427
The query "SELECT _key, product_code FROM table" will return two columns:
/------------------------------------------------------\
| _key | product_code |
| --------------------------------------|--------------|
| "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
\------------------------------------------------------/
The schema has the following invariants:
(1) The decoded field values are order-preserved. For read, the field
values will be decoded in sorted mode from the raw bytes.
(2) Every field in the schema must specify a non-empty name.
(3) Every field must specify a type with an associated encoding. The type
is limited to scalar types only: Array, Map, Aggregate, and Struct are not
allowed.
(4) The field names must not collide with existing column family
names and reserved keywords "_key" and "_timestamp".
The following update operations are allowed for row_key_schema:
- Update from an empty schema to a new schema.
- Remove the existing schema. This operation requires setting the
`ignore_warnings` flag to `true`, since it might be a backward
incompatible change. Without the flag, the update request will fail with
an INVALID_ARGUMENT error.
Any other row key schema update operation (e.g. update existing schema
columns names or types) is currently unsupported.
.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;getRowKeySchema in interface TableOrBuilderpublic Type.StructOrBuilder getRowKeySchemaOrBuilder()
The row key schema for this table. The schema is used to decode the raw row
key bytes into a structured format. The order of field declarations in this
schema is important, as it reflects how the raw row key bytes are
structured. Currently, this only affects how the key is read via a
GoogleSQL query from the ExecuteQuery API.
For a SQL query, the _key column is still read as raw bytes. But queries
can reference the key fields by name, which will be decoded from _key using
provided type and encoding. Queries that reference key fields will fail if
they encounter an invalid row key.
For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
following schema:
{
fields {
field_name: "id"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "date"
type { string { encoding: utf8_bytes {} } }
}
fields {
field_name: "product_code"
type { int64 { encoding: big_endian_bytes {} } }
}
encoding { delimited_bytes { delimiter: "#" } }
}
The decoded key parts would be:
id = "some_id", date = "2024-04-30", product_code = 1245427
The query "SELECT _key, product_code FROM table" will return two columns:
/------------------------------------------------------\
| _key | product_code |
| --------------------------------------|--------------|
| "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 |
\------------------------------------------------------/
The schema has the following invariants:
(1) The decoded field values are order-preserved. For read, the field
values will be decoded in sorted mode from the raw bytes.
(2) Every field in the schema must specify a non-empty name.
(3) Every field must specify a type with an associated encoding. The type
is limited to scalar types only: Array, Map, Aggregate, and Struct are not
allowed.
(4) The field names must not collide with existing column family
names and reserved keywords "_key" and "_timestamp".
The following update operations are allowed for row_key_schema:
- Update from an empty schema to a new schema.
- Remove the existing schema. This operation requires setting the
`ignore_warnings` flag to `true`, since it might be a backward
incompatible change. Without the flag, the update request will fail with
an INVALID_ARGUMENT error.
Any other row key schema update operation (e.g. update existing schema
columns names or types) is currently unsupported.
.google.bigtable.admin.v2.Type.Struct row_key_schema = 15;getRowKeySchemaOrBuilder in interface TableOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageIOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Table parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Table parseFrom(InputStream input) throws IOException
IOExceptionpublic static Table parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Table parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Table parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Table parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Table parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Table.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Table.Builder newBuilder()
public static Table.Builder newBuilder(Table prototype)
public Table.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Table.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static Table getDefaultInstance()
public static com.google.protobuf.Parser<Table> parser()
public com.google.protobuf.Parser<Table> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic Table getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2026 Google LLC. All rights reserved.