TS.NRANGE

Since 1.1.0Time series

Syntax

TS.NRANGE numkeys key [key ...] fromTimestamp toTimestamp [same options as TS.RANGE]
  • Flags: movablekeys, readonly
  • ACL categories: @read, @slow, @timeseries
  • Arity: -2

Runs the same range over several named time series and joins the results by timestamp, a command of Redis 8.10. numkeys is how many keys follow. It takes TS.RANGE's options.

Reply

  • An array with one row per timestamp any of the series has: the timestamp, and an array of each key's value there, NaN where a series has none, in the order the keys were given.

Examples

> TS.NRANGE 2 temp:1 temp:2 - +
1) 1) (integer) 1000
   2) 1) "20.5"
      2) "15"
2) 1) (integer) 2000
   2) 1) "21"
      2) "NaN"
...