Super Mapper

Map field names and convert field value types with advanced functions

Praise Magidi avatar
Written by Praise Magidi
Updated over a week ago

When transferring data from one system to another, there is often a difference in the data schema, particularly in field naming. For example, in your CSV input file, a column could be named Address, while in your target system, the corresponding field might be called Primary Address.

Data mapping can be seen as the lifeblood of any data integration process. Data or Field mapping is simply the process of extracting data fields from one source file and matching them to their related target fields in the destination file. Data integration or ETL mapping helps consolidate data by extracting, transforming, and loading it to a target database which may be a relational database or a CSV document.

In traditional programming, you might make a mapping function to convert from one data structure to another, perhaps using something like AutoMapper, if you've worked in C#.

In Synatic, there is a Super Mapper Step to help with this task. The Super Mapper is similar to the Field Mapper step in that it can convert from one field name to another, but the difference lies in the more advanced functionality that the Super Mapper step has available. The Advanced functions can apply JavaScript, Expressions, Parsing, and explicit values to the source data fields as well as formatting field values using the Handlebars template language.


Watch the video below to learn how to add the Synatic Super Mapper step and configure the data mapping table.


Adding the Super Mapper Step

The Field Mapper Step is located in the Mapper drawer in the Steps palette. To use a Super Mapper Step in your flow, drag it onto the desired location in the flow, and configure the mapping table.

Synatic Super Mapper Add Super Mapper Step

Configuring the Super Mapper Step

Mapping Table

The mapping table has two main columns, the Source column and the Destination column, and are connected with map lines.

Synatic Super Mapper Mapping Table

Source Column

The Source column has three options you can use to manually add source fields, import fields, or remove all fields from the column.

  • Add Source
    Click the Add Source option to add a new field to the Source column.
    Click the Data Type drop-down arrow to select and configure the data type of the source field.

Synatic Super Mapper Add Source

There are six data types to select, which let you configure each source field using advanced operations. The resultant value of the field will be applied to the associated destination record.

  1. Path - Enter the name of the source field. The value in the source field will be applied to the destination field.

  2. Value - Enter a fixed value for this field that will be applied to the destination field.

  3. Expression - Enter a mathematical expression to calculate a value for this field and applied to the destination field.

  4. Parser - You can use the Parser to input data (usually text) and build a structured string value for this field that will be applied to the destination field. You can use the in-built Synatic handlebars text templating language to perform complex operations and return and apply a string value.

  5. Javascript - Enter some JavaScript code for this field, the result of which will be applied to the destination field.

  6. Remove - Select Remove to delete the Source field or operation from the map.

  • Import Fields
    Click the Import Fields option to open an Import dialog and enter the fields (separated by commas) or paste a prepared list of fields (separated by commas) to import.

    - Click + Import Fields to execute the import process.

  • Remove All Sources
    Click the Remove All Sources option to remove all sources from the column immediately.
    ⚠️ Be careful here; this operation cannot be undone.

Extra options

  • Click on adjacent to each field to delete the field.

  • Select adjacent to each field to drag it to another position in the order.


Connections

Connections are lines drawn between a Source field and its associated Destination field, which may or may not be on the same adjacent level.

  • Manual
    To connect fields manually, click and hold the Ο next to the source field and drag a line to the Ο next to the destination field. The lines will attach when you release the hold.

  • Auto Map
    Click the Auto Map option to automatically create connection lines between Source and Destination fields that have the same name.

  • Order Connections
    Click the Order Connections option to automatically align each field in the right-hand column with its associated field in the left-hand column.

  • Remove All Connections
    Click the Remove All Connections option to delete all the connections between fields.


Destination Column

  • Add Destination
    Click the Add Destination option to add a new field to the Destination column.
    Click the Data Type drop-down ν arrow to select and configure the data type of the source field.

There are two options you can use to configure the destination field.

  1. Default Value - Enter a default value to this field if no other values are mapped to the destination field.

  2. Data Type - Select one of the available data types to align the field with its type.

  • Import Fields
    Click the + Import Fields option to open an Import dialog and enter the fields (separated by commas) or paste a prepared list of fields (separated by commas) to import.

    - Click Import Fields to execute the import process.

  • Remove All Destinations
    Click the Remove All Destinations option to remove all destinations from the column immediately.
    ⚠️ Be careful here; this operation cannot be undone.


Options

  • Preserve Record
    You can select this option if you want to map the values to the current destination record and not create a new record.


Advanced Mode Options

None.


Limitations and known issues

None.


See Also

Read more about Field Mapper.


Useful Tutorials

Revisit the Getting Started page for a refresher.

Read more about Steps here.

Did this answer your question?