duplicate key and creating a field to differentiate the records

I am processing a file and I wish to create a new field “month” to differentiate duplicate records in a file.
For example

field1 field2 amount month
1234 rtrt $12 jun
1234 rtrt $12 jul
1234 rtrt $12 aug

4545 xyxy $12 jun
4545 xyxy $12 jul

I want the first instance of duplicate records to assign “jun” to the month; the second instance “jul”; the third instance “aug”. This is for a quarterly billing file.

Any hints on how to do this efficiently? or what nodes to use?

Thank you in advance.


Using cross joiner on table 1: with field 1 field 2 and amount and table 2 with name of the months.
The speed might depend on the number of records in table 1.
Does this help?

Hello @harveylim,

do duplicate records go one after another and do you always have 3 duplicate records? Data sample would help here to find efficient solution :wink:


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