how to add numbers to groops of records...
Posted: Wed May 24, 2017 6:25 pm
hello colleagues!
I need to add sequence number to each group of records, like unique word ids...
input:
630774221
630774221
963495850
963495850
963495850
345695561
678609548
678609548
678609548
918367402
279702180
output:
630774221 0001
630774221 0001
963495850 0002
963495850 0002
963495850 0002
345695561 0003
678609548 0004
678609548 0004
678609548 0004
918367402 0005
279702180 0006
and file contains billions of records, so how to do this with maximum performance?
can you help me please. Thanks in advance!
I need to add sequence number to each group of records, like unique word ids...
input:
630774221
630774221
963495850
963495850
963495850
345695561
678609548
678609548
678609548
918367402
279702180
output:
630774221 0001
630774221 0001
963495850 0002
963495850 0002
963495850 0002
345695561 0003
678609548 0004
678609548 0004
678609548 0004
918367402 0005
279702180 0006
and file contains billions of records, so how to do this with maximum performance?
can you help me please. Thanks in advance!