Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Mapper block lets you transform data and map fields between two data formats, so that the data coming from one app can be is transformed for use in another app.

...

To use it, simply drag the Mapper block onto the Canvas and configure the source and target blocks (in the “Working Area” tab):

...

Click the Map model“Map model” button to begin configuring the mapping table used by the Mapper block.

Mapper types

When the Map Model button is clicked , the Mapper block will ask the source and target blocks to give examples of the data formats that they use, referred to as the model.

Info

...

A block model

...

is a JSON object describing the data format that the block accepts as input or returns as output. It is essentially a list all the fields and the field types, used by the mapper block to create a mapping table.

For most ready-made blocks you will find that the block model is already setup. The block model is defined in the block template settings.

The model of the source and target blocks are used to create the mapping table, with all the field names ready to be mapped.

  • For the source block, the Mapper block try to construct the model dynamically, by asking the block to provide a data sample. Alternatively it will use the output model defined in the block template.

  • For the target block, the Mapper block will use the input model defined in the block template.

  • If a model is not found for a block, the field names must be entered manually into the mapping table.

The mapper block will use this information to dynamically construct a mapping screen. (You will may see a green checkmark appear next to the GetEmployees source block as a data sample is pulled, before the mapping screen appears.)

...

 The  The mapping screen can be thought of as a spreadsheet with two columns – one for the source application, and one for the target application. By connecting corresponding fields, you are building a map for how data should be transformed. And like in a spreadsheet, you also have the possibility to use functions, to concatenate fields, put text to upper case, date manipulation, etc.

Expand the area on the left, and the Target column on the right, as shown in the screenshot.
You can now drag and drop fields from the area on the left into the Source column, to specify how fields will be mapped to the Target column.

But you may notice you are not able to map the zip code field directly, because of a type difference:The field type is specified

Image Modified

The zip code field has a string type in the source model, but a number type in the target model:

...

Save the mappings, and then save the workflow.

Mapper types