Skip to end of metadata
Go to start of metadata

Introduction

A mapping consists of all target fields or nodes and their corresponding scripts. These scripts may contain references to source fields or nodes or to project components, use functions, or contain other valid script logic. A mapping does not include target fields that are not mapped.

After you have completed a transformation mapping, you can export the mapping for reference, to share outside the project, or to reuse later. Mappings that have been exported can be imported into a transformation, with the ability to select whether existing mappings will be overridden.

Exporting a Transformation Mapping

Exporting a transformation mapping can be done from either mapping mode or script mode.

To initiate the download process, in either mode, click Export along the top right of the target structure:

The exported file will be in JSON format and contain each target node and the contents of any scripts, if included. Note that new lines are indicated by \n. A sample export is included below:

Sample Export
{
  "mappings": [
    {
      "targetNode": "json$",
      "script": ""
    },
    {
      "targetNode": "json$item.",
      "script": ""
    },
    {
      "targetNode": "json$item.userId$",
      "script": "<trans>\njson$item.userId$\n</trans>"
    },
    {
      "targetNode": "json$item.id$",
      "script": ""
    },
    {
      "targetNode": "json$item.title$",
      "script": ""
    },
    {
      "targetNode": "json$item.body$",
      "script": "<trans>\njson$item.title$\n</trans>"
    }
  ]
}

Importing a Transformation Mapping

Importing a transformation mapping can be done from either mapping mode or script mode.

To begin the import process, click Import along the top right of the target structure:

This opens a popup where you can provide the the mapping to be imported:

  • File: Click the Browse button on the right to select a file that contains the mapping. The file must be in JSON format.
  • Upload: After selecting a file, click Upload to upload the mapping and proceed to the next screen.
  • Cancel: Click Cancel to close the import dialogue without uploading a mapping.

After uploading a file, the next screen provides a list of mapping conflicts, if any, and presents an interface for selecting which mappings to use:

  • Target field has existing mapping: Target fields that already have an existing mapping that conflicts with the one being imported will be listed on the left. Select the checkboxes of any target fields whose mappings you want to be replaced with those in the file being imported. You can also click Select All to select all fields, or Select None to clear all fields.
  • Target field does not exist: Target fields that do not exist in the current mapping but are included in the file being imported cannot be mapped. These fields will be listed on the right.
  • Continue: Click this button to proceed to use the selections on this screen to merge the imported mapping with the existing mapping and return to the transformation mapping screen.
  • Cancel: Click Cancel to close the mapping conflicts screen without saving. The existing mapping will remain unchanged.
On This Page

Last updated:  May 14, 2019

  • No labels