Using the DataWeave core functions
These functions come from the dw::Core
module but there’s no need to explicitly import it into your script. All of these functions are added to DataWeave by default so you can make use of them right away.
We will mention whether the functions are null-safe. This means that you can send a null
value as the input and it won’t result in a DataWeave error. Instead, it will simply give a null
value in return so you can handle the data in further steps.
One important thing for you to understand about calling functions with two parameters is that you can use two different syntaxes to call them. This only applies to two-parameter functions. The syntax is as follows:
- Prefix notation, which looks like this:
function(arg0, arg1)
- Infix notation, which looks like this:
arg0 function arg1
You can choose whichever notation or syntax you feel more comfortable with, but most people prefer to use the infix notation whenever possible...