Data Mapping
Map data from one variable or table to another, preserving values while allowing key modifications.
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.
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:
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
:
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:
The node cluster is as follows:
After running, the result shows variable a
with the original values and variable b
with the mapped data from variable a
as follows: