Class: Google::Cloud::VisionAI::V1::BigQueryConfig
- Inherits:
-
Object
- Object
- Google::Cloud::VisionAI::V1::BigQueryConfig
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/visionai/v1/platform.rb
Overview
Message of configurations for BigQuery processor.
Defined Under Namespace
Classes: CloudFunctionMappingEntry
Instance Attribute Summary collapse
-
#cloud_function_mapping ⇒ ::Google::Protobuf::Map{::String => ::String}
Data Schema By default, Vision AI Application will try to write annotations to the target BigQuery table using the following schema:.
-
#create_default_table_if_not_exists ⇒ ::Boolean
If true, App Platform will create the BigQuery DataSet and the BigQuery Table with default schema if the specified table doesn't exist.
-
#table ⇒ ::String
BigQuery table resource for Vision AI Platform to ingest annotations to.
Instance Attribute Details
#cloud_function_mapping ⇒ ::Google::Protobuf::Map{::String => ::String}
Data Schema By default, Vision AI Application will try to write annotations to the target BigQuery table using the following schema:
ingestion_time: TIMESTAMP, the ingestion time of the original data.
application: STRING, name of the application which produces the annotation.
instance: STRING, Id of the instance which produces the annotation.
node: STRING, name of the application graph node which produces the annotation.
annotation: STRING or JSON, the actual annotation protobuf will be converted to json string with bytes field as 64 encoded string. It can be written to both String or Json type column.
To forward annotation data to an existing BigQuery table, customer needs to make sure the compatibility of the schema. The map maps application node name to its corresponding cloud function endpoint to transform the annotations directly to the google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or proto_rows should be set). If configured, annotations produced by corresponding application node will sent to the Cloud Function at first before be forwarded to BigQuery.
If the default table schema doesn't fit, customer is able to transform the annotation output from Vision AI Application to arbitrary BigQuery table schema with CloudFunction.
- The cloud function will receive AppPlatformCloudFunctionRequest where the annotations field will be the json format of Vision AI annotation.
- The cloud function should return AppPlatformCloudFunctionResponse with AppendRowsRequest stored in the annotations field.
- To drop the annotation, simply clear the annotations field in the returned AppPlatformCloudFunctionResponse.
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 |
# File 'proto_docs/google/cloud/visionai/v1/platform.rb', line 1844 class BigQueryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class CloudFunctionMappingEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#create_default_table_if_not_exists ⇒ ::Boolean
Returns If true, App Platform will create the BigQuery DataSet and the BigQuery Table with default schema if the specified table doesn't exist. This doesn't work if any cloud function customized schema is specified since the system doesn't know your desired schema. JSON column will be used in the default table created by App Platform.
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 |
# File 'proto_docs/google/cloud/visionai/v1/platform.rb', line 1844 class BigQueryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class CloudFunctionMappingEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#table ⇒ ::String
Returns BigQuery table resource for Vision AI Platform to ingest annotations to.
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 |
# File 'proto_docs/google/cloud/visionai/v1/platform.rb', line 1844 class BigQueryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class CloudFunctionMappingEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |