Designing Intelligent Event Processor (IEP) Projects

Tuple Based Aggregator

The Tuple Based Aggregator operator performs statistical analysis for a specified number of records (also called tuples) that you provide as a size, and also for an increment that indicates how often you want the operation performed.

Statistics that you can compute via SQL statements in the property editor of the Tuple Based Aggregator operator include:

Use the Tuple Based Aggregator operator when you want to perform statistical analysis on a specified number of tuples.

For example, provided a stream of stock transactions, the Tuple Based Aggregator operator computes a new stream that holds the minimum, average, and maximum of the stock price of every 10 transactions, in which the size is 10.

ProcedureTo Create a Tuple Based Aggregator Operator

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

  2. Double-click the Tuple Based Aggregator operator.

    The property editor opens.

  3. In the Start field, enter the record in which you want the operator calculations to begin.

  4. In the Increment field, enter how often you want the analysis performed.

  5. In the Expression box, enter the expression for the SQL SELECT statement that is used to specify the input attribute upon which the SELECT is performed. You can add, delete, or move attributes.

  6. In the From box, define the input on which to perform the selection.

  7. In the Where clause box, provide additional filtering on records.

    For example:

    WHERE price > 30.00 AND stockDate < '2006-01-01' ;

  8. In the Group by box, group a result into subsets that have matching values for one or more columns of the database by specifying a comma-separated list of qualified attribute names.

  9. Click OK.