Manage time series

更新时间:
复制 MD 格式

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

  1. Go to the Instance Management page.

    1. Log on to the Tablestore console.

    2. In the top navigation bar, select a resource group and a region.

    3. On the Overview page, click your instance alias, or click Manage Instance in the Actions column for the instance.

  2. On the Instance Details tab, click the Time Series Tables tab.

  3. 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.

  4. On the Query Data tab, click Query Time Series in the upper-right corner.

  5. 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 cpu and whose tags include os=Ubuntu16.10. For example, set metric name to cpu. In the tags section, click Add and add a matching condition in the key/operator/value format, such as os = Ubuntu 16.10. Then click OK.

  6. Click OK.

    The time series that match your query are displayed on the Query Data tab.

Update time series

  1. Go to the Instance Management page.

    1. Log on to the Tablestore console.

    2. In the top navigation bar, select a resource group and a region.

    3. On the Overview page, click your instance alias, or click Manage Instance in the Actions column for the instance.

  2. On the Instance Details tab, click the Time Series Tables tab.

  3. 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.

  4. On the Query Data tab, for the target time series, click Update in the Actions column.

  5. In the Update Time Series dialog box, add, delete, or modify the time series metadata attributes.

  6. 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

Via SDKs: Java, Go, Python

FAQ

How to delete time series data