Reading Time: 6 minutes

DataWeave is the MuleSoft expression language purpose-built for data integration (accessing and transforming data) that travels through a Mule app. DataWeave is tightly integrated with the Mule runtime engine, which runs the scripts and expressions in your Mule app. You can find all the details here.

As MuleSoft Professionals we develop using Anypoint Studio (learn everything about the new 7.7 release here!), where we also work our DataWeave transformations logic. Generally speaking, you need Studio installed for then to go through some local configuration, create a Mule Project, define the metadata in your DataWeave and you are ready to go. 

latest report
Learn why we are the Leaders in API management and iPaaS

What do you do when Studio is not available (New workspace, new device, maven misconfiguration, wrong JDK, etc.)? How do you learn and practice DataWeave? You don’t want to have to open Studio, create a new Mule Project, add a DataWeave component, define the input metadata, define the output metadata so that then you can finally practice the DataWeave language

Now we now understand the pain point our goal for today is to make your life easier!

Online DataWeave 2.0

We have a solution that you can start using right now: the Online Dataweave Playground! Check out what this tool looks like:

screen shot

There are three ways to work with the Online DataWeave tool: 

  1. [RECOMMENDED] Access online to the pre-alpha directly from the browser! Interested in contributing? Submit your pull requests.
  2. Running as a Docker container.The docker image can also be run and hosted by your own internal server or local device.
  3. Running in a local machine with Maven/java. As variety is the spice of life you can also run the application locally in your device or preferred server by using the JDK/Maven

DataWeave playground and tutorial (pre-alpha) 

screen shot

Checkout the DataWeave tutorial for a step-by-step on how to use the code snippets and execute them right from your browser! It will cover the typical zero-to-hero DataWeave tutorials supported in both code and documentation. You can also submit your pull requests on to provide feedback on the early release.

Running DataWeave in Docker

  1. Install Docker. 
  2. Check the latest Docker version of the DataWeave Playground in DockerHub 
  3. Open your terminal and download the version you would like (this will take a while): 
    1. docker pull machaval/dw-playground:2.3.1-SNAPSHOT
  4. Next you need to spin up that container, run the following command 
    1. docker run –name DataWeaveRunner -p 50007:8080 machaval/dw-playground:2.3.1-SNAPSHOT
  5. After seeing “The dw-playground was started at 8080,” go to localhost:50007. 
  6. And you’re done!

You can stop the execution and next time use the DockerDashboard or run docker start DataWeaveRunner.

Running DataWeave in a local machine with Maven/java

  1. Install JDK/Maven 
  2. Download and extract the source code from the dataweave-playground repository
  3. Open the folder from your terminal/prompt and run (it will take a while) 
    1. mvn clean install 
  4. Execute the class: 
    1. mvn exec:java -Dexec.mainClass=”com.github.estebanwasinger.DWPlayground”
  5. That it is it! You will see the application running as below:
screen shot

What’s next? 

That is all for today, you can keep working and practicing with the different scenarios described in the DataWeave Quickstart Tutorial. As a next step, you are now able to master all the DataWeave operators, find the full list here: DataWeave functions.

Do you want to go to the next level? Let us help, get some training to hasten your learning: Development in DataWeave course
Disclaimer ( It is not an officially supported MuleSoft Product. It is not supported by MuleSoft Support, you won’t be able to open MuleSoft Support cases for this Suite and there are no SLAs for responses nor bug/features progress. Interested in contributing? You can submit your pull requests here.