You are viewing an older version of this section. Click here to navigate to the latest version.

The Data Mapping View

Version 3.3.1 only

This document provides an overview of Studio’s graphical data mapping editor, Anypoint DataMapper (referred to as DataMapper from this point on).

This document assumes the reader is familiar with the Anypoint DataMapper Transformer. Consult the DataMapper Transformer Reference document for details.

Displaying the Graphical Mapping Editor

To see the graphical mapping editor, double-click the DataMapper building block in the Mule Studio canvas. Studio highlights the Data Mapping tab and displays the editor (see image below).


Overview of the Graphical Mapping Editor

The image below describes the different icons, indicators and tools in DataMapper’s graphical mapping editor. For a description of each item, consult the numbered table below the image.


Number Description


Input pane Add element icon. Click to add elements to the mapping, including:

  • Rules

  • Input Arguments

  • Lookup tables



Input pane Properties icon. Click to edit properties for the input data.



Input pane Search Filter. Type a string to display only elements in the input data that contain the string.



Input pane Expand all and Collapse all buttons. Click to expand or collapse all elements in the input pane.



Input pane Eye icon. Default position is closed.

  • When closed,eye_closed hides all elements in the input pane that are not mappable in the currently displayed mapping level. (To display different mapping levels, see item 6.)

  • When open, eye_open displays all elements in the input mapping pane that are not collapsed, whether or not you can map them in the current mapping level.



Current Element Mapping indicator/drop-down menu. Indicates the currently-displayed mapping level for multiple-level data mappings such as nested lists. The drop-down menu allows you to instantly switch between mapping levels. The screenshots below illustrate the respective displays of two mapping levels. Note that the solid, dotted, and greyed-out arrows change to reflect the mappings Mule defines for the selected mapping level.






Add Mapping icon: Click to add a new mapping. DataMapper displays the Structure mapping editor pop-up dialogue (see image below).

In the Name field, type a descriptive name for the new mapping.

In the Condition field, type an XPath condition that should be met by the structure being mapped. The condition will filter the selected source.



The Edit Mapping icon. Click to open the Structure Mapping Editor.


Click Advanced Mapping Editor to access DataMapper’s advanced editor. For a detailed explanation of Advanced Mapping Editor, consult DataMapper Transformer Reference.



Remove mapping icon. Click to remove the currently displayed mapping.


Output pane Clear field assignment icon. Click to remove the script assigned to a field in the output mapping. To see the script for a field, click the field. DataMapper displays the script in the editor below the output pane. For example, in the screenshot below, the name field’s script is $;.



Output pane Properties icon. Click to edit properties for the output data. Identical to the input pane Properties icon (see item 2 in this table).


Output pane Search Filter. Type a string to display only elements in the output data that contain the string. Identical to the input pane search filter (see item 3 in this table).


Output pane Undo icon. Click to undo your last action in DataMapper.


Output pane Redo icon. Click to redo your last action in DataMapper.


DataMapper Properties icon. Click to display, and optionally edit, properties for the DataMapper building block.



The Eye icon for the Output pane. Its behavior is identical to the Eye icon in the Input pane. See item 5 in this table.


Output pane Expand all and Collapse all buttons. Click to expand or collapse all elements in the output pane.


Output Mapping Fields. Studio indicates mapped fields in bold, and unmapped fields in italics. In the screenshot below, DataMapper maps the name and lastname fields, while phone is not. Click a mapped field to display its assigned script in the textbox under the Output pane. You can edit the assigned script directly in the textbox, or click the open_scrip_editor icon (highlighted below, left) to open the Expression Editor (below, right).



Mapping arrows.

Mapping arrows are black if the graphical editor is currently displaying the arrows' mapping level. (For a details on selecting mapping levels, see item 6 in this table.)

  • a solid arrow indicates a valid mapping in the current mapping level

  • a dotted arrow indicates a top-level mapping, such as a mapping between two nested lists

  • a greyed-out arrow indicates a mapping for another mapping level


Input pane controls for adding Input arguments, Rules or Lookup tables. Right-click the appropriate control to add an element to the input data (see image below).

Input arguments enable you to include dynamic information, such as the output of Mule variables or functions in your mapping. Consult Using Input Arguments for details.

Rules enable you to dynamically define mappings based on properties of the input data. For a detailed explanation of rules, consult the XPATH Mapping section of the DataMapper Transformer Reference page.

Lookup tables facilitate mappings from one value to another on the basis of lookup table definitions. For details consult the Lookup Tables section of the DataMapper Transformer Reference page.



Preview tab. Click to obtain a preview of your mapping. Consult Obtaining a Preview of Mapped Data for details.


Mappings tab, as described in this document. While in the Preview tab, click to display the graphical mapping editor.