Updates the information of a data table in a data lake.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dlf:UpdateTable |
*All Resource
|
None | None |
Request syntax
PUT /api/metastore/catalogs/databases/tables HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Body |
object |
No |
The HTTP request body. It must be in JSON format. |
|
| CatalogId |
string |
No |
The ID of the data catalog. |
1344371 |
| DatabaseName |
string |
No |
The name of the database. |
database_test |
| SkipArchive |
boolean |
No |
By default, updating a data table creates a new archived version. If you set SkipArchive to true, no new version is created. |
false |
| TableInput | TableInput |
No |
The detailed information of the data table after the update. |
|
| TableName |
string |
No |
The name of the data table. |
test_table_20201223 |
| IsAsync |
boolean |
No |
Specifies whether to perform an asynchronous update. |
true |
| AllowPartitionKeyChange |
boolean |
No |
Specifies whether to allow updates to the partition key. |
false |
IsAsync:
true: Specifies an asynchronous invocation. The API returns a response immediately without waiting for the background task to complete. The response includes a task ID that the client can use to query the task status.
false: Specifies a synchronous call. The API returns a response only after the background task is complete. If the background task takes a long time, the request might time out.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| Code |
string |
The description of the status code. |
OK |
| Message |
string |
The returned message. |
. |
| RequestId |
string |
The request ID. |
B7F4B621-E41E-4C84-B97F-42B5380A32BB |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
| TaskId |
string |
The ID of the asynchronous task. |
aa689782deb97265701f57324fc4ae42 |
Error codes:
InvalidOperation: The specified database or table does not exist.
InternalError: An internal error occurred. For more information, see the Message parameter.
TaskId: The UpdateTable operation also updates the information of all partitions in the table. If you perform an asynchronous commit, a task ID is returned. You can use this ID to track the status of the asynchronous task. This parameter is not returned for synchronous commits.
Examples
Success response
JSON format
{
"Code": "OK",
"Message": ".",
"RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
"Success": true,
"TaskId": "aa689782deb97265701f57324fc4ae42"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.