ID generation

Assume I have this below table:

Old_ID Link
1 sample_link_1
1 sample_link_2
2 sample_link_3
3 sample_link_4
3 sample_link_5

I want to assign an ID start from 1 group by Old_ID, for example:

Old_ID Link New_ID
1 sample_link_1 1
1 sample_link_2 2
2 sample_link_3 1
3 sample_link_4 1
3 sample_link_5 2

Notice the new_id restart for every Old_ID.

Is there any node that can archive this output?

Thank you for your input.

Hi @4nak1n , Welcome to the KNIME community.

The Rank node can do this for you. see below:

7 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.