- Resource: DataSchema
- DataSchemaDetails
- DataType
- ProtoAnyConfig
- ListConfig
- CustomizedStructConfig
- Granularity
- SearchStrategy
- SearchStrategyType
- Methods
Resource: DataSchema
Data schema indicates how the user specified annotation is interpreted in the system.
JSON representation |
---|
{
"name": string,
"key": string,
"schemaDetails": {
object ( |
Fields | |
---|---|
name |
Resource name of the data schema in the form of: |
key |
Required. The key of this data schema. This key should be matching the key of user specified annotation and unique inside corpus. This value can be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number. |
schemaDetails |
The schema details mapping to the key. |
DataSchemaDetails
Data schema details indicates the data type and the data struct corresponding to the key of user specified annotation.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Type of the annotation. |
protoAnyConfig |
Config for protobuf any type. |
listConfig |
Config for List data type. |
customizedStructConfig |
Config for CustomizedStruct data type. |
granularity |
The granularity associated with this DataSchema. |
searchStrategy |
The search strategy to be applied on the |
DataType
Data type of the annotation.
Enums | |
---|---|
DATA_TYPE_UNSPECIFIED |
Unspecified type. |
INTEGER |
Integer type. Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH. Supports query by IntRangeArray. |
FLOAT |
Float type. Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH. Supports query by FloatRangeArray. |
STRING |
String type. Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH, - DataSchema.SearchStrategy.SMART_SEARCH. |
DATETIME |
Supported formats: %Y-%m-%dT%H:%M:%E*S%E*z (absl::RFC3339_full) %Y-%m-%dT%H:%M:%E*S %Y-%m-%dT%H:%M%E*z %Y-%m-%dT%H:%M %Y-%m-%dT%H%E*z %Y-%m-%dT%H %Y-%m-%d%E*z %Y-%m-%d %Y-%m %Y Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH. Supports query by DateTimeRangeArray. |
GEO_COORDINATE |
Geo coordinate type. Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH. Supports query by GeoLocationArray. |
PROTO_ANY |
Type to pass any proto as available in annotations.proto. Only use internally. Available proto types and its corresponding search behavior: - ImageObjectDetectionPredictionResult, allows SMART_SEARCH on displayNames and NO_SEARCH. - ClassificationPredictionResult, allows SMART_SEARCH on displayNames and NO_SEARCH. - ImageSegmentationPredictionResult, allows NO_SEARCH. - VideoActionRecognitionPredictionResult, allows SMART_SEARCH on displayName and NO_SEARCH. - VideoObjectTrackingPredictionResult, allows SMART_SEARCH on displayName and NO_SEARCH. - VideoClassificationPredictionResult, allows SMART_SEARCH on displayName and NO_SEARCH. - OccupancyCountingPredictionResult, allows EXACT_SEARCH on stats.full_frame_count.count and NO_SEARCH. - ObjectDetectionPredictionResult, allows SMART_SEARCH on identifiedBoxes.entity.label_string and NO_SEARCH. |
BOOLEAN |
Boolean type. Allowed search strategies: - DataSchema.SearchStrategy.NO_SEARCH, - DataSchema.SearchStrategy.EXACT_SEARCH. |
LIST |
List type. - Each element in the list must be of the exact same data schema; otherwise, they are invalid arguments. - List level cannot set search strategy. Leaf node level can do. - Elements cannot be another list (no list of list). - Elements can be CUSTOMIZED_STRUCT, and max number of layers is 10. |
CUSTOMIZED_STRUCT |
Struct type. - SearchStrategy: * Data Schema that's CUSTOMIZED_STRUCT cannot set search strategy. * Leaf-node elements allow setting search strategy based on element's SearchStrategy restriction. - Nested layer restrictions: * Data Schema that's CUSTOMIZED_STRUCT allows its fields to be of CUSTOMIZED_STRUCT as well, but the overall layers restriction is 10. |
ProtoAnyConfig
The configuration for PROTO_ANY
data type.
JSON representation |
---|
{ "typeUri": string } |
Fields | |
---|---|
typeUri |
The type URI of the proto message. |
ListConfig
The configuration for LIST
data type.
JSON representation |
---|
{
"valueSchema": {
object ( |
Fields | |
---|---|
valueSchema |
The value's data schema in the list. |
CustomizedStructConfig
The configuration for CUSTOMIZED_STRUCT
data type.
JSON representation |
---|
{
"fieldSchemas": {
string: {
object ( |
Fields | |
---|---|
fieldSchemas |
Direct child elements data schemas. An object containing a list of |
Granularity
The granularity of annotations under this DataSchema.
Enums | |
---|---|
GRANULARITY_UNSPECIFIED |
Unspecified granularity. |
GRANULARITY_ASSET_LEVEL |
Asset-level granularity (annotations must not contain partition info). |
GRANULARITY_PARTITION_LEVEL |
Partition-level granularity (annotations must contain partition info). |
SearchStrategy
The search strategy for annotations value of the key
.
JSON representation |
---|
{
"searchStrategyType": enum ( |
Fields | |
---|---|
searchStrategyType |
The type of search strategy to be applied on the |
SearchStrategyType
The types of search strategies to be applied on the annotation key.
Enums | |
---|---|
NO_SEARCH |
Annotatation values of the key above will not be searchable. |
EXACT_SEARCH |
When searching with key , the value must be exactly as the annotation value that has been ingested. |
SMART_SEARCH |
When searching with key , Warehouse will perform broad search based on semantic of the annotation value. |
Methods |
|
---|---|
|
Creates data schema inside corpus. |
|
Deletes data schema inside corpus. |
|
Gets data schema inside corpus. |
|
Lists a list of data schemas inside corpus. |
|
Updates data schema inside corpus. |