Adding aggregations in event strategies

By adding aggregations, you can define various functions that can be applied to events in an event strategy. For example, you can sum property values from incoming events for trend detection, such as detecting the number of dropped calls, certain transactions, or aggregated purchases conducted with a credit card.

  1. In an event strategy, add an Aggregate shape.

  2. Open the Properties panel of the Aggregate shape.

  3. Click Add aggregation.

  4. From the list, select the function that you want to use.

    Click to see available functions:

    • Average – Returns the average value of the specified property for the collected events.

    • Count – Returns the total number of collected events for the specified property.

      Note: As a best practice, add only one count function. Multiple count functions consume processing power unnecessarily as only the last count value is evaluated.
    • Distinct Count – Returns the number of unique values of the specified property for the collected events. This function counts the NULL value as a unique value.

    • First – Returns the value of the first event in the window for the specified property.

    • Last – Returns the value of the last event in the window for the specified property.

    • Max – Returns the highest value of the specified property for the collected events.

    • Median – Returns the median value of the specified property for the collected events.

    • Min – Returns the lowest value of the specified property for the collected events.

    • Sum – Adds the values of the specified property for the collected events and returns the sum.

    • Standard Deviation – Returns the standard deviation of the specified property for the collected events.

    • True if All – Returns TRUE when all values of the specified property are TRUE.

    • True if Any – Returns TRUE when at least one value of the specified property is TRUE.

    • True if None – Returns TRUE when all values of the specified property are FALSE.

  5. In the Source field, specify a property that is available in the data flow.

    Note: By default, all properties defined in the event strategy class are made available through a streamed data set. This makes properties of the event strategy class available to the Real-time Data stream shape. Depending on how the event strategy is constructed, additional properties can be available in the list of the aggregate source field. Additional properties can include:
    • Properties from aggregations within the same event strategy processed prior to the current one.

    • Properties coming from a preceding Lookup shape.

    • Properties coming from mapped fields from the preceding Join shapes.

    Note: The Source field is not available for the Count function.
  6. In the Aggregate field, provide a name.

    Note: The name allows for creating a dynamic property that exists only in the context of the event strategy. The dynamic property contains the result of the aggregation function. Aggregation names within an event strategy must be unique.
  7. Repeat steps 3 through 6 to add another aggregation.
  8. Click Submit.