In complex event processing language, the events targeted for operations can be restricted (data window views) and values can be derived from event streams (derived value view) by specifying a view in relation to an event stream.
The table below shows a list of data window views.
View | Syntax | Explanation |
---|---|---|
Length window | win:length(size) | A length window that slides and holds the specified size amount of the most recent events. |
Length batch window | win:length_batch(size) | A repetitive window that processes events when the specified size of events have accumulated, then releases them all. |
Time window | win:time(time) | A time window that holds the specified time amount of events. Specify a time representation or the number of seconds. |
Time batch window | win:time_batch(time [, startTime]) | A repetitive window that stockpiles the specified time events and processes them when the time is reached, then releases them all. If a startTime is not specified, the time count starts from when the first event arrives. If a startTime is specified, the time count starts from that startTime. For the startTime, specify the number of milliseconds from January 1, 1970, 00:00:00 GMT. |
Time-length combination batch window | win:time_length_batch(time, size) | A combination of the time window and length window. Events are processed and released when either the time or size condition is matched. |
Keep-all window | win:keepall() | This window holds all events. Care must be taken with memory consumption because events are not released. |
First length | win:firstlength(size) | Holds the first event to arrive that is the size amount. |
First time | win:firsttime(time) | Holds the first event to arrive within the specified time. |
Unique | std:unique(uniqueExpression) | Calculates the uniqueExpression for events and holds just the most recent events for each value. |
Grouped data window | std:groupwin(groupingExpression) | Calculates the groupingExpression for events and holds a data window for each value. |
Last event | std:lastevent() | Holds just the most recent event. This is equivalent to a length window that set 1 to size. |
First event | std:firstevent() | Holds just the event that arrived first. |
First unique | std:firstunique(uniqueExpression) | Calculates the uniqueExpression for events and holds just the event that arrived first for each value. |
Sorted window | ext:sort(size, sortExpression [asc|desc] [,sortExpression [asc |desc]] [, ...]) | Starting from the top of the results sorted in accordance with the sortExpression, holds the number of events specified at size. Ascending or descending order can be specified using ASC/DESC. |
The table below shows the derived value view.
View | Syntax | Explanation |
---|---|---|
Size | std:size([property [, ...]]) | This view enables the number of events received from the event stream to be referenced using the SIZE property having long values. In addition to SIZE, if property is specified, that property can also be referenced. |