The RowMultiplication allows to create multiple records out of one input record. It works like a RowTransformation - so it accepts an input and an output type - but instead of just modifying one records it can return an array of records (when you return an empty list, it will even remove the incoming row).
The RowMultiplication component is a variant of the RowTransformation. Like the RowTransformation, it accepts an input and an output type, and a transformation function (called MultiplicationFunc). The difference to the RowTransformation is that the RowMultiplication returns an array or list as return type. So from one input record you are able to create a transformation that returns one or more output records.
Let’s start with an example where input and output type are the same - we can use the simplified RowMultiplication<TInput> for this. In this example, we use one input record that contains a string (“ABC”) and split it into three output records for each character.
Note
If there is only one type defined for the RowDuplication, this type is used for input and output
The RowMultiplication can become very handy if you need to normalize document data. Consider the following json document, which contains 2 invoices. The first invoice contains 3 items, the second invoice 2 items.
If we want to extract the items and the header data for each invoice into separate entities, we can use the RowMulitplication to achieve this.