public static final class Field.Builder
Methods
build()
public Field build()
Creates a Field
object.
Type | Description |
Field |
setDescription(String description)
public Field.Builder setDescription(String description)
Sets the field description. The maximum length is 16K characters.
Name | Description |
description | String |
Type | Description |
Field.Builder |
setMaxLength(Long maxLength)
public Field.Builder setMaxLength(Long maxLength)
Sets the maximum length of the field for STRING or BYTES type.
It is invalid to set value for types other than STRING or BYTES.
For STRING type, this represents the maximum UTF-8 length of strings allowed in the field. For BYTES type, this represents the maximum number of bytes in the field.
Name | Description |
maxLength | Long |
Type | Description |
Field.Builder |
setMode(Field.Mode mode)
public Field.Builder setMode(Field.Mode mode)
Sets the mode of the field. When not specified Mode#NULLABLE is used.
Name | Description |
mode | Field.Mode |
Type | Description |
Field.Builder |
setName(String name)
public Field.Builder setName(String name)
Sets 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.
Name | Description |
name | String |
Type | Description |
Field.Builder |
setPolicyTags(PolicyTags policyTags)
public Field.Builder setPolicyTags(PolicyTags policyTags)
Sets the policy tags for the field.
Name | Description |
policyTags | PolicyTags |
Type | Description |
Field.Builder |
setPrecision(Long precision)
public Field.Builder setPrecision(Long precision)
Precision can be used to constrain the maximum number of total digits allowed for NUMERIC or BIGNUMERIC types. It is invalid to set values for Precision for types other than // NUMERIC or BIGNUMERIC. For NUMERIC type, acceptable values for Precision must be: 1 \u2264 (Precision - Scale) \u2264 29. Values for Scale must be: 0 \u2264 Scale \u2264 9. For BIGNUMERIC type, acceptable values for Precision must be: 1 \u2264 (Precision - Scale) \u2264 38. Values for Scale must be: 0 \u2264 Scale \u2264 38.
Name | Description |
precision | Long |
Type | Description |
Field.Builder |
setScale(Long scale)
public Field.Builder setScale(Long scale)
Scale can be used to constrain the maximum number of digits in the fractional part of a NUMERIC or BIGNUMERIC type. If the Scale value is set, the Precision value must be set as well. It is invalid to set values for Scale for types other than NUMERIC or BIGNUMERIC. See the Precision field for additional guidance about valid values.
Name | Description |
scale | Long |
Type | Description |
Field.Builder |
setType(LegacySQLTypeName type, Field[] subFields)
public Field.Builder setType(LegacySQLTypeName type, Field[] subFields)
Sets the type of the field.
Name | Description |
type | LegacySQLTypeName BigQuery data type |
subFields | Field[] nested schema fields in case if |
Type | Description |
Field.Builder |
setType(LegacySQLTypeName type, FieldList subFields)
public Field.Builder setType(LegacySQLTypeName type, FieldList subFields)
Sets the type of the field.
Name | Description |
type | LegacySQLTypeName BigQuery data type |
subFields | FieldList nested schema fields, in case if |
Type | Description |
Field.Builder |
setType(StandardSQLTypeName type, Field[] subFields)
public Field.Builder setType(StandardSQLTypeName type, Field[] subFields)
Sets the type of the field.
Name | Description |
type | StandardSQLTypeName BigQuery data type |
subFields | Field[] nested schema fields in case if |
Type | Description |
Field.Builder |
setType(StandardSQLTypeName type, FieldList subFields)
public Field.Builder setType(StandardSQLTypeName type, FieldList subFields)
Sets the type of the field.
Name | Description |
type | StandardSQLTypeName BigQuery data type |
subFields | FieldList nested schema fields in case if |
Type | Description |
Field.Builder |