Time series metadata consists of a time series identifier, attributes, and the last update time. This topic describes how to manage time series metadata.
Overview
You can define time series metadata before you write time series data. If you do not define the metadata in advance, the system automatically extracts it and builds an index when you write the data.
After the time series metadata is generated, you can manage it based on your use case.
|
Feature |
Description |
|
Retrieve time series |
Retrieve a time series by filtering on conditions such as metric name, data source, tags, update time, and attributes. You can also combine multiple conditions. |
|
Update time series |
Update the attributes of time series metadata. This operation is supported only when the time to live (TTL) for the time series metadata is set to -1, which means the data never expires. |
|
Delete time series |
Delete time series metadata in batches. Note
When you delete time series metadata, the underlying time series data in the table is not deleted. You can still query the data by specifying the time series identifier. |
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 your instance alias, or click Manage Instance in the Actions column for the instance.
-
-
On the Instance Details tab, click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of a time series table and then click the Query Data tab, or click Manage Data in the Actions column for the 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 and click Add in the corresponding sections to specify matching conditions for tags, attributes, or update time.
This example queries for all time series where the metric name is
cpuand whose tags includeos=Ubuntu16.10. For example, set metric name tocpu. In the tags section, click Add and add a matching condition in the key/operator/value format, such asos=Ubuntu 16.10. Then click OK. -
Click OK.
The time series that match your query are 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 your instance alias, or click Manage Instance in the Actions column for the instance.
-
-
On the Instance Details tab, click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of a time series table and then click the Query Data tab, or click Manage Data in the Actions column for the table.
-
On the Query Data tab, for the target time series, click Update in the Actions column.
-
In the Update Time Series dialog box, add, delete, or modify the time series metadata attributes.
-
Click OK.
Delete time series
Currently, you can delete time series only by using SDKs.
Development integration
|
Feature |
Method |
|
Retrieve time series |
|
|
Update time series |
|
|
Delete time series |