Use Tablestore SDK for Java to query the configurations and status of a time series table, including its TTL, custom time series identifier fields, data field primary keys, analytical stores, and Lastpoint indexes.
Prerequisites
Install the Tablestore SDK for Java and initialize a time series client.
Description
Call describeTimeseriesTable to query the configurations and status of a time series table. The response also contains lists of analytical stores and Lastpoint indexes. An empty list is returned if no corresponding resource is configured.
public DescribeTimeseriesTableResponse describeTimeseriesTable(DescribeTimeseriesTableRequest request)
The following example queries the configurations and status of example_timeseries_table and reads analytical store and Lastpoint index information.
TimeseriesClient timeseriesClient = client.asTimeseriesClient();
String tableName = "example_timeseries_table";
DescribeTimeseriesTableRequest request =
new DescribeTimeseriesTableRequest(tableName);
DescribeTimeseriesTableResponse response =
timeseriesClient.describeTimeseriesTable(request);
TimeseriesTableMeta tableMeta = response.getTimeseriesTableMeta();
System.out.println(tableMeta.getTimeseriesTableName());
System.out.println(tableMeta.getStatus());
System.out.println(tableMeta.getTimeseriesTableOptions().getTimeToLive());
System.out.println(tableMeta.getTimeseriesMetaOptions().getMetaTimeToLive());
System.out.println(tableMeta.getTimeseriesMetaOptions().getAllowUpdateAttributes());
for (TimeseriesAnalyticalStore store : response.getAnalyticalStores()) {
System.out.println(store.getAnalyticalStoreName());
System.out.println(store.getTimeToLive());
System.out.println(store.getSyncOption());
}
for (TimeseriesLastpointIndex index : response.getLastpointIndexes()) {
System.out.println(index.getLastpointIndexName());
}
Parameters
DescribeTimeseriesTableRequest contains the following parameter.
|
Name |
Type |
Description |
|
timeseriesTableName (required) |
|
The time series table name. |
Response
DescribeTimeseriesTableResponse contains the following operation-specific fields.
|
Field |
Type |
Description |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
Time series table information
timeseriesTableMeta is of the TimeseriesTableMeta type and contains the following fields.
|
Field |
Type |
Description |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
Time series data configurations
timeseriesTableMeta.timeseriesTableOptions is of the TimeseriesTableOptions type and contains the following field.
|
Field |
Type |
Description |
|
|
|
Call |
Time series metadata configurations
timeseriesTableMeta.timeseriesMetaOptions is of the TimeseriesMetaOptions type and contains the following fields.
|
Field |
Type |
Description |
|
|
|
Call |
|
|
|
Call |
Data field primary keys
Each element in timeseriesTableMeta.fieldPrimaryKeys[] is of the PrimaryKeySchema type and contains the following fields.
|
Field |
Type |
Description |
|
|
|
Call |
|
|
|
Call |
Analytical stores
Each element in analyticalStores[] is of the TimeseriesAnalyticalStore type and contains the following fields.
|
Field |
Type |
Description |
|
|
|
Call |
|
|
|
Call |
|
|
|
Call |
Lastpoint indexes
Each element in lastpointIndexes[] is of the TimeseriesLastpointIndex type and contains the following field.
|
Field |
Type |
Description |
|
|
|
Call |