How to assign same number to duplicate values in a column

Four Stars

How to assign same number to duplicate values in a column

Hi, consider the data given below

Bill

Bill

Bill

Clive

Mary

Mary

John

Lily

Lily

Lily

How do i assign same number to the duplicates so that the output looks like this;

1 Bill

1 Bill

1 Bill

2 Clive

3 Mary

3 Mary

4 John

5 Lily

5 Lily

5 Lily

 


Accepted Solutions
Forteen Stars

Re: How to assign same number to duplicate values in a column

@ahmed_analytics ;check the below one.

Untitled.pngUntitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post


All Replies
Sixteen Stars TRF
Sixteen Stars

Re: How to assign same number to duplicate values in a column

Have a look to tAggregateRow

TRF
Highlighted
Forteen Stars

Re: How to assign same number to duplicate values in a column

@ahmed_analytics ,check the below solution.

 

Untitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Tags (1)
Four Stars

Re: How to assign same number to duplicate values in a column

can you please elaborate on how to use taggregate row

Four Stars

Re: How to assign same number to duplicate values in a column

What if the duplicates are not in order ?

example:

Bill

Clive

Bill

Mary

Bill

Clive

Mary

then it still should be

1 Bill

2 Clive

1 Bill

3 Mary

1 Bill

2 Clive

3 Mary

Forteen Stars

Re: How to assign same number to duplicate values in a column

@ahmed_analytics ;check the below one.

Untitled.pngUntitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post

Sixteen Stars TRF
Sixteen Stars

Re: How to assign same number to duplicate values in a column

@ahmed_analytics, forget tAggregateRow in this case


TRF
Four Stars

Re: How to assign same number to duplicate values in a column

Thanks @manodwhb , sorting the rows first did the trick. 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog