Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
paresh1
Contributor III
Contributor III

Find unique rows

Hi All,

Below is the input

name mobile email seg date remark

AAAAA 1234567890 aa@gmail.com a 02-01-2020 a1

BBBBB 1234567890 aa@gmail.com a 03-01-2020 a2

CCCCC 1234567890 aa@gmail.com a 04-01-2020 a3

AAAAA 1234567890 aa@gmail.com a 05-01-2020 a4

DDDDD 1234567890 aa@gmail.com a 06-01-2020 a5

BBBBB 1234567890 aa@gmail.com a 07-01-2020 a6

EEEEEE 1234567890 aa@gmail.com a 08-01-2020 a7

I want unique rows based on "

name, mobile & email"

Required Output:

name mobile email seg date remark

CCCCC 1234567890 aa@gmail.com a 04-01-2020 a3

DDDDD 1234567890 aa@gmail.com a 06-01-2020 a5

EEEEEE 1234567890 aa@gmail.com a 08-01-2020 a7

Thanks in advance : )

Labels (3)
6 Replies
manodwhb
Champion II
Champion II

@Paresh Pawar​ ,check the below example. and you can use tUniquerow.

 

 

https://help.talend.com/r/mjoDghHoMPI0yuyZ83a13Q/CytSFvc9E9EvOIKU8pToFQ

 

Thanks,

Manohar

JSey
Creator
Creator

Concatenate the columns for name, email and phone, then use tuniquerow to filter for unique only.

paresh1
Contributor III
Contributor III
Author

Thanks @Manohar B​ 

I tried it but output is like

AAAAA 1234567890 aa@gmail.com a Thu Jan 02 00:00:00 IST 2020 a1

BBBBB 1234567890 aa@gmail.com a Fri Jan 03 00:00:00 IST 2020 a2

CCCCC 1234567890 aa@gmail.com a Sat Jan 04 00:00:00 IST 2020 a3

DDDDD 1234567890 aa@gmail.com a Mon Jan 06 00:00:00 IST 2020 a5

EEEEEE 1234567890 aa@gmail.com a Wed Jan 08 00:00:00 IST 2020 a7

 

whereas I should only get rows for below names as they are unique

CCCCC

DDDDD

EEEEEE

paresh1
Contributor III
Contributor III
Author

Thanks @Johnny Sey​ 

tunique is doing distinct but not finding only unique rows

manodwhb
Champion II
Champion II

@Paresh Pawar​ , you need to sort the data which you wan to get and then use tUniquerow.

 

as part of sort include date column descending order.

 

Thanks,

Manohar

Prakhar1
Creator III
Creator III

You can use the tAggregateRow and use the count function and group by using the 3 columns and then output only those rows whose count is equal 1​