Aggregate functions
Standard statistics calculations for streaming event windows
Objective
Joule provides a set of standard aggregate functions that can be applied to a set of events within a triggered window.
These are processed using the group by
definition provided with the use case.
Example
This will produce the defined set of aggregate values and add these to the emitting event. For example these attributes will be added to the event:
ask_FIRST
andbid_FIRST
ask_LAST
andbid_LAST
volatility_MEAN
etc;.
Available aggregate functions
When the function applied the field the result is added in the returned stream events as an additional field i.e. <field_name>_SUM
SUM
Sum of field values
MIN
Min of field value
MAX
Max of field value
MEAN
Mean of field value
VARIANCE
Variance of field value
STDEV
Standard deviation of field value
FIRST
First field value in window
LAST
Last field value in window
HARMONIC_MEAN
Harmonic mean of field value
GEOMETRIC_MEAN
Geometric mean of field value
PVARIANCE
Population variance of field value
SECOND_MOMENT
Seond moment of field value
SUM_SQRTS
Sum of square root of field value
SUM_LOGS
Sum of log of field value
Last updated