Map units

Learn how to use map units to work with collections in data sources.

A Map units is used to process data collections in sub-pipelines and then provide the results back to the main pipeline for further processing. It executes a given sub-pipeline for each element in a collection. Each element in a collection is processed in its own pipeline.

Map unit in pipeline

To use a Map unit, the Pipeline must have a data source containing at least one collection, as in the following example.

Request unit containing a collection (array of several elements)

When the data flow enters the Map unit, the flow iterates through each element in the collection and is processed in a sub-pipeline. For example, if the collection has two elements, then the map unit does a single call; if the collection has three elements, then the map unit does three calls; and so on. You can add additional data sources to the sub-pipeline, as required.

The results of each execution are then merged into a single output and provided to the main pipeline through the Results unit of the sub-pipeline.

Sub-pipeline for a Map unit
  1. In the Pipeline dashboard, select Map unit from the Library to add it to the pipeline.

  2. Connect a data source containing a collection to the Map unit.

  3. Click the Map unit to open the Mapping editor.

  4. From the item property, click Set formula.

  5. In the Formula editor, create a formula.

  6. If required, you can drag attributes from the data source to the parameters field.

  7. Click Inspect Sub Pipeline to view the sub-pipeline. You can add data sources, map attributes to parameters and so on.

  8. Click Done to save changes.