Reads the data in a time series.
Request syntax
message GetTimeseriesDataRequest {
required string table_name = 1;
required TimeseriesKey time_series_key = 2;
optional int64 begin_time = 3;
optional int64 end_time = 4;
optional int64 specific_time = 5; // not used
optional bytes token = 6; // bytes
optional int32 limit = 7;
optional bool backward = 8;
repeated TimeseriesFieldsToGet fields_to_get = 9;
optional int64 supported_table_version = 10;
}Parameter | Type | Required | Description |
table_name | string | Yes | The name of the time series table. |
time_series_key | Yes | The time series identifiers. | |
begin_time | int64 | No | The start time. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
end_time | int64 | No | The end time. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
specific_time | int64 | No | The specific time. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
token | bytes | No | The token that is used to read the remaining data. |
limit | int32 | No | The maximum number of rows that you want to return. |
backward | bool | No | Specifies whether to read data in reverse chronological order. By default, data is read in chronological order. |
fields_to_get | No | The data columns that you want to read. | |
supported_table_version | int64 | No | The model version number of the time series table supported by the Tablestore SDK. Valid values:
Note
|
Response syntax
message GetTimeseriesDataResponse {
required bytes rows_data = 1;
optional bytes next_token = 2;
}Parameter | Type | Description |
rows_data | bytes | The time series data returned. |
next_token | bytes | The token that is used to read the remaining data. |
Use Tablestore SDKs
You can use the following Tablestore SDKs to query the data in a time series: