How to invoke the Custom Java Class from inside a Dataweave?

Below is the example

%dw 2.0
Import java!com.mycompany::classname
output application/json
  a: classname::methodName("myString")

More info –


How to access secure property inside Dataweave?

By using p(‘secure::<property name>’) you can access the secure property defined as part of secure property file in mule application

More info –


How to call Flow from inside a Dataweave?

You can use Dataweave lookup function to call flow from inside a Dataweave It works in Mule apps that are running on Mule Runtime version 4.1.4 and later. It takes the flow’s name and an input payload as parameters. For example, lookup(“flowname”, payload)


How to Log message in Dataweave?

Use log(” Current Time Stamp “,now()) function in Dataweave

More info –


How to use comment line in Dataweave?

// single line comment.

* This is.
* multi-line.
* comments in.
* DataWeave.


What is the latest version available for Dataweave?

Dataweave latest version is 2.3, please see the new features in latest Dataweave version


How to use map operator in Dataweave?

Please see –


How to use filters in Dataweave?

Please see –


How to use the Custom Dataweave functions in Mule?

Please see –


How you can define a variable in Dataweave?

Please see –


How to convert an Object into Array using Data weave?

Use Pluck operator which iterate over an Object and return an array of keys, values, or indices from the object. More info –


How you will parse an XML with or without namespace in Dataweave? How you will retrieve the attribute value

Please see –


Difference between map and mapObject?

map – Iterates over items in an array and outputs the results into a new array.

mapObject – Iterates over an object using a mapper that acts on keys, values, or indices of that object.

From the functionality wise both are same but both work on different input and return different output, where array and object are Java array and Java object.


How you can merge two Arrays in Dataweave?

Use flatten operator to merge two array into one – more info –


How you will convert string into Array and vice versa?

String to Array –

Array to String


What is filter and how we will use it in Dataweave?

Please see –


How you will do null check in Dataweave?

Please see –


Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.

Share this:
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
3 years ago

For question 6, the answer should be (as of today) v2.3 and not 4.3 . Please correct the typo.

Sambasiva reddy muktapuram
Sambasiva reddy muktapuram
5 months ago

too good