Manipulate Date Time Operations In Dataweave This tutorial talks about how to manipulate different Date time operations in Dataweave, it include various Dataweave date time functions to perform date time conversions in different formats. After this tutorial you will be able to perform different date time operations Convert Current Datetime to CST Timezone…
Read MoreXML processing or parsing XML processing or parsing in Dataweave become somewhat tricky as it depend on the input type of the XML Two type of XML input request we can get Include NameSpace No Namespace Processing of both somewhat get differ in dataweave Let’s start with Namespace first For the namespace…
Read MoreDebug Dataweave in MuleSoft Dataweave is the most used activity in MuleSoft integration and it’s too much of time to come up with a correct dataweave. With this post we like to highlight how quickly you can debug and test your dataweave in MuleSoft Let’s start with debugging dataweave in MuleSoft applicaiton if we…
Read MoreDataweave Tips & Guidelines Dataweave Tips & Guidelines – Here are few tips and best practices which could be useful to consider while writing dataweave. There are plenty of operators in dataweave which can make your life easy while writing complex dataweave transformation. Obviously the list below is not an exhaustive list, but we…
Read MoreReduce Function Reduce function is used to do any computation while iterating on an array, computation result is not lost while iteration. it’s a very helpful function where you have to do computation on some array element. reduce(Array<T>, (item: T, accumulator: T) -> T): T | Null or Array<T> reduce( (item: T, accumulator: T)…
Read MoreDescendants Selector Works on arrays and objects and to retrieves the values of all matching key-value pairs in the sub-tree under the selected context regardless of the hierarchical structure of the fields. Let’s see how Descendants Selector works. The .. selector acts on arrays and objects Input Payload Dataweave expression: Output
Read MoreExternal Jar Class in Dataweave We can reuse the existing External Jar Class in Dataweave without writing the java code in dataweave again. One of the external jar usage can be extending StringUtils method in Dataweave as currently Dataweave doesn’t support all the String functions as Java StringUtils does To do so we have…
Read MoreVariables In Dataweave There are different way of declaring and using the variables in dataweave. Global variables are initialized in the header of the DataWeave script and can be referenced by name from anywhere in the body of a DataWeave script. The header of a DataWeave script accepts a var directive that initializes a variable, for…
Read MoreRetrieve Unique Records In Dataweave 2.0 In this tutorial we will demonstrate how You can use distinctBy function to Retrieve Unique Records In Dataweave 2.0 from an array ,distinctBy can also be used to remove the duplicate key/value pair from object. Example 1: Input: Dataweave Expression: Output: Example 2: Input: Dataweave Expression: Output:
Read MoreLog Inside Dataweave Use log function to help with debugging DataWeave scripts. A Mule app outputs the results through the DefaultLoggingService, which you can see in the Studio console. Let’s see how we can log inside the dataweave. I have used the below dataweave expression to log the message from inside the Dataweave Transformation…
Read More