CreateSchema
Creates a schema in a specified MaxCompute project. You can add a comment to the schema.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:CreateSchema |
create |
*Project
|
None | None |
Request syntax
POST /api/v1/projects/{projectName}/schemas/{schemaName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| projectName |
string |
Yes |
The name of the target MaxCompute project. |
example_project |
| schemaName |
string |
Yes |
The name of the schema in the project. |
example_schema |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| comment |
string |
No |
The comment for the schema. |
Used to organize sample data |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The ID of the request. You can use the request ID to query request logs and troubleshoot exceptions. |
A9E5C7F4-42AC-4FFA-9019-B6B2B57983EF |
| httpCode |
integer |
The HTTP status code of the error response. The example shows the status code for a request parameter validation failure. |
400 |
| errorCode |
string |
The error code returned when the call fails. |
ILLEGAL_ARGUMENT |
| errorMsg |
string |
The error message returned when the call fails. |
schemaName cannot be empty |
| data |
string |
The result returned after the schema is created. |
success |
Examples
Success response
JSON format
{
"requestId": "A9E5C7F4-42AC-4FFA-9019-B6B2B57983EF",
"httpCode": 400,
"errorCode": "ILLEGAL_ARGUMENT",
"errorMsg": "schemaName cannot be empty",
"data": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.