Skip to main content

Field

Specification

{
"name": String,
"description": String,
"length": Long
"fieldType": <field type spec>,
"fieldIndex": Integer
}

Structure values

Field NameTypeDescriptionRequiredDefault
nameStringField name.Required
descriptionStringExpanded field information.None
lengthLongMaximum length of a string that can be stored in this field. Applicable to string field type.None
fieldTypeString or objectField data type. Supported types: int, decimal, string, long, float, double, timestamp, date, boolean, binary, array, map, struct. int, decimal, string, long, float, double, timestamp, date, boolean, binaryfields are specified with string values. array, map, and struct fields are specified with JSON.Required
fieldIndexIntegerOrder of the fields in the table.None

Field type specifications for array, map, and struct fields

Array field

{
"dataType": "array",
"elementType": <field type spec>
}

Map field

{
"dataType": "map",
"keyType": <field type spec>,
"valueType": <field type spec>
}

Struct field

{
"dataType": "struct",
"fields": [
{
"name": String,
"fieldType": <field type spec>
}
]
}

Example

{
"name": "price",
"description": "This is the price for which the product sold.",
"fieldType": "long"
}