Class: Google::Cloud::Bigquery::Storage::V1::TableFieldSchema
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::Storage::V1::TableFieldSchema
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/bigquery/storage/v1/table.rb
Overview
TableFieldSchema defines a single field/column within a table schema.
Defined Under Namespace
Modules: Mode, Type Classes: FieldElementType
Instance Attribute Summary collapse
-
#default_value_expression ⇒ ::String
Optional.
-
#description ⇒ ::String
Optional.
-
#fields ⇒ ::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>
Optional.
-
#max_length ⇒ ::Integer
Optional.
-
#mode ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode
Optional.
-
#name ⇒ ::String
Required.
-
#precision ⇒ ::Integer
Optional.
-
#range_element_type ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType
Optional.
-
#scale ⇒ ::Integer
Optional.
-
#type ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type
Required.
Instance Attribute Details
#default_value_expression ⇒ ::String
Returns Optional. A SQL expression to specify the default value for this field.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#description ⇒ ::String
Returns Optional. The field description. The maximum length is 1,024 characters.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#fields ⇒ ::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>
Returns Optional. Describes the nested schema fields if the type property is set to STRUCT.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#max_length ⇒ ::Integer
Returns Optional. Maximum length of values of this field for STRINGS or BYTES.
If max_length is not specified, no maximum length constraint is imposed on this field.
If type = "STRING", then max_length represents the maximum UTF-8 length of strings in this field.
If type = "BYTES", then max_length represents the maximum number of bytes in this field.
It is invalid to set this field if type is not "STRING" or "BYTES".
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#mode ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode
Returns Optional. The field mode. The default value is NULLABLE.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#name ⇒ ::String
Returns Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#precision ⇒ ::Integer
Returns Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of digits in the fractional part in base 10) constraints for values of this field for NUMERIC or BIGNUMERIC.
It is invalid to set precision or scale if type is not "NUMERIC" or "BIGNUMERIC".
If precision and scale are not specified, no value range constraint is imposed on this field insofar as values are permitted by the type.
Values of this NUMERIC or BIGNUMERIC field must be in this range when:
- Precision (P) and scale (S) are specified: [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)]
- Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): [-10^P + 1, 10^P - 1].
Acceptable values for precision and scale if both are specified:
- If type = "NUMERIC": 1 <= precision - scale <= 29 and 0 <= scale <= 9.
- If type = "BIGNUMERIC": 1 <= precision - scale <= 38 and 0 <= scale <= 38.
Acceptable values for precision if only precision is specified but not scale (and thus scale is interpreted to be equal to zero):
- If type = "NUMERIC": 1 <= precision <= 29.
- If type = "BIGNUMERIC": 1 <= precision <= 38.
If scale is specified but not precision, then it is invalid.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#range_element_type ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType
Returns Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Possible values for the field element type of a RANGE include:
- DATE
- DATETIME
- TIMESTAMP.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#scale ⇒ ::Integer
Returns Optional. See documentation for precision.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |
#type ⇒ ::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type
Returns Required. The field data type.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'proto_docs/google/cloud/bigquery/storage/v1/table.rb', line 118 class TableFieldSchema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the type of a field element. # @!attribute [rw] type # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] # Required. The type of a field element. class FieldElementType include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end module Type # Illegal value TYPE_UNSPECIFIED = 0 # 64K, UTF8 STRING = 1 # 64-bit signed INT64 = 2 # 64-bit IEEE floating point DOUBLE = 3 # Aggregate type STRUCT = 4 # 64K, Binary BYTES = 5 # 2-valued BOOL = 6 # 64-bit signed usec since UTC epoch TIMESTAMP = 7 # Civil date - Year, Month, Day DATE = 8 # Civil time - Hour, Minute, Second, Microseconds TIME = 9 # Combination of civil date and civil time DATETIME = 10 # Geography object GEOGRAPHY = 11 # Numeric value NUMERIC = 12 # BigNumeric value BIGNUMERIC = 13 # Interval INTERVAL = 14 # JSON, String JSON = 15 # RANGE RANGE = 16 end module Mode # Illegal value MODE_UNSPECIFIED = 0 NULLABLE = 1 REQUIRED = 2 REPEATED = 3 end end |