Aggregator

Aggregator converts flat data to hierarchical data. It takes input data from a single source, creates a schema (a structured hierarchy of data) by grouping the data based on fields you specify, then constructs the groups in the schema.

Note: You cannot configure this stage in the technical preview version of Spectrum Flow Designer.

Aggregator converts flat data to hierarchical data. It takes input data from a single source, creates a schema (a structured hierarchy of data) by grouping the data based on fields you specify, then constructs the groups in the schema.

Note: If your data includes a field by which you will group your data, such as an ID field, you must sort your data before running it through an Aggregator. You can do this by sorting the data prior to bringing it into the flow, by sorting the input file within Spectrum Enterprise Designer (for jobs or subflows, but not services) or by adding a Sorter stage to your flow (for jobs, services, or subflows).

Group By

Choose the field you want to use as the basis for aggregating into a hierarchy by selecting Group by in the tree then clicking Add. Records that have the same value in the field you choose will have their data aggregated into a single hierarchy. If you select multiple fields then the data from all fields must match in order for the records to be grouped into a hierarchy.

For example, if you want to group data by account number you would select the account number field. All incoming records that have the same value in the account number field would have their data grouped into a single hierarchical record.

Note: You must connect a stage to the Aggregator input port in order for a list of fields to be available to choose from.

Output Lists

The fields you choose under Output lists determine which fields are included in each record created by Aggregator. To add a field, select Output lists then click Add and choose one of these options:

Existing field
Select this option if you want to add a field from the flow to the hierarchy.
New data type
Select this option if you want to create a parent field to which you can then add child fields.
Template
This option allows you to add a field based on data in the stage connected to the Aggregator's output port.

If you want the field to have child fields, check the List box.

Enter the name of the field in the Name text box, or leave it as-is if it auto-filled and you are satisfied with the name. Keep in mind that the Aggregator stage does not allow invalid XML characters in field names; it does allow alphanumeric characters, periods (.), underscores (_), and hyphens (-).

Click Add to add the field. You can specify another field to add to the same level in the hierarchy or you can click Close.

To add child fields to an existing field, select the parent field then click Add.

Note: You can modify the field group by highlighting a row and clicking Modify, and you can remove a field group by highlighting a row and clicking Remove. You can also change the order of fields by clicking a field and clicking Move Up or Move Down.