Best way to merge records with a common field into a list

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

Bea95
Posts: 6
Joined: Mon Mar 15, 2021 4:44 pm

Best way to merge records with a common field into a list

Postby Bea95 » Thu May 06, 2021 4:37 pm

Hi there,

I have some data that looks like this where there are duplicate values in field 1 and different values in field 2.


Field_1 Field_2
95791982 4558330929
95791982 6811305815
95791982 2077056935
75612428 7349717965
75612428 9718912488
75612428 7376005892

Would be very grateful if someone could advise on the best way to achieve something that looks like:

Field_1 Field_2
95791982 4558330929,6811305815,2077056935
75612428 7376005892,9718912488,7376005892


Thank you in advance!

szabol
Posts: 2
Joined: Mon May 10, 2021 10:38 am

Re: Best way to merge records with a common field into a list

Postby szabol » Mon May 10, 2021 11:37 am

Hello there!

There is a component in CloverDX made exactly for this called "Denormalizer".
Denormalizer creates a single output record from one or more input records.

I've attached a graph with my solution so you can have a look at it.
(You could go with setting group size instead of key if there's fixed number of records with same key, however using key is safer.)
Be sure to check documentation to find more about Denormalizer.

Best regards,
Ladislav.
Attachments
Project.zip
(2.29 KiB) Downloaded 22 times
---
Ladislav Szabo
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com