Time series metadata consists of time series identifiers, attributes, and update time. This topic describes how to manage time series metadata.
Overview
Before you write time series data, you can define the time series metadata. If you do not define time series metadata before writing time series data, the system automatically extracts the metadata of the time series and creates an index for the metadata.
After time series metadata is generated, you can manage it based on your business requirements.
Feature | Description |
Retrieve time series | You can retrieve time series based on metric name conditions, data source conditions, tag conditions, update time conditions, attribute conditions, or a combination of multiple conditions. |
Update time series | You can update the attributes of time series metadata. This operation is supported only when the time to live (TTL) of the time series metadata is set to -1 (data never expires). |
Delete time series | You can delete the metadata of multiple time series at the same time. Note When you delete time series metadata, the time series data in the corresponding time series table is not deleted. You can still query the time series data by specifying the time series identifiers. |
Procedure
You can use the Tablestore console to retrieve time series or update time series metadata.
Retrieve time series
Go to the Instance Management page.
Log on to the Tablestore console.
In the top navigation bar, select a resource group and a region.
On the Overview page, click the instance alias or click Manage Instance in the Actions column of the instance.
On the Instance Details tab, click the Time Series Tables tab.
On the Time Series Tables tab, click the name of the time series table and select the Query Data tab, or click Manage Data in the Actions column of the time series table.
On the Query Data tab, click Query Time Series in the upper-right corner.
In the Query Data dialog box, enter the metric name and data source based on your business requirements, and click Add in the specific sections to specify matching conditions for tags, attributes, or update time.
The following figure shows the conditions used to query all time series with the metric name cpu and the tag
os=Ubuntu16.10
.Click OK.
The data that meets the query conditions is displayed on the Query Data tab.
Update time series
Go to the Instance Management page.
Log on to the Tablestore console.
In the top navigation bar, select a resource group and a region.
On the Overview page, click the instance alias or click Manage Instance in the Actions column of the instance.
On the Instance Details tab, click the Time Series Tables tab.
On the Time Series Tables tab, click the name of the time series table and select the Query Data tab, or click Manage Data in the Actions column of the time series table.
On the Query Data tab, click Update in the Actions column of the time series.
In the Update Time Series dialog box, add, delete, or modify the time series metadata attributes based on your business requirements.
Click OK.
Delete time series
Currently, you can delete time series only by using Tablestore SDKs.
Development integration
Feature | Call method |
Retrieve time series |
|
Update time series | |
Delete time series |