Summary
In this chapter, we learned that DataWeave is a functional programming language and that a script has two sections: the header and the body. In the header, we keep global variables or functions, and additional directives to specify input, output, DataWeave version, and other information. In the body, we write the code that will be executed.
We learned two different ways to add comments to your code: on a single line (with //
) or on multiple lines (with /*…*…*/
).
There are simple, composite, and complex data types. However, we listed only the simple (String, Boolean, Number, Regex, Null, Date, and Time-related) and composite (Array, Object) ones to understand the basic or most used types.
We listed some of the most popular data formats, such as CSV, DW, Java, JSON, and XML, to get a better understanding of what these formats look like and how are they used in DataWeave to transform data.
We learned about several operators and their categories: mathematical...