Contact Us 1-800-596-4880

Anypoint DataMapper Examples (Deprecated - DataMapper)

DataMapper continues 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 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 Preferences > Anypoint Studio > Palette Profiles and ticking the checkbox Show deprecated Mule Components and Attributes.

Many of the advanced capabilities of Anypoint DataMapper are best understood through examples. This page lists examples that illustrate using DataMapper in common but complex use cases.

Example Description

DataMapper Flat-to-Structured and Structured-to-Flat Mapping

Shows how to build maps that extract from and populate complex, multiple-level nested structures.

DataMapper Fixed Width Input Format

Two scenarios using DataMapper to extract data from fixed-width input files.

DataMapper with FlowRef Lookup Example

Uses DataMapper’s FlowRef Lookup Table with Salesforce, DataSense and DataMapper to map and transform data, thereby facilitating quick integration with Salesforce.

Legacy Modernization Example

Makes extensive use of rules for extracting data from nested structures, and translates requests from a SOAP web service for a file-based legacy application.

XML-Only SOAP Web Service Example

Demonstrates service orchestration and content-based routing. Based on the use case of patient admission into a hospital. Accepts SOAP requests, then orchestrates several Web services to complete a business process. Uses a DataMapper to map data from the responses from several internal hospital Web services to a response to send to the end user.