Produce a simple query that combines data, similar to the CCL GROUP BY, GROUP FILTER, and GROUP ORDER clauses.
- In the Visual editor Palette, in Streams and Windows, select Aggregate (
).
- Select a location in the diagram and click to add the shape.
- 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.
- Add columns:
- Click Copy Columns from Input (
) in the shape toolbar to select the columns to copy into the schema for the Aggregate window.
- Add additional columns by clicking Add Column Expressions
in the shape toolbar.
- 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.
- Click Add GroupBy Clause (
) 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.
- (Optional) Click Set Keep Policy (
) 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.
- (Optional) Use the Toggle
option to change the aggregate object from LOCAL to OUTPUT.