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

DataWeave

Overview

The DataWeave Language is a simple, powerful tool used to query and transform data inside of Mule. It can be implemented to:

  • graphically map fields by dragging one attribute to another, just like you were able to with the now deprecated DataMapper, or

  • leverage its powerful object-oriented language that’s specially designed to make writing transformations quick, without compromising maintainability.

DataWeave supports a variety of transformations: simple one-to-one, one-to-many or many-to-one mappings from an assortment of data structures, and can complete more elaborate mappings including normalization, grouping, joins, partitioning, pivoting and filtering. With DataWeave and Mule Expression Language (MEL), you can take your application’s data transformation ability to the next level.

You can also call upon the power of DataWeave language within other components by using Mule Expression Language DataWeave Functions.

The language is tightly integrated with Mule and Anypoint Studio. Use the Transform Message component, which allows you to use the language to query and transform data through DataWeave. Any mappings you perform through the graphical interface will be expressed in DataWeave code in real-time.

DataWeave supports DataSense, which allows you to leverage metadata from connectors, schemas and sample documents in order to design your transformations more easily. DataSense assists you in design time by providing a live stream of content types while you are coding, scaffolding your mappings to help make writing transformations fast and easy.

DataWeave replaces DataMapper. MuleSoft recommends you use DataWeave, if possible, to avoid future obsolescence.

If you have projects that employ the deprecated DataMapper, 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.

General MuleSoft Resources