Mapping Editor

Mapping Editor is a tool that enables you to transform and map data with the help of output schema, various mapping types, functions, properties, and variables.

In Mapping Editor you work with input data and output data. Input data may come from various places and in different formats. Mapping editor’s task is to transform this data to the format expected in the output. Output data format is defined by Output Schema.

Mapping Editor provides four mapping types: Expression, Object Map, Array Map, and Array.

Expression

Expression mapping allows you to create complex mapping logic, make calculations, and transform data with the help of expressions. Use functions, properties, and variables combined with the logical operators to complete the task.

Expression

Object Map

Use Object Map to add an object type property. Each object type property may contain a number of nested properties. For each of those nested properties, you may use Object Map or Array Map to create a more complex nested structure or use Expression to map them.

To add an object type property, do the following:

  1. Add new or select an existing property in Output Schema.
  2. Select Object Map.
  3. Click + next to the property name to add a nested property.

Object Map

Array Map

Array Map is used to create a new array of objects based on the existing one. Use Array Map to create an array of objects type property. Each array of objects type property contains List and Item. List is used to map the array and Item is used to configure the structure of objects in the array.

To create and map an array of objects property, do the following:

  1. Add new or select an existing property in Output Schema.
  2. Click Array Map.
  3. Map List to the array of objects property.
  4. Define the sctructure of the object inside the array by adding properties to Item with the help of Object Map. Use Expression to map those properties.

Array Map

Mapping Examples

Example 1. Concatenate Two Properties

Task:

You have an object with FirstName, LastName, and Title properties. You want to receive an object with FullName and Title properties instead.

Example 1 Task

Solution:

  1. Сreate a FullName property in the Output Schema.
  2. Choose Expression mapping type and enter the following expression into expression editor: FirstName + ' ' + LastName.

Example 1 Solution

Example 2. Nested Object Mapping

Task:

You have an object with OrderId, CustomerFirstName, and CustomerLastName properties. You want to receive an object with a different structure, where customer data is stored in a nested Customer object.

Example 2 Task

Solution:

  1. Create a Customer property in the Output Schema and choose Object Map.
  2. Click + next to Customer to add FirstName property to the Customer object.
  3. Click + next to Customer to add LastName property to the Customer object.
  4. Map LastName and FirstName properties to CustomerLastName and CustomerFirstName accordingly.

Example 2 Solution

Example 3. Concatenate Two Properties in a Nested Object

Task:

You have an object with a nested Customer object with FirstName and LastName properties. You want to change the nested object structure to store the first and last name data in a FullName property.

Example 3 Task

Solution:

  1. Create a Customer property in the Output Schema and choose Object Map.
  2. Click + next to Customer to add FullName property to the Customer object.
  3. Click on FullName and choose Expression.
  4. Enter the following expression into expression editor: Customer.FirstName + ' ' + Customer.LastName.

Note that you should use Customer.FirstName instead of FirstName as you deal with a nested property.

Example 3 Solution

Example 4. Concatenate Two Properties in Each Object in the Nested Array of Objects

Task:

You have an object with a Company property and a nested array of Contacts objects with FirstName, LastName, and Email properties. You want to receive an object with a different structure and different property names.

Example 4 Task

Solution:

  1. Create Account property in the Output Schema.
  2. Choose Expression and map Account to Company.
  3. Create Users property in the Output Schema and choose Array Map to make it a nested array of objects. List and Item will appear.
  4. Map List to Contacts array.
  5. Click + next to Item to add a FullName property.
  6. Click FullName property, choose Expression, and enter the following expression: FirstName + ' ' + LastName
  7. Click + next to Item to add an Email property.
  8. Map Email to Email.

Example 4 Solution