What’s New in DataWeave
DataWeave 2.4 is bundled with Mule 4.4. The 2.4 version of DataWeave introduces the following features:
Ability to read larger-than-memory strings automatically. When you are using the indexed reader strategy and processing a String with a size larger than 1.5 MB, DataWeave automatically splits the value in chunks to avoid out-of-memory issues. Related reader properties are
com.mulesoft.dw.buffered_char_sequence.enabled. Refer to Indexed Readers in DataWeave.
New reader and writer properties for working with data formats. For example, the XML writer now enables you to define namespaces at the root level.
Many new modules, functions, types, annotations, and variables. Some are experimental and subject to change in future releases.
A number of functions are overloaded to introduce new helper functions for handling
Changes to the documentation include more detailed function signatures and organization of the functions by their module names, such as
DataWeave 2.4 is bundled with Mule 4.4. For information about the Mule 4.4 release, refer to What’s New in Mule 4.4.
DataWeave introduces the following reader and writer properties:
DataWeave (dw) reader property:
privilegesenables you to provide a comma-separated list of privileges to use in the format, such as
Excel (XLSX) reader property:
tableLimitenables you to set position of the last column in each row.
YAML writer property:
writeDeclarationenables you to write the header declaration.
XML writer properties:
defaultNamespacespecifies the default namespaces of the output XML , and
writeDeclaredNamespacesmarks the namespaces to declare in the root element of the XML.
New DataWeave modules and features:
dw::Core introduces new functions and annotations:
dw::core::Dates is a new module with functions and types to create and manipulate Date types, for example, the function
dw::core::Strings introduces new functions:
dw::util::Coercions is a new DataWeave module with functions and types to simplify data type transformations, for example, the function
dw::util::Math is a new DataWeave module with functions and variables that provides mathematical functions, for example, the function
dw::util::Periods is a new DataWeave module with functions and types to simplify the creation of Periods, for example, the function
dw::util::Tree introduces new functions:
dw::util::Values provides a new type