DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Anypoint Mulesoft Masking Sensitive Data With DataWeave Custom Function in Logging
  • Generic and Dynamic API: MuleSoft
  • Transit Gateway With Anypoint Platform
  • Integrating Pub/Sub With MuleSoft

Trending

  • Data Contracts as the "Circuit Breaker" for Model Reliability
  • Optimizing High-Volume REST APIs Using Redis Caching and Spring Boot (With Load Testing Code)
  • Building a DevOps-Ready Internal Developer Platform: A Hands-On Guide to Golden Paths, Self-Service, and Automated Delivery Pipelines
  • From 24 Hours to 2 Hours: How We Fixed a Broken BI System With Apache Airflow
  1. DZone
  2. Data Engineering
  3. Data
  4. Mulesoft Data Mapper

Mulesoft Data Mapper

This quick article gets you started up with DataMapper and shows how to configure an instance of DataMapper in your flow.

By 
Sahil Talwar user avatar
Sahil Talwar
·
May. 18, 16 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
8.2K Views

Join the DZone community and get the full member experience.

Join For Free

First of all, the latest Anypoint Studio doesn’t work with tools like DataMapper. Instead, Anypoint has come up with a tool like Transformation, but then Anypoint allows you to work with the tools which have already been deprecated. So for this connector to show up you need to go to Window > Preferences > Anypoint Studio > Palette Profiles and then on the right side select the runtime(s) and click the box labeled 'Show deprecated Mule components and attributes'.

Now on to the use of Data Mapper. Anypoint DataMapper takes data in a specific format and outputs the same data in the format of your choice. For example, you can take data stored as XML and output the same data in JSON format.

Both the input and the output can be in any of the formats supported by Mule:

"Flat," row-oriented formats:

  • CSV

  • Fixed-width

  • MS Excel sheets

Structured formats:

  • XML

  • JSON

  • POJO object trees

  • Key-value Maps

You configure DataMapper using its GUI, called the graphical mapping editor. This editor has two panes: an Input pane and an Output pane, where you define your input metadata (format, names of fields, etc.) and your output metadata respectively.

Basic Usage

Let’s start with some basic usage of DataMapper:

Configuring an instance of DataMapper in your flow involves several high-level steps:

  1. Insert a DataMapper transformer at the desired location in your application flow.

  2. Tell DataMapper what comes in and what comes out.

    Image title

  3. Click Create mapping to create an initial data mapping. DataMapper will automatically map corresponding fields between the input and output data and will leave any other fields unmapped.

  4. If necessary, graphically modify the mapping, defining input elements and attributes to output elements and attributes:

Image title

With the above article, one can start up with DataMapper and get a little clue about what this connector is all about. We just need to manually match the connectors on both the input and output sides. However, values with the same name are sensed by Data Mapper itself and are mapped automatically.

Data (computing) MuleSoft

Opinions expressed by DZone contributors are their own.

Related

  • Anypoint Mulesoft Masking Sensitive Data With DataWeave Custom Function in Logging
  • Generic and Dynamic API: MuleSoft
  • Transit Gateway With Anypoint Platform
  • Integrating Pub/Sub With MuleSoft

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook