github RedisTimeSeries/RedisTimeSeries v1.8.0
1.8-RC1 (v1.8.0)

latest releases: v1.12.1, v1.12.0, v1.10.12...
pre-release23 months ago

This is the first Release Candidate of RedisTimeSeries 1.8

Headlines:

RedisTimeSeries 1.8 adds six highly requested features including a new time-weighted average aggregator, gap filling, ability to control bucket timestamps, ability to control alignment for compaction rules, new reducer types, and ability to include the latest (possibly partial) raw bucket samples when retrieving compactions. Please read details below.

What's new in 1.8

  • Introduction of a new aggregator: twa (time-weighted average):

    When a time series holds discrete samples of a continuous signal (e.g., temperature), using avg to estimate the average value over a given timeframe would produce a good estimate only when the signal is sampled at constant intervals. If, however, the signal is sampled at non-constant intervals (or if some samples are missing), twa produces a better estimate by averaging samples over time, instead of simply averaging the samples.

  • Introduction of a new optional EMPTY flag to TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE:

    The commands TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE have an optional [AGGREGATION aggregator bucketDuration] parameter. When this parameter is specified, raw reports are aggregated per bucket. Till version 1.8, the results were not reported for empty buckets. With EMPTY, it is now possible to report aggregations for empty buckets as well. Specifically, using EMPTY when aggregator is twa allows estimating the average of a continuous signal even for buckets where no samples were collected ('gap-filling').

  • Introduction of a new optional BUCKETTIMESTAMP parameter to TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE:

    Till version 1.8, TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE returned the start time of each reported bucket as its timestamp. It is now possible to change this behavior and report the start time, the end time, or the mid time for each bucket.

  • Introduction of a new optional ALIGN parameter to TS.CREATERULE and to COMPACTION_POLICY configuration parameter:

    Till version 1.8, compaction rules cannot be aligned. It is now possible to define alignment for compaction rules, so one can, for example, aggregate daily events from 06:00 AM to 06:00 the next day.

  • Introduction of additional reducer types in GROUPBY (TS.MRANGE, and TS.MREVRANGE): avg, range, count, std.p, std.s, var.p, and var.s:

    Till version 1.8, only the sum, min, and max could be used as reducers. It is now possible, for example, to calculate the maximal temperature per timeframe for each sensor, and then report the average temperature (avg reducer) over groups of sensors (grouped by a given label's value).

  • Introduction of a new optional LATEST flag to TS.GET, TS.MGET, TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE:

    Till version 1.8, when a time series is a compaction, TS.GET, TS.MGET, TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE did not report the compacted value of the latest raw bucket. The reason is that the data in the latest bucket is possibly partial. A bucket is ‘closed’ and compacted only upon arrival of data that ‘opens’ a ‘new latest’ bucket. There are use cases, however, where the compaction of the latest (the possibly partial) bucket should be retrieved as well. For example, a user may want to receive the count of events since the start of the decade, and the retention period for raw data is only one month. Till version 1.8, the user would have to run two queries - one on a compaction and one on the latest raw data, and then sum the results. Since version 1.8, by specifying LATEST, it is possible to retrieve the latest (possibly partial) bucket as well.

Notes:

  • The version inside Redis will be 1.8.0 in semantic versioning. Since the version of a module in Redis is numeric, we could not add a Release Candidate flag.
  • Minimal Redis version: 6.2

Don't miss a new RedisTimeSeries release

NewReleases is sending notifications on new releases.