Creates a MaxCompute table.
This API has been deprecated with no replacement. While temporary access is maintained, no further updates or bug fixes will be provided. To ensure continued functionality, plan your migration and contact your account manager for support.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| IsView |
integer |
No |
Specifies whether to create a view or table. Valid values:
|
0 |
| Visibility |
integer |
No |
Specifies whether the table or workspace is visible. Valid values:
|
1 |
| LifeCycle |
integer |
No |
The lifecycle of the table. Unit: days. By default, this parameter is left empty, which indicates that the table is permanently stored. |
10 |
| CategoryId |
integer |
No |
The ID of the associated category. You can call the GetMetaCategory operation to query the IDs of all categories that can be associated. |
101 |
| LogicalLevelId |
integer |
No |
The ID of the logical level. |
101 |
| PhysicsLevelId |
integer |
No |
The ID of the physical level. |
101 |
| ExternalTableType |
string |
No |
The storage type of the external table. Valid values:
|
0 |
| Location |
string |
No |
The storage location of the external table. |
location |
| ProjectId |
integer |
No |
The DataWorks workspace ID. |
23 |
| TableName |
string |
Yes |
The name of the table. |
tableName1 |
| Endpoint |
string |
No |
The endpoint of MaxCompute. |
odps://abc |
| EnvType |
integer |
No |
The environment type of the DataWorks workspace. Valid values:
|
1 |
| AppGuid |
string |
No |
The ID of the MaxCompute project. Specify the ID in the odps.{projectName} format. |
odps.test |
| Comment |
string |
No |
The comment. |
Comment |
| HasPart |
integer |
No |
Specifies whether to create a MaxCompute partitioned table. Valid values: 1 and 0. The value 1 indicates a partitioned table. The value 0 indicates a non-partitioned table. This parameter is deprecated. Do not use this parameter. The Column.N.isPartitionCol parameter is used to specify whether to create a MaxCompute partitioned table. If the Column.N.isPartitionCol parameter is set to true, a MaxCompute partitioned table is created. |
0 |
| ClientToken |
string |
No |
A reserved parameter. |
Reserved |
| Schema |
string |
No |
The schema information of the table. You need to enter the schema information of the table if you enable the table schema in MaxCompute. |
default |
| Columns |
array<object> |
Yes |
The list of fields. A maximum of 1,000 fields are supported. |
|
|
object |
No |
The field. |
||
| ColumnNameCn |
string |
No |
The display name of the field. |
Chinese name |
| ColumnName |
string |
Yes |
The name of the field. You can configure a maximum of 1,000 fields when you call the CreateTable operation to create a table. |
columnName1 |
| Comment |
string |
No |
The comment of the field. |
Comment |
| ColumnType |
string |
Yes |
The data type of the field. For information about supported data types, see Data type editions in MaxCompute documentation. |
string |
| SeqNumber |
integer |
No |
The sequence number of the field. You can use this parameter to specify how fields are sorted in a table. By default, fields are sorted based on the order in which requests are created. If the field is a partition field, this parameter is not supported. |
1 |
| Length |
integer |
No |
The length of the field. For more information, see MaxCompute data type editions. |
10 |
| IsPartitionCol |
boolean |
No |
Specifies whether the field is a partition field. |
true |
| Themes |
array<object> |
No |
The list of themes. |
|
|
object |
No |
|||
| ThemeId |
integer |
No |
The theme ID. |
101 |
| ThemeLevel |
integer |
No |
The level that corresponds to the theme ID. |
101 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
abcdef |
| TaskInfo |
object |
The information about the request task. After a request task is submitted, it is divided into multiple subtasks that are run in sequence. After the current subtask is complete, the next subtask starts to run. After all subtasks are complete, the request task is complete. If a request task is aborted due to one of the following issues, address the issue based on the error code and initiate the request task again:
|
|
| Status |
string |
The status of the current subtask. Valid values:
|
success |
| NextTaskId |
string |
The ID of the subtask that you want to run. If this parameter is left empty, all subtasks are complete. |
abc1 |
| TaskId |
string |
The ID of the current subtask. |
abc |
| Content |
string |
The details about the status of the current subtask.
|
success |
Examples
Success response
JSON format
{
"RequestId": "abcdef",
"TaskInfo": {
"Status": "success",
"NextTaskId": "abc1",
"TaskId": "abc",
"Content": "success"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.