Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sbhadra
Contributor II
Contributor II

Merge two rows

I have some set of rows where I have one key (Emp Id in this scenario) and I want to merge values coming in two different rows. How to achieve this below scenario in Talend. Below is the example

 

Emp Id        Current Address                Old Address

1234              New York

1234                                                         California,San Francisco,New Jersey

 

Basically it should come in one row instead of two rows.

 

Emp Id         Current Address             Old Address

1234             New York                        California,San Francisco, New Jersey

 

 

Labels (2)
7 Replies
TRF
Champion II
Champion II

tAggregateRow is here for that:

0683p000009M3R9.png

 

Anonymous
Not applicable

I did it slightly different way.

0683p000009M3YY.png

 

0683p000009M3Yd.png

 

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable

But I doubt whether my solution will work for multiple ids as multiple records for different ids might get rolled up to single record.

 

So I prefer TRF's solution.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

sbhadra
Contributor II
Contributor II
Author

Hi Nikhil,

 

Yes, it is not working for multiple ids. The format which I am getting is like mentioned below

 

Emp Id     Current Address       Old Address

1234          California               

1234                                          Los Angeles, New York

2123         New York

3141         Washington            

3141                                           Boston, Minneapolis

 

There are multiple ids. If there is a duplication of Id I need to merge it to one single row.

 

And also suggest what is TRF solution and how the above can be achieved through TRF.

sbhadra
Contributor II
Contributor II
Author

Team,

 

Any suggestion on the above problem will be really appreciated.

manodwhb
Champion II
Champion II

@sbhadra ,check the below one as @TRF  suggested,it will work.

 

0683p000009M4eE.png0683p000009M3Cs.png0683p000009M4eS.png0683p000009M4JX.png

KamSH
Contributor II
Contributor II

The suggestion by TRF does not seem to be working for me.

Using the same data from OP as an example, the result given was this:

 

Emp Id     Current Address       Old Address

1234       New York           

 

The row containing California,San Francisco, New Jersey was removed insteaed