调用GetTimeseriesData接口查询某个时间线的数据。

请求消息结构

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;
}
名称 类型 是否必选 描述
table_name string 时序表名。
time_series_key TimeseriesKey 时间线标识。
begin_time int64 开始时间。格式为微秒单位时间戳(从1970-01-01 00:00:00 UTC计算起的微秒数)。
end_time int64 结束时间。格式为微秒单位时间戳(从1970-01-01 00:00:00 UTC计算起的微秒数)。
specific_time int64 指定时间。格式为微秒单位时间戳(从1970-01-01 00:00:00 UTC计算起的微秒数)。
token bytes 用于继续获取剩余数据的标识。
limit int32 最多返回的行数限制。
backward bool 是否按照时间倒序读取。默认为正序读取。
fields_to_get TimeseriesFieldsToGet 指定读取部分数据列。

响应消息结构

message GetTimeseriesDataResponse {
  required bytes rows_data = 1;
  optional bytes next_token = 2;
}
名称 类型 描述
rows_data bytes 返回的时序数据。
next_token bytes 用于获取剩余数据的标识。

使用SDK

您可以使用如下语言的SDK查询时序数据。