Introducing DataWeave
Before we dive into all the DataWeave syntax and start doing some programming, we’ll first understand what DataWeave is and how it’s different from other programming languages you may be familiar with – such as Java or Python. Then, we can start with the basics of the language.
There are two major versions of DataWeave so far:
- DataWeave 1 is used with the Mule runtime version 3 (Mule 3)
- DataWeave 2 is used in Mule 4
Since Mule 3 is mostly used by companies who have not yet migrated to Mule 4, and Mule 4 is the language chosen in new projects nowadays, we’ll focus on DataWeave 2 in this chapter, specifically, version 2.4.
Note
The full list of differences between DataWeave 1 and DataWeave 2 will not be covered in this chapter since they’re out of scope. However, you can read the following documentation page to learn how to migrate your code from version 1 to version 2: https://docs.mulesoft.com/mule...