Modifier and Type | Method and Description |
---|---|
Field |
build()
Creates a
Field object. |
Field.Builder |
setDescription(String description)
Sets the field description.
|
Field.Builder |
setMode(Field.Mode mode)
Sets the mode of the field.
|
Field.Builder |
setName(String name)
Sets the field name.
|
Field.Builder |
setType(LegacySQLTypeName type,
Field... subFields)
Sets the type of the field.
|
Field.Builder |
setType(LegacySQLTypeName type,
FieldList subFields)
Sets the type of the field.
|
Field.Builder |
setType(StandardSQLTypeName type,
Field... subFields)
Sets the type of the field.
|
Field.Builder |
setType(StandardSQLTypeName type,
FieldList subFields)
Sets the type of the field.
|
public Field.Builder setName(String name)
public Field.Builder setType(LegacySQLTypeName type, Field... subFields)
type
- BigQuery data typesubFields
- nested schema fields in case if type
is LegacySQLTypeName.RECORD
, empty otherwiseIllegalArgumentException
- if type == LegacySQLTypeName.RECORD &&
subFields.length == 0
or if type != LegacySQLTypeName.RECORD && subFields.length
!= 0
public Field.Builder setType(StandardSQLTypeName type, Field... subFields)
type
- BigQuery data typesubFields
- nested schema fields in case if type
is StandardSQLTypeName.STRUCT
, empty otherwiseIllegalArgumentException
- if type == StandardSQLTypeName.STRUCT &&
subFields.length == 0
or if type != StandardSQLTypeName.STRUCT &&
subFields.length != 0
public Field.Builder setType(LegacySQLTypeName type, FieldList subFields)
type
- BigQuery data typesubFields
- nested schema fields, in case if type
is LegacySQLTypeName.RECORD
, null
otherwise.IllegalArgumentException
- if type == LegacySQLTypeName.RECORD && (subFields ==
null || subFields.isEmpty())
or if type != LegacySQLTypeName.RECORD && subFields
!= null
public Field.Builder setType(StandardSQLTypeName type, FieldList subFields)
type
- BigQuery data typesubFields
- nested schema fields in case if type
is StandardSQLTypeName.STRUCT
, empty otherwiseIllegalArgumentException
- if type == StandardSQLTypeName.STRUCT &&
subFields.length == 0
or if type != StandardSQLTypeName.STRUCT &&
subFields.length != 0
public Field.Builder setMode(Field.Mode mode)
Field.Mode.NULLABLE
is used.public Field.Builder setDescription(String description)
public Field build()
Field
object.Copyright © 2019 Google LLC. All rights reserved.