Is it possible to merge rows in Tale of Data?
- Problem Description:
Is it possible to merge rows in Tale of Data?
Solution:
Example No. 1:
In the preparation node, choose the Multi-Algorithm Deduplication transformation
Choose the “Exact Match” option on columnA: Leave columnB unchecked
IMPORTANT: Then choose the option to Merge and delete duplicate rows:
As a result you end up with a single row:
Row No. 2 (“A1, B2”) was logically deleted since we only deduplicated on columnA
Example No. 2:
This time, the rows are strictly identical (“A1, B1”),
In the preparation node, we always choose the Multi-Algorithm Deduplication transformation
But this time, we choose the option Deduplicate using all fields (=Identical rows):
We always take the merge (i.e., Merge) rows option:
The result is the same:
If we applied the second method, namely: Deduplicate using all fields (=Identical rows)
…to the 1st dataset, we would still have 2 rows, because in this case, we merge 2 rows only if they are identical for all columns…so the result would be:
A1, B1
A1, B2
An alternative method:
The
concat
operator (=word concatenation) is available in the flow designer:
On aggregation nodes
On window function nodes
On the aggregation node it is configured like this:
And on the “Window Function” node it is configured like this: