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.
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.
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.
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 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.