DataWeave Language
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.
-
Read all about how to leverage the Anypoint Studio UI on About Transform Message Component
-
Read all about how to implement this same component through XML on DataWeave XML Reference
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. See DataWeave Migrator. |
Compatibility
The following table specifies which version of DataWeave is bundled with each Mule runtime engine release:
Mule Version | DataWeave Version |
---|---|
4.7 |
2.7 |
4.6 |
2.6 |
4.5 |
2.5 |
4.4 |
2.4 |
4.3 |
2.3 |
4.2 |
2.2 |
4.1 |
2.1 |
3.9 |
1.2 |
3.8 |
1.1 |
3.7 |
1.0 |