Adds all of the values of the datapoints that pass through it
The sum
transform sums up numeric values. Given the data:
[2,5,1,6]
running the transform sum
will give:
[2,7,8,14]
Since the transform returns all intermediate values, and usually we only want the total sum,
if last
is frequently used to filter all datapoints but the final one:
sum | if last
When run on the above data, this transform returns [14]
, which is the total sum of all datapoints in the stream.
One-To-One | Stateless | Peek | Input Schema | Output Schema |
---|---|---|---|---|
True | False | False |