Designing Intelligent Event Processor (IEP) Projects

Stream Converter Operators

Stream Converter operators convert stream data formats into other formats, and can perform additional processing.

The following table lists the input and output for each operator.

Operator 

Input 

Output 

Attribute Based Window 

Stream 

Relation 

Partitioned Window 

Stream 

Relation 

Time Based Window 

Stream 

Relation 

Tuple Based Window 

Stream 

Relation 

Attribute Based Window

The Attribute Based Window operator converts an input stream to a relation based on a specified attribute and a size that defines the range of values for the attribute.

Assume that you select an attribute that has the INTEGER data type and that you set the size to 10. If the most recently received event has a value of 50 for the attribute, then the relation consists of all events that have a value of between 40 and 50 for the attribute.

The following data types are supported: INTEGER, BIGINT, DOUBLE, DATE, and TIMESTAMP. You cannot select an attribute that has the VARCHAR data type.

The input to the Attribute Based Window operator is a stream.

The output from the Attribute Based Window operator is a relation.

ProcedureTo Create an Attribute Based Window Operator

  1. Drag an Attribute Based Window operator from the Palette to the Design view.

  2. Connect the output of an operator that has stream output to the input of the Attribute Based Window operator.

  3. Double-click the Attribute Based Window operator.

    The property editor opens. The attributes of the input schema are displayed in read-only mode.

  4. In the Attribute drop-down menu, select the attribute that you want to track.

  5. In the Size field, enter a numerical value that the operator will use to define the range of values.

    The operator determines the lowest value of the range by subtracting the size from the attribute value of the most recently received event.

    For attributes with the DATE data type, the size represents the number of days.

    For attributes with the TIMESTAMP data type, the size represents the number of seconds.

  6. (Optional) Click the Documentation tab and supply notes on this component.

  7. Click OK.

Partitioned Window

The Partitioned Window operator converts an input stream to a relation based on one or more attributes that serve as the partition key.

Assume that you have the following scenario:

Each relation will consist of the last two events that contain the LastName attribute.

The input to the Partitioned Window operator is a stream.

The output from the Partitioned Window operator is a relation.

ProcedureTo Create a Partitioned Window Operator

  1. Drag a Partitioned Window operator from the Palette to the Design View.

  2. Connect the output of an operator that has stream output to the input of the Partitioned Window operator.

  3. Double-click the Partitioned Window operator.

    The property editor opens. The attributes of the input schema are displayed in read-only mode.

  4. In the Size field, specify the number of events.

  5. In the Partition Key column, select one or more attributes.

  6. (Optional) Click the Documentation tab and supply notes on this component.

  7. Click OK.

Time Based Window

The Time Based Window operator converts an input stream to a relation based on a specified period of time.

Assume that you set the period of time to five seconds. Each relation will consist of all events that arrived in the last five seconds.

The input to the Time Based Window operator is a stream.

The output from the Time Based Window operator is a relation.

You can combine the Time Based Window operator with a subsequent Relation Output operator to provide a timestamp record for the records retained.

ProcedureTo Create a Time Based Window Operator

  1. Drag a Time Based Window operator from the Palette to the Design view.

  2. Connect the output of an operator that has stream output to the input of the Time Based Window operator.

  3. Double-click the Time Based Window operator.

    The property editor opens. The attributes of the input schema are displayed in read-only mode.

  4. In the Size field and drop-down menu, specify the period of time.

  5. (Optional) Click the Documentation tab and supply notes on this component.

  6. Click OK.

Tuple Based Window

The Tuple Based Window operator converts an input stream to a relation based on a specified number of events.

Assume that you set the number of events to two. Each relation will consist of the most recent two events.

The input to the Tuple Based Window operator is a stream.

The output from the Tuple Based Window operator is a relation.

ProcedureTo Create a Tuple Based Window Operator

  1. Drag a Tuple Based Window operator from the Palette to the Design view.

  2. Connect the output of an operator that has stream output to the input of the Tuple Based Window operator.

  3. Double-click the Tuple Based Window operator.

    The property editor opens. The attributes of the input schema are displayed in read-only mode.

  4. In the Size field, specify the number of events.

  5. (Optional) Click the Documentation tab and supply notes on this component.

  6. Click OK.