Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
pawe84
Creator
Creator

How to filter only the first data row if email address is the same?

Hi everyone,

 

I have an issue to filter a csv file.

 

Inside this file you'll find 4 columns and several hundreds of rows (see my small example).

Each contact is related to a customer ID (CustID).

0683p000009M5Ws.png

Now the problem is if there are two or more  contacts related to the same custID and thoese contacts have the same email address like:

Jim Doe and Jack Example

I only need one of them (it doesn't matter which one) but the output should be like in this picture below.

0683p000009M5RG.png

 

How to filter it. Is there a way in tmap?

 

Or do I have to modify the sql source? Thanks for any hints.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

    Please pass the data to a tUniqrow component where you can select email id as the key to get unique records.

 

    The details of component can be checked from below link.

 

https://help.talend.com/reader/9q55KsfASqX0qY4GVhEDNQ/1~mHnOdom1lPX7pBZZt56Q

 

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 🙂

View solution in original post

2 Replies
Anonymous
Not applicable

Hi,

 

    Please pass the data to a tUniqrow component where you can select email id as the key to get unique records.

 

    The details of component can be checked from below link.

 

https://help.talend.com/reader/9q55KsfASqX0qY4GVhEDNQ/1~mHnOdom1lPX7pBZZt56Q

 

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 🙂

nfz11
Creator III
Creator III

In your output there are two rows with John Doe and the same email, is that what you want?

 

I think tAggregateRow is better suited to your use case.  tAggregateRow would let you configure the rule on which row to choose if there is more than one for an email and to define functions on the other columns, e.g. choose the row with the greatest cust id and show the number of customers with that email in an additional column as well.