It is always desirable to reuse as much code as possible. We can do the same regarding DataWeave transformations and custom functions. In this article, I will describe how to reuse code in the newest DataWeave using modules. For those working with DataWeave 1.0, I will describe how to reuse code with readUrl function. DataWeave…
Huge number in exponential notation in DataWeave. How to convert it?
In the last article, I have described a nuisance with casting to an integer value. This time we will look at huge numbers and their formatting. In addition, I will mention scientific notation. All these topics are around the number format used by the DataWeave engine. So let’s see what the problem looks like. Problem…
How to convert decimal number into integer using DataWeave
This article is about converting decimal numbers into integer ones. This may seem tricky at first. You may say that we do not need to do anything special and the DataWeave engine will handle it underneath. However, there is a nuance that you should be aware of. In transformation to XML, this may not actually…
How to avoid repetition in DataWeave for conditional checks?
Tip number 1 will be about data existence check. There is often a situation that nearly the same conditions need to be checked in every line. I have seen many transformations that were really long and complex. Reading them was not only difficult but a lot of repeatable conditional checks were made. Here I will…