TDIGEST.ADD key value weight [ value weight ...]

Available in: Redis Stack

Time complexity: O(N) , where N is the number of samples to add

Adds one or more samples to a sketch.


  • key: The name of the sketch.
  • val: The value to add.
  • weight: The weight of this point.


[] otherwise.


redis> TDIGEST.ADD t-digest 42 1 194 0.3
redis> TDIGEST.ADD t-digest string 1.0
(error) ERR T-Digest: error parsing val parameter
redis> TDIGEST.ADD t-digest 42 string
(error) ERR T-Digest: error parsing weight parameter