Add partitions
POST/metalaskes/:metalake/catalogs/:catalog/schemas/:schema/tables/:table/partitions
Add partitions
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 [
- IdentityPartition
 - RangePartition
 - ListPartition
 Array [
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
]
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
]
partitions
object[]
required
The partitions to add
oneOf
Possible values: [identity]
The name of the partition
The names of the fields, each field may be with multiple levels
values
object[]
required
The values of the partition, must be the same length and order as fieldNames
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
properties
object
nullable
The properties of the partition
Possible values: [range]
The name of the partition
upper
object
required
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
lower
object
required
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
properties
object
nullable
The properties of the partition
Possible values: [list]
The name of the partition
The values of the partition
properties
object
nullable
The properties of the partition
Responses
- 200
 - 409
 - 5xx
 
Returns list of partition objects
- application/vnd.gravitino.v1+json
 
- Schema
 - Example (from schema)
 
Schema
Array [
- IdentityPartition
 - RangePartition
 - ListPartition
 Array [
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
]
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
- PrimitiveType
 - StructType
 - ListType
 - MapType
 - UnionType
 - UnparsedType
 Array [
]
]
Possible values: [0]
Status code of the response
partitions
object[]
A list of partitions
oneOf
Possible values: [identity]
The name of the partition
The names of the fields, each field may be with multiple levels
values
object[]
required
The values of the partition, must be the same length and order as fieldNames
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
properties
object
nullable
The properties of the partition
Possible values: [range]
The name of the partition
upper
object
required
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
lower
object
required
Possible values: [literal]
dataType
object
required
oneOf
string
Possible values: [struct]
fields
object[]
required
The name of the struct field
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
Possible values: [map]
Default value: true
Whether the value of the map contains null values
Possible values: [union]
Possible values: [unparsed]
The unparsed type
The string format of the literal value
properties
object
nullable
The properties of the partition
Possible values: [list]
The name of the partition
The values of the partition
properties
object
nullable
The properties of the partition
{
  "code": 0,
  "partitions": [
    {},
    {},
    {}
  ]
}
Conflict - The target partition already exists
- application/vnd.gravitino.v1+json
 
- Schema
 - Example (from schema)
 - PartitionAlreadyExistsErrorResponse
 
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
{
  "code": 1002,
  "type": "string",
  "message": "string",
  "stack": [
    "string"
  ]
}
{
  "code": 1004,
  "type": "PartitionAlreadyExistsException",
  "message": "Failed to operate partition(s) operation [CREATE] of table [table1], reason [p1]",
  "stack": [
    "org.apache.gravitino.exceptions.PartitionAlreadyExistsException: p1",
    "..."
  ]
}
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
- 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
{
  "code": 1002,
  "type": "string",
  "message": "string",
  "stack": [
    "string"
  ]
}
{
  "code": 1002,
  "type": "RuntimeException",
  "message": "Internal Server Error",
  "stack": [
    "java.lang.RuntimeException: Internal Server Error"
  ]
}