TS.DELETERULE

Since 1.1.0Time series

Syntax

TS.DELETERULE sourceKey destKey
  • Flags: write
  • ACL categories: @slow, @timeseries, @write
  • Arity: -2

Deletes the compaction rule from sourceKey to destKey that TS.CREATERULE made. Samples added to the source after it are no longer aggregated into the destination.

Both series stay. The destination keeps the samples written to it so far, but not the bucket that was still open: that bucket is never written. The destination is no longer a compaction of the source, so TS.INFO shows its sourceKey as nil, and it can be the destination of another rule.

Reply

  • OK.
  • TSDB: compaction rule does not exist if there is no rule between the two.
  • TSDB: the key does not exist if sourceKey is missing.

Examples

> TS.CREATE src
OK
> TS.CREATE src:avg
OK
> TS.CREATERULE src src:avg AGGREGATION avg 1000
OK
> TS.ADD src 100 1
(integer) 100
> TS.ADD src 1100 3
(integer) 1100
> TS.DELETERULE src src:avg
OK
> TS.DELETERULE src src:avg
(error) TSDB: compaction rule does not exist
> TS.RANGE src:avg - +
1) 1) (integer) 0
   2) 1