Update table
PUT/metalakes/:metalake/catalogs/:catalog/schemas/:schema/tables/:table
Applies one or more changes to a table, such as a rename, property changes or column additions, updates and deletions, and returns the updated table.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
The name of the catalog
The name of the schema
The name of the table
- application/json
Body
Array [
- RenameTableRequest
- UpdateTableCommentRequest
- SetTablePropertyRequest
- RemoveTablePropertyRequest
- AddTableColumnRequest
- RenameTableColumnRequest
- UpdateTableColumnTypeRequest
- UpdateTableColumnCommentRequest
- UpdateTableColumnPositionRequest
- UpdateTableColumnNullabilityRequest
- UpdateTableColumnDefaultValueRequest
- DeleteTableColumnRequest
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
- FirstColumnPosition
- AfterColumnPosition
- DefaultColumnPosition
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
- FirstColumnPosition
- AfterColumnPosition
- DefaultColumnPosition
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
updates
object[]
required
oneOf
Possible values: [rename]
The new name of the table
The new schema name of the table, if not provided, the schema will not be changed
Possible values: [updateComment]
The new comment of the table
Possible values: [setProperty]
The name of the property to set
The value of the property to set
Possible values: [removeProperty]
The name of the property to remove
Possible values: [addColumn]
The name of the field, may be with multiple levels
type
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The comment of the column to add
position
object
nullable
The position of the column to add
oneOf
string
Possible values: [first]
The name of the column which the new column will be added after
The default position of the column to add, the position is determined by the catalog implementation
string
Possible values: [default]
Default value: true
Whether the column to add is nullable
Whether the column to add should auto increment
defaultValue
object
nullable
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
Possible values: [renameColumn]
The name of the field, may be with multiple levels
The new name of the field
Possible values: [updateColumnType]
The name of the field, may be with multiple levels
newType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
Possible values: [updateColumnComment]
The name of the field, may be with multiple levels
The new comment of the column
Possible values: [updateColumnPosition]
The name of the field, may be with multiple levels
newPosition
object
required
The new position of the column
oneOf
string
Possible values: [first]
The name of the column which the new column will be added after
The default position of the column to add, the position is determined by the catalog implementation
string
Possible values: [default]
Possible values: [updateColumnNullability]
The name of the field, may be with multiple levels
Whether the column is nullable
Possible values: [updateColumnDefaultValue]
The name of the field, may be with multiple levels
newDefaultValue
object
required
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
Possible values: [deleteColumn]
The name of the field, may be with multiple levels
If true, the request will not fail if the column does not exist
Responses
- 200
- 400
- 404
- 409
- 5xx
The table, with its columns, partitioning, distribution, sort orders, indexes, comment, properties and audit information.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- TableResponse
- MysqlTableResponse
- PostgresqlTableResponse
Schema
Array [
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
Array [
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
Array [
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
Array [
- IdentityPartitioning
- YearPartitioning
- MonthPartitioning
- DayPartitioning
- HourPartitioning
- BucketPartitioning
- TruncatePartitioning
- ListPartitioning
- RangePartitioning
- FunctionPartitioning
Array [
]
Array [
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
Array [
- Literal
- Field
- Function
- PrimitiveType
- StructType
- ListType
- MapType
- UnionType
- UnparsedType
- ExternalType
Array [
- MOD1
- MOD2
]
- MOD1
- MOD2
- MOD1
- MOD2
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
]
Array [
]
Possible values: [0]
Status code of the response
table
object
A table object
The name of the table
columns
object[]
required
A list of columns
The name of the column
type
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The comment of the column
Default value: true
Whether the column is nullable
defaultValue
object
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
Whether the column is auto increment
The comment of the table
audit
object
required
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
properties
object
nullable
A map of table properties
distribution
object
nullable
Describes how data is distributed across partitions
Possible values: [none, hash, range, even]
Default value: hash
The distribution strategy. Responses return the value in lowercase, and a table with no distribution returns none. Requests accept any case, and random is accepted as an alias of even.
The number of buckets/distribution
funcArgs
object[]
nullable
required
The arguments of the distribution function
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
sortOrders
object[]
nullable
Describes the sort order of the table data
sortTerm
object
required
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
Possible values: [asc, desc]
Default value: asc
The direction of the sort order
Possible values: [nulls_first, nulls_last]
| The sort order of null values. The default value is "nulls_first" if the direction is "asc", otherwise "nulls_last".
partitioning
object[]
nullable
partitioning of the table data
oneOf
Possible values: [identity]
The name of the field, may be with multiple levels
Possible values: [year]
The name of the field, may be with multiple levels
Possible values: [month]
The name of the field, may be with multiple levels
Possible values: [day]
The name of the field, may be with multiple levels
Possible values: [hour]
The name of the field, may be with multiple levels
Possible values: [bucket]
The number of buckets
The names of the fields, each field may be with multiple levels
Possible values: [truncate]
The width of the truncate
The name of the field, may be with multiple levels
Possible values: [list]
The names of the fields, each field may be with multiple levels
assignments
object[]
The pre-assigned list partitions
Possible values: [list]
The name of the partition
The values of the partition
properties
object
nullable
The properties of the partition
Possible values: [range]
The name of the field, may be with multiple levels
assignments
object[]
The pre-assigned range partitions
Possible values: [range]
The name of the partition
upper
object
required
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
lower
object
required
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
properties
object
nullable
The properties of the partition
Possible values: [function]
The name of the partitioning function
funcArgs
object[]
required
The arguments of the partitioning function
oneOf
Possible values: [literal]
dataType
object
required
The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.
oneOf
The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
type
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the struct field is nullable
The comment of the struct field
Possible values: [list]
Default value: true
Whether the list contains null values
elementType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [map]
keyType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
valueType
object
required
A nested data type, in any form that DataType describes.
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Default value: true
Whether the value of the map contains null values
Possible values: [union]
types
object[]
required
oneOf
A primitive type, as in PrimitiveType
string
A struct, list, map, union, unparsed or external type, as in DataType
object
Possible values: [unparsed]
The unparsed type
Possible values: [external]
The string representation of this type in the catalog
The string format of the literal value
Possible values: [field]
The name of the field, may be with multiple levels
Possible values: [function]
The name of the function
The arguments of the function
indexes
object[]
nullable
Indexes of the table
Possible values: [PRIMARY_KEY, UNIQUE_KEY, SCALAR, BTREE, BITMAP, LABEL_LIST, INVERTED, VECTOR, IVF_FLAT, IVF_SQ, IVF_PQ, IVF_HNSW_SQ, IVF_HNSW_PQ, DATA_SKIPPING_MINMAX, DATA_SKIPPING_BLOOM_FILTER, DATA_SKIPPING_SET]
The type of the index, one of the values of Index.IndexType. Responses return the value in uppercase; requests accept any case. Which types a table accepts depends on its catalog.
The name of the index
The names of the fields, each field may be with multiple levels
properties
object
Extra index properties (e.g., granularity for ClickHouse data-skipping indexes)
{
"code": 0,
"table": {
"name": "string",
"columns": [
{
"name": "string",
"type": "integer",
"comment": "string",
"nullable": true,
"defaultValue": {
"type": "literal",
"dataType": "integer",
"value": "string"
},
"autoIncrement": false
}
],
"comment": "string",
"audit": {
"creator": "string",
"createTime": "2024-07-29T15:51:28.071Z",
"lastModifier": "string",
"lastModifiedTime": "2024-07-29T15:51:28.071Z"
},
"properties": {},
"distribution": {
"strategy": "hash",
"number": 0,
"funcArgs": [
{},
{},
{}
]
},
"sortOrders": [
{
"sortTerm": {},
"direction": "asc",
"nullOrdering": "nulls_first"
}
],
"partitioning": [
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
],
"indexes": [
{
"indexType": "PRIMARY_KEY",
"name": "string",
"fieldNames": [
[
"string"
]
],
"properties": {}
}
]
}
}
{
"code": 0,
"table": {
"name": "my_hive_table",
"comment": "This is my Hive table",
"columns": [
{
"name": "id",
"type": "integer",
"comment": "id column comment",
"nullable": true,
"autoIncrement": false
},
{
"name": "name",
"type": "string",
"comment": "name column comment",
"nullable": true
},
{
"name": "age",
"type": "integer",
"comment": "age column comment",
"nullable": true
},
{
"name": "dt",
"type": "date",
"comment": "dt column comment",
"nullable": true
}
],
"properties": {
"input-format": "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat",
"transient_lastDdlTime": "1702033666",
"output-format": "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat",
"location": "hdfs://0.0.0.0:9000/user/hive/warehouse/my_hive_table",
"table-type": "MANAGED_TABLE",
"serde-lib": "org.apache.hadoop.hive.ql.io.orc.OrcSerde",
"serde-name": "my_hive_table"
},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T11:07:46.938Z"
},
"distribution": {
"strategy": "hash",
"number": 32,
"funcArgs": [
{
"type": "field",
"fieldName": [
"id"
]
}
]
},
"sortOrders": [
{
"sortTerm": {
"type": "field",
"fieldName": [
"age"
]
},
"direction": "asc",
"nullOrdering": "nulls_first"
}
],
"partitioning": [
{
"strategy": "identity",
"fieldName": [
"dt"
]
}
],
"indexes": []
}
}
{
"code": 0,
"table": {
"name": "my_mysql_table",
"comment": "This is my MySQL table",
"columns": [
{
"name": "id",
"type": "integer",
"comment": "id column comment",
"nullable": true,
"autoIncrement": true
},
{
"name": "name",
"type": "string",
"comment": "name column comment",
"nullable": true
},
{
"name": "age",
"type": "integer",
"comment": "age column comment",
"nullable": true
},
{
"name": "dt",
"type": "date",
"comment": "dt column comment",
"nullable": true
}
],
"properties": {
"engine": "InnoDB",
"auto-increment-offset": "1"
},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T11:07:46.938Z"
},
"distribution": null,
"sortOrders": [],
"partitioning": [],
"indexes": [
{
"indexType": "PRIMARY_KEY",
"name": "PRIMARY",
"fieldNames": [
[
"id"
]
]
},
{
"indexType": "UNIQUE_KEY",
"name": "uk_1",
"fieldNames": [
[
"name"
]
]
},
{
"indexType": "UNIQUE_KEY",
"name": "uk_2",
"fieldNames": [
[
"name"
],
[
"age"
],
[
"dt"
]
]
}
]
}
}
{
"code": 0,
"table": {
"name": "my_postgresql_table",
"comment": "This is my PostgreSQL table",
"columns": [
{
"name": "id",
"type": "integer",
"comment": "id column comment",
"nullable": true,
"autoIncrement": true
},
{
"name": "name",
"type": "string",
"comment": "name column comment",
"nullable": true
},
{
"name": "age",
"type": "integer",
"comment": "age column comment",
"nullable": true
},
{
"name": "dt",
"type": "date",
"comment": "dt column comment",
"nullable": true
}
],
"properties": {},
"audit": {
"creator": "gravitino",
"createTime": "2023-12-08T11:07:46.938Z"
},
"distribution": null,
"sortOrders": [],
"partitioning": [],
"indexes": [
{
"indexType": "PRIMARY_KEY",
"name": "PRIMARY",
"fieldNames": [
[
"id"
]
]
},
{
"indexType": "UNIQUE_KEY",
"name": "uk_1",
"fieldNames": [
[
"name"
]
]
},
{
"indexType": "UNIQUE_KEY",
"name": "uk_2",
"fieldNames": [
[
"name"
],
[
"age"
],
[
"dt"
]
]
}
]
}
}
The request is malformed or fails validation, for example because of invalid JSON, a missing required field or an invalid parameter value. The body is normally an error model, although the server's middleware can return plain text instead.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
The metalake, catalog, schema or table does not exist.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
- NoSuchCatalogException
- NoSuchSchemaException
- NoSuchTableException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "NoSuchMetalakeException",
"message": "Failed to operate metalake(s) [test] operation [LOAD], reason [NoSuchMetalakeException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetalakeException: Metalake test does not exist",
"..."
]
}
{
"code": 1003,
"type": "NoSuchCatalogException",
"message": "Failed to operate catalog(s) [test] operation [LOAD] under metalake [my_test_metalake], reason [NoSuchCatalogException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchCatalogException: Catalog my_test_metalake.test does not exist",
"..."
]
}
{
"code": 1003,
"type": "NoSuchSchemaException",
"message": "Failed to operate schema(s) [my_hive_schema1] operation [LOAD] under catalog [my_hive_catalog], reason [NoSuchSchemaException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchSchemaException: Hive schema (database) does not exist: my_hive_schema1 in Hive Metastore",
"..."
]
}
{
"code": 1003,
"type": "NoSuchTableException",
"message": "Failed to operate table(s) [test_table] operation [LOAD] under schema [test_schema], reason [NoSuchTableException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchTableException: Hive table does not exist: test_table in Hive Metastore",
"..."
]
}
A table with the new name already exists in the schema.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- TableAlreadyExistsErrorResponse
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1004,
"type": "TableAlreadyExistsException",
"message": "Failed to operate table(s) [my_hive_table] operation [CREATE] under schema [my_hive_schema], reason [TableAlreadyExistsException]",
"stack": [
"org.apache.gravitino.exceptions.TableAlreadyExistsException: Table already exists: my_hive_table",
"..."
]
}
The server hit an internal error that the client usually cannot fix by changing the request.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}