All Products
Search
Document Center

Tablestore:Query the information about a time series table

Last Updated:Jan 15, 2024

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

Prerequisites

Parameter

Parameter

Description

timeseriesTableName

The name of the time series table.

Example

The following sample code provides an example on how to query the information about 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 of data in the time series table. 
    System.out.println(tableMeta.getTimeseriesTableOptions().getTimeToLive()); 
    // View the TTL of the time series metadata. 
    System.out.println(tableMeta.getTimeseriesMetaOptions().getMetaTimeToLive()); 
    // Check whether the property columns of the time series metadata can be modified. 
    System.out.println(tableMeta.getTimeseriesMetaOptions().getAllowUpdateAttributes()); 
}