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
Expression
in
the shape toolbar.
- Edit a column
expression by double-clicking to open the inline editor, by selecting one of the tabs in
the Properties view, or by selecting an expression and pressing
Ctrl+F2 to edit it using the pop-up expression
editor.
Tip:
When entering column names and their datatypes, use
Tab to easily move between cells in the
table.
- 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.
You can also go further, and retain the rows defined by the
KEEP clause to span retention across multiple specified
columns. This spanning of retention across columns is done by listing column
names in the PER clause.
- (Optional) Use the Toggle
option to designate the aggregate object as LOCAL or
OUTPUT. By default, aggregates are Output.