Contact Us 1-800-596-4880

Anypoint DataMapper User Guide and Reference

Enterprise, CloudHub

DataMapper will continue to be fully supported in all current and future versions of Mule 3.x, however it will be removed in Mule 4.0 in favor of the Transform Message component (based on DataWeave code). We recommend that if you wish to take advantage of the new capabilities of DataWeave or if you start new projects, upgrade now.

A migration tool is now included in Studio, which assists in converting a DataMapper map to DataWeave. Right click on a DataMapper, select Migrate to DataWeave, and follow the instructions.

dw migrator

If you don’t see DataMapper on your palette, you can enable it by going to PreferencesAnypoint StudioPalette Profiles and ticking the checkbox Show deprecated Mule Components and Attributes.

To deploy a project that includes DataMapper and is built with Mule Runtime 3.6 or older in one of your own servers, you must Include the DataMapper Plugin

datamapper

Anypoint DataMapper, or DataMapper for short, is a Mule transformer that delivers simple, yet powerful, visual design of complex data transformations for use in Mule flows, including:

  • Extraction and loading of flat and structured data formats

  • Filtering, extraction and transformation of input data using XPath and powerful scripting

  • Augmenting data with input parameters and lookups from other data sources

  • Live design-time previews of transformation results

  • High-performance, scalable data mapping operations

Inputs and outputs can be “flat” (that is, row-structured) data like CSV files or Excel spreadsheet data, or structured data in the formats supported throughout Mule: XML, JSON, key/value Maps and trees of Plain Old Java Objects (POJOs).

In general, using the more basic Mule transformers to recreate the functionality of a single DataMapper may require a complex flow of format converters for input data, splitters, filters, For Each scopes, expressions, other transformers, aggregators, and yet more format converters for the output. A DataMapper-based implementation is faster to implement and easier to maintain than the alternatives.

Graphical design of the complex transformations supported by DataMapper makes it simple to apply all of its capabilities with little coding beyond basic expressions and function calls to transform data.

mapping example compl

Full DataMapper functionality is exclusive to the Mule ESB Enterprise Edition (EE), it won’t work if you’re deploying your projects to Mule ESB Community Edition (CE).

For an introduction to the DataMapper graphical interface and basic concepts, see DataMapper Concepts. For a complete description of DataMapper’s graphical interface, see DataMapper Visual Reference.

Examples

The following examples show the use of DataMapper:

Document Description

Turns JSON requests to XML and back. Also turns a flow variable into an outbound property.

Renames fields in a Salesforce record selector. See the "Batch Step 1" section.

Transforms a message to communicate with the Samsung web service API in the "samsungOrder Flow" section.

Maps data from responses to a healthcare database for viewing by a patient, and formats questions from patients for access to a patient information web service.

Maps data from a shipping order POJO into a CSV file in the "How it Works" section.