Aggregator is a module type designed to merge several bundles of data into a single bundle. An aggregator's setup usually contains a field Source node/module, where the module from which the bundle aggregation will start is specified. The source module is usually an iterator or a search module that outputs a series of bundles.
Once you setup the source module and close the aggregator's setup, the flow between the source module and the aggregator will be wrapped in a grey area to visualize the start and the end of the aggregation.
The following image shows a typical setup of the Array aggregator module:
When the scenario is executed, the aggregator module will:
As a rule of thumb, for one bundle inputted to the source module one bundle will be outputted from the aggregator module.
NOTE: Bundles generated by modules between the source module and the aggregator module are not outputted by the aggregator and thus not accessible by the modules in the flow after the aggregator. If you need any data from a bundle outputted by a module between the source module and the aggregator, make sure to include the given item in the aggregator's setup (e.g. in the Aggregated fields field in the setup of the Array aggregator module).
The video below is module 2 of the 3 part lesson titled Iterator and Array Aggregator. It is a continuation of module 1 (video link) and using a sample scenario, explains when to use an Array aggregator and what to do with the output.
The video below explains how the subsequent module after an Array aggregator affects the Target Structure type that can be selected while setting up the Array aggregator module.
When the Group by field contains an expression, the value of the expression is calculated for each input bundle. The Array aggregator module then outputs one bundle per each distinct value. Each output bundle contains two items
Key contains the distinct value,
Array contains all the bundles evaluated to this value.
The scenario below shows how to: