ListMaterializedViews
Performs a paged query on materialized views, creation statuses, and benefit statistics in a specified project. Paging is supported. You can filter the results by name prefix, owner, or status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListMaterializedViews |
list |
*Project
|
None | None |
Request syntax
GET /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 |
| from |
string |
No |
The start date of the query. The format is yyyyMMdd. |
20261120 |
| to |
string |
No |
The end date of the query. The format is yyyyMMdd. |
20261124 |
| mvFilter |
string |
No |
The name prefix of the materialized view. |
mv_sales |
| owner |
string |
No |
The owner of the materialized view. |
example_owner |
| id |
string |
No |
The filter condition for recommendation IDs. Separate multiple IDs with commas. |
a7b1d9e0f43c25a8 |
| status |
string |
No |
The filter condition for the view creation status. For example, CREATED indicates that the view is created, and CREATING indicates that the view is being created. |
CREATED |
| sortField |
string |
No |
The sort field. Valid values: createTime, usedCount, savedCu, savedCalculation, savedTime, and the LastDay fields corresponding to the last four fields. Default value: createTime. |
createTime |
| order |
string |
No |
The sort order. Valid values: asc for ascending order and desc for descending order. Default value: desc. |
desc |
| pageNumber |
integer |
No |
The page number. Pages start from 1. Default value: 1. |
1 |
| pageSize |
integer |
No |
The number of entries per page. The value must be a positive integer. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique ID of the API request. You can provide this ID to troubleshoot 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 |
object |
The list of materialized views and pagination information. |
|
| materializedViewList |
array<object> |
The materialized views that meet the query conditions and their benefits. |
|
|
array<object> |
|||
| name |
string |
The name of the materialized view. |
mv_sales_daily |
| project |
string |
The name of the MaxCompute project. |
example_project |
| schema |
string |
The name of the schema to which the materialized view belongs. |
default |
| id |
string |
The recommendation ID corresponding to the materialized view. |
a7b1d9e0f43c25a8 |
| owner |
string |
The owner of the materialized view. |
example_owner |
| usedCount |
integer |
The cumulative number of times the materialized view is used by jobs. |
36 |
| usedCountLastDay |
integer |
The number of times the materialized view was used by jobs on the previous statistical day. |
8 |
| savedCu |
number |
The cumulative saved compute resource usage. Unit: CU hours. |
14.5 |
| savedCuLastDay |
number |
The saved compute resource usage on the previous statistical day. Unit: CU hours. |
2.8 |
| savedCalculation |
integer |
The cumulative saved computing volume, calculated by multiplying the scan volume by the complexity. |
5368709120 |
| savedCalculationLastDay |
integer |
The saved computing volume on the previous statistical day, calculated by multiplying the scan volume by the complexity. |
1073741824 |
| savedTime |
integer |
The cumulative saved job computing duration. Unit: seconds. |
4800 |
| savedTimeLastDay |
integer |
The saved job computing duration on the previous statistical day. Unit: seconds. |
900 |
| createTime |
integer |
The creation time of the materialized view. The value is a UNIX timestamp in milliseconds. |
1795132800000 |
| status |
string |
The creation status. Valid values: CREATED (the view is created), CREATING (the view is being created), NOT_CREATE (the view is not created), and UNKNOWN (the status is unknown). |
CREATED |
| lifeCycle |
string |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
null |
| query |
string |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
null |
| size |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| enableAutoRefresh |
boolean |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
|
| refreshIntervalMinutes |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| refreshCron |
string |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
null |
| lastRefreshBeginTime |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| lastRefreshEndTime |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| refreshHistory |
array<object> |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
|
|
object |
|||
| instId |
string |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
null |
| status |
string |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
null |
| startTime |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| endTime |
integer |
[Deprecated] Do not rely on this field. This API operation does not populate this field. |
0 |
| totalCount |
integer |
The total number of records that meet the conditions. |
12 |
| pageNumber |
integer |
The current page number. |
1 |
| pageSize |
integer |
The number of entries per page. |
10 |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"httpCode": 200,
"errorCode": "InvalidArgument",
"errorMsg": "The specified parameter is invalid.",
"data": {
"materializedViewList": [
{
"name": "mv_sales_daily",
"project": "example_project",
"schema": "default",
"id": "a7b1d9e0f43c25a8",
"owner": "example_owner",
"usedCount": 36,
"usedCountLastDay": 8,
"savedCu": 14.5,
"savedCuLastDay": 2.8,
"savedCalculation": 5368709120,
"savedCalculationLastDay": 1073741824,
"savedTime": 4800,
"savedTimeLastDay": 900,
"createTime": 1795132800000,
"status": "CREATED",
"lifeCycle": "null",
"query": "null",
"size": 0,
"enableAutoRefresh": false,
"refreshIntervalMinutes": 0,
"refreshCron": "null",
"lastRefreshBeginTime": 0,
"lastRefreshEndTime": 0,
"refreshHistory": [
{
"instId": "null",
"status": "null",
"startTime": 0,
"endTime": 0
}
]
}
],
"totalCount": 12,
"pageNumber": 1,
"pageSize": 10
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.