Designing Intelligent Event Processor (IEP) Projects

Relation Converter Operators

Relation Converter operators change the records in a relation or the format of a relation, or they can take a snapshot of the current relation.

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

Operator 

Input 

Output 

Delete Stream 

Relation 

Stream 

Insert Stream 

Relation 

Stream 

Notification Stream 

Relation 

Stream 

Relation Stream 

Relation 

Stream 

Delete Stream

The Delete Stream operator converts the deleted records of a changed relation into a stream. The operator takes all records that are in a previous table but not in the current table, and puts them into a stream with a timestamp.

Use the Delete Stream operator when you need to place deleted records from a relation into a stream.

ProcedureTo Create a Delete Stream Operator

  1. Drag a Delete Stream operator from the Palette to the Design view.

  2. Connect the input side of the Delete Stream operator to a relation output.

  3. Double-click the Delete Stream operator.

    The property editor opens.

  4. The Details section of the property editor displays the name of the operator and the output schema.

  5. The Attributes section provides a picture of the current state of a stream.

  6. Click OK.

Insert Stream

The Insert Stream operator converts a relation into a stream.

When the Insert Stream operation is triggered, all changed or new records are issued as output.

The Insert Stream operator passes new records as output. In contrast, the Relation Output operator issues individual records tagged with either a plus, meaning a new record, or minus, meaning a record that was issued previously but is no longer part of the relation result.

Use the Insert Stream operator when you want to pass new or changed records into the output stream.

ProcedureTo Create an Insert Stream Operator

  1. Drag an Insert Stream operator from the Palette to the Design view.

  2. Connect it to an operator with a relation output.

  3. Double-click the Insert Stream operator.

    The property editor opens.

  4. The Details section of the property editor displays the name of the operator and the output schema.

  5. Click OK.

Notification Stream

The Notification Stream operator takes a relation as input, and outputs a stream that consists of events whose presence is determined by a specific time interval.

Assume that the following conditions are true:

If the event is still in the relation at 2:01 in the afternoon, then the event is included in the output stream for the first time.

If the event is still in the relation at 2:02 in the afternoon, then the event is included in the output stream for the second time.

If the event is still in the relation at 2:03 in the afternoon, then the event is included in the output stream for the third time.

If the event is no longer in the relation at 2:04 in the afternoon, then the event is no longer included in the output stream.

The scenario in Gap Window involves creating a relation that indicates which message is missing at any point in time. You could use the Notification Stream operator to create an output stream of resend requests for the missing messages. Connect the Gap Window operator to a Notification Stream operator, configure the time interval, and then send the output to a Stream Output operator.

ProcedureTo Create a Notification Stream Operator

  1. Drag a Notification Stream operator from the Palette to the Design view.

  2. Connect the input of the new Notification Stream component to an operator that has relation output.

  3. Double-click the Notification Stream operator.

    The property editor opens. Notice that the component has inherited the schema of its input relation.

  4. Use the Notify Every field and drop-down list to specify the time interval.

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

  6. Click OK.

Relation Stream

The Relation Stream operator converts a relation result from an input operator into a stream. It provides a summary of the diffs between the two consecutive tables, and places a timestamp on each event in the diff and places the result into the output stream.

Use the Relation Stream operator when you need relation result information in stream.

ProcedureTo Create a Relation Stream Operator

  1. Drag a Relation Stream operator from the Palette to the Design view.

  2. If needed, double-click the Relation Stream operator to examine the Details and Attribute sections.