I have a fairly large set of records (~200,000) that I need to dedupe, but there is a catch. Most of these records are related to another record type, and this relationship needs to be moved to the unique record left after the dedupe process is complete.
To keep things simple, I have 2 columns, 'RecID' and 'Name' and will be adding a 3rd to the results called 'ReplaceWith'. The data looks something like the following:
| RecID | Name |
|---|---|
| 111111 | example1 |
| 222222 | example1 |
| 333333 | example2 |
| 444444 | example2 |
| 555555 | example2 |
When the 'Name' column is duplicated I want to populate the 'ReplaceWith' column with the 'RecID' value of the first item What I am looking to accomplish will look something like the following:
| RecID | Name | ReplaceWith |
|---|---|---|
| 111111 | example1 | |
| 222222 | example1 | 111111 |
| 333333 | example2 | |
| 444444 | example2 | 333333 |
| 555555 | example2 | 333333 |
I am pretty novice at programming so this may be really simple. But I simply cannot figure out how to make this happen programmatically. On smaller data sets, I would simply use excel to manually sort, filter, and update the records. But that method just won't scale to this level.
I would appreciate any recommendations on how to do this.