Window analytics
Standard window functions are provided to perform event based analytics
Last updated
Standard window functions are provided to perform event based analytics
Last updated
Joule provides the ability to perform time or number of events window based analytics. A suite of standard window functions are provided out-of-the-box.
Developers can create custom analytic functions which are deployable as discrete components on the classpath.
Joule provides tumbling and sliding window analytics.
Tumbling windows are a non-overlapping events arrays ordered by time. In a tumbling window, events are grouped in to a single window based on time or count.
An event belongs to only one window. Events within a window are only processed once when a new window is presented for processing.
This code defines a tumbling time window for aggregating data in the processing unit pipeline:
aggregate functions
Applies functions like FIRST, LAST, MIN, MAX, SUM, MEAN, VARIANCE, and STDEV on fields like ask
, bid
, volume
, and volatility
.
policy The window size is set to 5000 milliseconds (5 seconds).
It processes and emits analytics based on the specified window and functions.
Attribute | Description | Data Type | Required |
---|---|---|---|
emitting type | name of the event | String | |
preprocessor | Window preprocessor | ||
window listeners | Custom window listeners which are executed on window generation. See window listener documentation below | See documentation below. | |
aggregate functions | Standard set of aggragation functions based over a window using group by semantics | See documentation below. | |
policy | Type of window processing. Supported types:
| String e.g. slidingCount |
In the following pages you can read further how to apply the window functionalities and a list of all the aggregate functions.