Creating and Modifying Simple Queries: Aggregate

Produce a simple query that combines data, similar to the CCL GROUP BY, GROUP FILTER, and GROUP ORDER clauses.

  1. In the Visual editor Palette, in Streams and Windows, select Aggregate (aggregate_template.gif).
  2. Select a location in the diagram and click to add the shape.
  3. Connect the Aggregate shape to an input.
    The aggregate border changes from red to black, indicating that it is valid, now that it has input.
  4. Add columns:
    1. Click Copy Columns from Input (copycolumn.gif) in the shape toolbar to select the columns to copy into the schema for the Aggregate window.
    2. Add additional columns by clicking Add Column Expressions compute_template.gif in the shape toolbar.
    3. Edit a column expression by double-clicking to open the inline editor, or by selecting the expression and pressing Ctrl+F2 to open it in the pop-up editor.
  5. Click Add GroupBy Clause (group.gif) in the shape toolbar to edit the grouping of columns in the aggregate object.
    Note: The Aggregate shape must have exactly one GROUP BY expression.
  6. (Optional) Click Set Keep Policy (retention_window.gif) to create a retention window.
    The default policy is to keep all rows of incoming data. You can also choose to keep only the last row, a specific number of rows, or keep the rows for a specific time. This defines the KEEP clause.
  7. (Optional) Use the Toggle window.gif option to change the aggregate object from LOCAL to OUTPUT.
Related concepts
Simple Queries
Keep Policy
Related tasks
Creating and Modifying Simple Queries: Filter
Creating and Modifying Simple Queries: Compute
Creating and Modifying Simple Queries: Join
Creating and Modifying Simple Queries: Union
Creating and Modifying Simple Queries: Pattern