Creates multiple partitions for a data lakehouse table.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:BatchCreateDataLakePartitions |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CatalogName |
string |
Yes |
The name of the data catalog. |
hive |
| DbName |
string |
Yes |
The name of the database. |
default |
| TableName |
string |
Yes |
The name of the table. |
test_table |
| PartitionInputs |
array |
Yes |
The information about the partitions to be created. |
|
| DLPartitionInput |
No |
The information about the data lake partition. |
||
| IfNotExists |
boolean |
No |
Specifies whether to ignore the exception if the name of a new partition duplicates an existing partition name. Valid values:
|
true |
| NeedResult |
boolean |
No |
Specifies whether to return partition information. If this parameter is set to true, the Partitions field is returned. |
true |
| DataRegion |
string |
Yes |
The region where the data lake resides. |
cn-hangzhou |
| Tid |
integer |
No |
The tenant ID. Note
Move the pointer over the profile picture in the upper-right corner of the console to view the tenant ID. For more information, see View tenant information. |
3*** |
| WorkspaceId |
integer |
No |
The workspace ID. |
12**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message returned if the call fails. |
UnknownError |
| Success |
string |
Indicates whether the request is successful. Valid values:
|
true |
| Partitions |
array |
The list of newly created partitions. This field is returned when the NeedResult parameter is set to true. |
|
| DLPartition |
The details of the partitions. |
Examples
Success response
JSON format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": "true",
"Partitions": [
{
"CatalogName": "hive",
"DbName": "default",
"TableName": "table_name",
"Values": [
"part_val1"
],
"CreateTime": 1735109884,
"LastAccessTime": 1608707407,
"Sd": {
"OriginalColumns": [
{
"Name": "col",
"Type": "string",
"Comment": "from deserializer"
}
],
"Parameters": {
"test": "test",
"test2": 1
},
"OutputFormat": "org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat",
"Columns": [
{
"Name": "col",
"Type": "string",
"Comment": "from deserializer"
}
],
"SerdeInfo": {
"Name": "name",
"SerializationLib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
"Parameters": {
"serialization.format": "1"
},
"Description": "\"serialize\"",
"SerializerClass": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
"DeserializerClass": "org.apache.hadoop.hive.serde2.OpenCSVSerde",
"SerdeType": 0
},
"NumBuckets": -1,
"SortCols": [
{
"Col": "col1",
"Order": 1
}
],
"SkewedInfo": {
"SkewedColValues": [
[
"\"123\""
]
],
"SkewedColValueLocationMaps": {
"test": "test",
"test2": 1
},
"SkewedColNames": [
"col1"
]
},
"InputFormat": "org.apache.hadoop.mapred.SequenceFileInputFormat",
"IsCompressed": false,
"BucketCols": [
"2010"
],
"Location": "oss://xxx"
},
"Parameters": {
"key": "{\"key\":\"value\"}"
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.