Document toolboxDocument toolbox

Time Window Collector

Description

The unit is a Processor type unit.

The Time Window Collector unit keeps events in memory until a certain time condition is met. It can be configured to either use a global window for all events or to create a new window for each key.

An event comes in through the in port. The event is stored in the window associated with the event key. If the time condition of the window is met, all events are released.
Windowed events are sent to the out output port.

Events that do not match the time condition are sent to the discarded port.
If an error occurs, the input events are enriched with standard error fields and sent to the error port.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

TabFieldDescription

General

NameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
Key field(s)Enter the name of an input event field(s) containing key(s).
Size

The size of the window in seconds. Must be greater than 0.

If this number is smaller than the "Purge size", a sliding window is used.

For example, imagine you add a size of 300 seconds (5 minutes) with a timestamp at 11:00. The sliding window will be 11:00 - 11:05. In order to determine the next window, the values set in the Purge size field are used.

If this number is equal to "Purge size", a tumbling window is used.

Purge size

Amount of seconds after which to purge from the window when it is considered complete.

All events received at the purged seconds are removed from the window.

If this number is larger than "size", a sliding window is used. If this number is equal to "size", a tumbling window is used.

Timestamp fieldThe name of an event field that contains the timestamp. If empty, the unit will use the System time to calculate the event timestamp.  Changing this field in a running flow diagram produces a reset of the unit. You can also write java class qualified name.
Output key(s) fieldEnter a name for the output event field containing key(s).
Window fieldEnter a name for the output event field containing the window list. 
Size fieldEnter a name for the output event field containing the window size.
Lower limit fieldEnter a name for the output event field containing the lower limit of the current window.
Upper limit fieldEnter a name for the output event field containing the upper limit of the current window.
Allow empty collectionsWhen collection occurs in output ports, whether empty collections should emit a result (true) or not (false). This is set to false by default.

Input ports

PortDescription
in All events enter through this port.

Output ports


PortDescription
out Outputs events properly stored.
discardedOutputs events that do not match the time condition.
errorSignals when an error occurs. Outputs input events enriched with standard error fields.





Description

The unit is a Processor type unit.

The Time Window Collector unit keeps events in memory until a certain time condition is met. It can be configured to either use a global window for all events or to create a new window for each key.

An event comes in through the in port. The event is stored in the window associated with the event key. If the time condition of the window is met, all events are released.
Windowed events are sent to the out output port.

Events that do not match the time condition are sent to the discarded port.
If an error occurs, the input events are enriched with standard error fields and sent to the error port.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

TabFieldDescription

General

NameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
Key field(s)Enter the name of an input event field(s) containing key(s).
Size

The size of the window in seconds. Must be greater than 0.

If this number is smaller than the "Purge size", a sliding window is used.

For example, imagine you add a size of 300 seconds (5 minutes) with a timestamp at 11:00. The sliding window will be 11:00 - 11:05. In order to determine the next window, the values set in the Purge size field are used.

If this number is equal to "Purge size", a tumbling window is used.

Purge size

Amount of seconds after which to purge from the window when it is considered complete.

All events received at the purged seconds are removed from the window.

If this number is larger than "size", a sliding window is used. If this number is equal to "size", a tumbling window is used.

Timestamp fieldThe name of an event field that contains the timestamp. If empty, the unit will use the System time to calculate the event timestamp.  Changing this field in a running flow diagram produces a reset of the unit. You can also write java class qualified name.
Key(s) fieldEnter a name for the output event field containing key(s).
Window fieldEnter a name for the output event field containing the window list. 
Size fieldEnter a name for the output event field containing the window size.
Lower limit fieldEnter a name for the output event field containing the lower limit of the current window.
Upper limit fieldEnter a name for the output event field containing the upper limit of the current window.
Allow empty collectionsWhen collection occurs in output ports, whether empty collections should emit a result (true) or not (false). This is set to false by default.

Input ports

PortDescription
in All events enter through this port.

Output ports


PortDescription
out Outputs events properly stored.
discardedOutputs events that do not match the time condition.
errorSignals when an error occurs. Outputs input events enriched with standard error fields.