I have a key column as well.
Can you share two simplified tables with a bunch of rows each?
It would make it much easier for us to show you how to do that.
Also - do you need to do that once - or every time you get new data to add? The approach would be different.