CreateMaterializedView

Updated at:
Copy as MD

Creates a materialized view.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /materializedviews HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

project

string

No

The name of the project. This parameter is specified in the request path.

body

object

No

The configuration of the materialized view.

name

string

No

The name of the materialized view. The name must be unique within the project, 2 to 63 characters long, and contain only lowercase letters, digits, hyphens (-), and underscores (_). It must also start and end with a lowercase letter or a digit.

logstore

string

No

The destination Logstore for the aggregated data from the materialized view.

originalSql

string

No

The query statement that defines the materialized view.

aggIntervalMins

integer

No

The aggregation interval in minutes. The system creates aggregation tasks based on this interval.

startTime

integer

No

The time when the materialized view starts to aggregate data. Specify the time as a UNIX timestamp in seconds.

ttl

integer

No

The time-to-live (TTL) of the data in the materialized view, in days. After this period, the data expires and is automatically deleted.

Response elements

Element

Type

Description

Example

None defined.

Examples

Success response

JSON format

{}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.