CreateMaterializedView
Creates a materialized view based on recommendations in a specified project and returns the instance ID of the creation job. You can call GetMaterializedViewStatus to query the creation progress.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:CreateMaterializedView |
create |
*Project
|
None | None |
Request syntax
POST /api/v2/projects/{projectName}/materializedViews HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| projectName |
string |
Yes |
The name of the MaxCompute project. |
example_project |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| schema |
string |
No |
The name of the schema to which the materialized view belongs. |
default |
| body |
string |
No |
The JSON request body. name is the name of the new view, and id is the recommendation identifier. You can specify lifeCycle in days, refreshIntervalMin in minutes, or refreshCron as a cron expression. |
{"name":"mv_sales_daily","id":"a7b1d9e0f43c25a8","lifeCycle":"30","refreshIntervalMin":"60"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique identifier of the API request. Provide this identifier when troubleshooting API call issues. |
0be3e0aa16667684362147582e038f |
| httpCode |
integer |
The HTTP status code of the request. |
200 |
| errorCode |
string |
The error code returned when the request fails. |
InvalidArgument |
| errorMsg |
string |
The error message returned when the request fails. |
The specified parameter is invalid. |
| data |
string |
The instance ID of the creation job. |
20261120000000000g1a2b3c4 |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"httpCode": 200,
"errorCode": "InvalidArgument",
"errorMsg": "The specified parameter is invalid.",
"data": "20261120000000000g1a2b3c4"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.