Ana içeriğe geç

Mapper

Mapper turns one document shape into another. Load a sample of what arrives and a sample of what is needed, draw the connections between the fields, and Mapper writes the transformation for you.

Mapper

Source on the left, target on the right, the tools rail beside them.

Loading the two sides

The opening screen has a SOURCE box and a TARGET box. For each, either choose a .json or .xml file or paste the data straight in, then Load Data. Both sides are needed before the canvas appears.

Mapping

Drag a field from the source tree onto a field in the target tree. Each mapping draws as a line, and the count sits at the top left.

Dropping a parent node onto a parent node can map all the matching children underneath in one go - turn that on in Settings if you want it, and you get a summary of every pair it made.

Right-clicking a field gives you the structural edits - add a field, an array or a child, rename, copy, cut, paste, remove a mapping, delete a node.

The tools rail

Drag these onto a target field to add logic:

ToolWhat it does
IfIncludes the field only when a condition holds
If / ElseOne value or another
For EachRepeats for every item in an array
VariableCalculates a value before the field is built
LookupTranslates a value through a lookup table
CodeRuns your own Groovy for that field

Each opens a panel at the bottom where you configure it.

Lookups and scripts

Lookup manages the tables this mapper uses - add columns and rows by hand, or paste CSV or JSON in.

Scripts holds code that runs around the mapping: Imports at the top, Pre-Script before, Post-Script after.

Checking it

Groovy shows the generated transformation, which you can copy or download.

Execute runs it: paste input on the left, or Use loaded source, then Run to see the mapped output on the right.

Saving

Save writes a .gtmapper file into the project's User Object folder. A workflow's Mapper node then points at that file.

Settings are stored inside the file itself, so they travel with the mapper rather than following you between mappers.