Field
Specification
{
"name": String,
"description": String,
"length": Long
"fieldType": <field type spec>,
"fieldIndex": Integer
}
Structure values
| Field Name | Type | Description | Required | Default |
|---|---|---|---|---|
| name | String | Field name. | Required | |
| description | String | Expanded field information. | None | |
| length | Long | Maximum length of a string that can be stored in this field. Applicable to string field type. | None | |
| fieldType | String or object | Field 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 | |
| fieldIndex | Integer | Order 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"
}