Create table
POST/metalakes/:metalake/catalogs/:catalog/schemas/:schema/tables
Creates a table in the schema with the given columns, partitioning, distribution, sort orders and indexes, and returns the created 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
- application/json
Body
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 [
]
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
properties
object
nullable
A map of table properties
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".
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
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)
Responses
- 200
- 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"
]
]
}
]
}
}
A table with the same 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"
]
}