cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain Unique records based on a column value not based on entire row values

Sowmya_Rayavara
New Contributor III

Hi,

I have a requirement where I need to obtain unique records based on a column.Unique snap doesn’t work here,as it looks on each unique record instead of a column

for ex: My data looks like this

e_no email country firstname last name
1 abc@gmail.com India A B
2 abc@gmail.com USA A B
3 abc@gmail.com UK A B
4 a@gmail.com India c D
5 b@gmail.com US C D

My output should look like, After removing duplicate email address

e_no email country firstname last name
1 abc@gmail.com India A B
4 a@gmail.com India c D
5 b@gmail.com US C D

2 REPLIES 2

Ajay_Chawda
Contributor

Hi Sowmya
you can use group by snap get unique records based on email id and then consider first element of group object.
readCsv_2019_01_17 (1).slp (10.0 KB)

pipeline result

With same example if we need data like below then how do we achieve that and I need just 2 columns
abc@gmail.com india,usa,uk
a@gmail.com India