Class: Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/bigquery/storage/v1/avro.rb
Overview
Contains options specific to Avro Serialization.
Defined Under Namespace
Modules: PicosTimestampPrecision
Instance Attribute Summary collapse
-
#enable_display_name_attribute ⇒ ::Boolean
Enable displayName attribute in Avro schema.
-
#picos_timestamp_precision ⇒ ::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision
Optional.
Instance Attribute Details
#enable_display_name_attribute ⇒ ::Boolean
Returns Enable displayName attribute in Avro schema.
The Avro specification requires field names to be alphanumeric. By default, in cases when column names do not conform to these requirements (e.g. non-ascii unicode codepoints) and Avro is requested as an output format, the CreateReadSession call will fail.
Setting this field to true, populates avro field names with a placeholder value and populates a "displayName" attribute for every avro field with the original column name.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/avro.rb', line 66 class AvroSerializationOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The precision of the timestamp value in the Avro message. This precision # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. module PicosTimestampPrecision # Unspecified timestamp precision. The default precision is microseconds. PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 # Timestamp values returned by Read API will be truncated to microsecond # level precision. The value will be encoded as Avro TIMESTAMP type in a # 64 bit integer. TIMESTAMP_PRECISION_MICROS = 1 # Timestamp values returned by Read API will be truncated to nanosecond # level precision. The value will be encoded as Avro TIMESTAMP type in a # 64 bit integer. TIMESTAMP_PRECISION_NANOS = 2 # Read API will return full precision picosecond value. The value will be # encoded as a string which conforms to ISO 8601 format. TIMESTAMP_PRECISION_PICOS = 3 end end |
#picos_timestamp_precision ⇒ ::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision
Returns Optional. Set timestamp precision option. If not set, the default precision is microseconds.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/avro.rb', line 66 class AvroSerializationOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The precision of the timestamp value in the Avro message. This precision # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. module PicosTimestampPrecision # Unspecified timestamp precision. The default precision is microseconds. PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 # Timestamp values returned by Read API will be truncated to microsecond # level precision. The value will be encoded as Avro TIMESTAMP type in a # 64 bit integer. TIMESTAMP_PRECISION_MICROS = 1 # Timestamp values returned by Read API will be truncated to nanosecond # level precision. The value will be encoded as Avro TIMESTAMP type in a # 64 bit integer. TIMESTAMP_PRECISION_NANOS = 2 # Read API will return full precision picosecond value. The value will be # encoded as a string which conforms to ISO 8601 format. TIMESTAMP_PRECISION_PICOS = 3 end end |