Query information of a time series table

更新时间: 2026-01-14 11:20:02

You can call the DescribeTimeseriesTable operation to query information of a time series table, such as the time to live (TTL) configuration.

Prerequisites

Parameters

Parameter

Description

timeseriesTableName

The name of the time series table.

Example

The following sample code provides an example on how to query information of a time series table:

private static void describeTimeseriesTable(TimeseriesClient client) {
    // Specify the name of the time series table.
    String tableName = "<TIMESERIES_TABLE>";
    DescribeTimeseriesTableResponse describeTimeseriesTableResponse = client.describeTimeseriesTable(new DescribeTimeseriesTableRequest(tableName));
    TimeseriesTableMeta tableMeta = describeTimeseriesTableResponse.getTimeseriesTableMeta();
    // View the name of the time series table.
    System.out.println(tableMeta.getTimeseriesTableName()); 
    // View the status of the time series table.
    System.out.println(tableMeta.getStatus()); 
    // View the TTL configuration of the time series table.
    System.out.println(tableMeta.getTimeseriesTableOptions().getTimeToLive()); 
    // View the TTL configuration of time series metadata.
    System.out.println(tableMeta.getTimeseriesMetaOptions().getMetaTimeToLive()); 
    // Check whether updates to attributes of time series metadata are allowed.
    System.out.println(tableMeta.getTimeseriesMetaOptions().getAllowUpdateAttributes()); 
    // If you have created an analytical store for the time series table, you can use the following code to obtain the analytical store information.
    List<TimeseriesAnalyticalStore> analyticalStores = describeTimeseriesTableResponse.getAnalyticalStores(); // View the analytical storage configuration of the time series table.
    for (TimeseriesAnalyticalStore store : analyticalStores) {
        // View the name of the analytical store.
        System.out.println(store.getAnalyticalStoreName()); 
        // View the TTL configuration of the analytical store.
        System.out.println(store.getTimeToLive()); 
        // View the synchronization configuration of the analytical store.
        System.out.println(store.getSyncOption()); 
    }
}
上一篇: Query the names of time series tables 下一篇: Delete a time series table
阿里云首页 表格存储 相关技术圈