Get partition by name
GET/metalakes/:metalake/catalogs/:catalog/schemas/:schema/tables/:table/partitions/:partition
Returns the specified partition
Request
Path Parameters
The name of the metalake
The name of the catalog
The name of the schema
The name of the table
The name of the partition
Responses
- 200
- 404
- 5xx
Returns include the partition object
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- GetHivePartitionResponse
Schema
- 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
partition
object
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,
"partition": {}
}
{
"code": 0,
"partition": {
"type": "identity",
"name": "hive_col_name2=2023-01-01/hive_col_name3=gravitino_it_test",
"fieldNames": [
[
"hive_col_name2"
],
[
"hive_col_name3"
]
],
"values": [
{
"type": "literal",
"dataType": "string",
"value": "2023-01-01"
},
{
"type": "literal",
"dataType": "string",
"value": "gravitino_it_test"
}
],
"properties": {
"totalSize": "2",
"numRows": "0",
"rawDataSize": "0",
"COLUMN_STATS_ACCURATE": "{\"BASIC_STATS\":\"true\"}",
"numFiles": "1",
"transient_lastDdlTime": "1706950516"
}
}
}
Not Found - The specified partition does not exist
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
- NoSuchCatalogException
- NoSuchSchemaException
- NoSuchTableException
- NoSuchPartitionException
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": 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",
"..."
]
}
{
"code": 1003,
"type": "NoSuchPartitionException",
"message": "Failed to operate partition(s) operation [GET] of table [table1], reason [p3]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchPartitionException: p3",
"..."
]
}
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"
]
}