You use the Event Strategy tab to design and configure your event strategy components. A new instance of the Event strategy rule contains only two shapes: Real-time data and Emit. You can add shapes by clicking the add icon that is available when you focus on a shape. To edit a shape, open the properties dialog box of a shape (by double-clicking the shape or by right-clicking and selecting the Properties option). The properties dialog box contains elements that are specific to a given shape.
Shapes include:
This is the starting shape of every event strategy. The properties that you can view here are defined in the data model of the Applies To class of the event strategy. The Event key property identifies the class with your event strategy and it is used in the Window shape for grouping incoming events.
In the Event time stamp section, select one of the following options:
System time - Use your system time when processing events.
Event time - Use this option when every event processed by your event strategy contains a property with time.
The time stamps of consecutive events must be in ascending order.
In the Emit Properties dialog box, you can specify when your event strategy should emit events. The following options are available:
The Split shape allows for dividing the data stream into multiple paths to detect meaningful patterns in customer behavior by separately analyzing various types of related events. You can add this shape anywhere in the event strategy. The connector that radiates from that shape always leads to the Emit shape. This means that the events from each path in the event strategy are not combined before being emitted.
The Split shape does not have any properties and cannot be edited.
The Split and Join dual shape, like the Split shape, allows for dividing the data stream into multiple paths to detect meaningful patterns in customer behavior through a simultaneous analysis of multiple streams in a single event strategy rule instance. However, with the Join shape, you can combine the data before it is emitted from the event strategy. The joining of events from multiple streams in the event strategy is done on the basis of the specified join condition logic.
The Join shape operates only in the context of windows. If there is no Window shape before the Join shape, that Join shape operates as if it was preceded by a sliding Window shape that has the size of 1.
The Split component of the Split and Join dual shape does not have any properties and cannot be edited.
You can use this shape to filter out events of a specific data stream before they enter another shape.
To filter out events, you can perform the following actions:
You can stack Filter shapes in your event strategy to specify alternative groups of conditions or variables. The order of Filter shapes on the stack does affect the processed results.
You can use windows to group relevant events from a data stream. You can define the window by the maximum number of events contained or by the maximum time interval to keep events.
In the Window section, select one option:
The Tumbling window processes events by moving the window over the data in chunks. After the window buffers a specified number of events or the window time has elapsed, it posts the collected events and moves to another chunk of data. No events are repeated in the next window.
You can specify the number of events or the time interval in the Count for field and dropdown list.
When you run a batch or real-time data flow that contains an event strategy with Tumbling windows, you can control whether a Tumbling window emits remaining events after the data flow stops. By default, Tumbling windows emit remaining events after the data flow stops, which prevents data loss. If you disable this option, events that are not emitted from Tumbling windows before the data flow stop are deleted.
The Sliding window processes events by gradually moving the window over the data in single increments. As the new events come in, the oldest events are removed.
You can specify the number of events or the time interval in the Look for last field and drop-down list.
The Window shape uses an event key as the default grouping. Separate windows are created for events with different event key values. If you want, you can also specify more properties and create separate windows for them.
This shape allows you to perform calculations on data from the data stream. Add aggregations and select calculation types to perform.
For the Lookup shape, you can specify the properties from an alternative data source and associate them with the data stream properties. You can add this shape in an event strategy anywhere between the Real-time data and Emit shapes.
When you add the Lookup shape to your event strategy and specify the settings for invoking data from an alternative data set, a Static Data shape is automatically added to the data flow that references the event strategy rule with a Lookup shape. In that Static Data shape, you must point to the data set that contains the data that you want to use in the stream. Additionally, you must map the properties from that data set to the data flow properties.
An error modifier (the red X icon) is displayed on the shapes that are incorrectly configured. Place the mouse cursor on the modifier to display the error message.