Recipe 29 – Using DataWeave 2 in Mule 4

DataWeave is a programming language used by MuleSoft to transform data. Mule 4 uses DataWeave 2 which is similar to DataWeave 1 with the following new capabilities:

  • Reusable functions
  • Ability to call to Java code
  • Multipart, URL-encoding
  • Multiline comments
  • Modules and imports

This recipe aims to instruct users on how to use DataWeave 2 in a comprehensive step-by-step guide.

Prerequisites

  1. MuleSoft Anypoint Studio 7.4.0 or above (https://www.mulesoft.com/lp/dl/studio) installed
  2. MuleSoft CloudHub Account (https://anypoint.mulesoft.com)
  3. Postman app for testing: (https://www.getpostman.com/downloads/)