Skip to content

Data Mapping Block

The Data Mapping block transforms and rearranges data by mapping fields from a source variable or table to a destination, letting you rename keys while preserving the underlying values.

Data Source

The data source for mapping can be a table or a variable.

Edit data Map

The data map allows you to match source fields to destination fields using dot notation. A source can have multiple destinations.

data_mapping_block

data_mapping_block

Assign to Variable

Assign the mapped value to a Variable.

  • Variable Name: Name of the variable to assign the value to. This field appears when you select Assign to Variable.

Insert into Table

Insert the mapped value into a column in a Table.

  • Select Column: The column where the value will be inserted. This field appears when you select Insert into Table.

Practical Example

You have an array of data in Global Data as follows:

data_mapping_block

You want to assign the values of the address and name fields to a variable b, but rename the fields to Address and fullName.

First you use the Insert Data node to assign the values from Global Data to a variable a:

data_mapping_block

Then, in the Data Mapping node, you configure the data source as the variable a, select Edit Data Map to rename the address key to Address and the name key to fullName, and assign the mapped values to the variable b. The node configuration looks like this:

data_mapping_blockdata_mapping_block

The node cluster is as follows:

data_mapping_block

After running, the result shows variable a with the original values and variable b with the mapped data from variable a as follows:

data_mapping_block