I have a Data Warehouse which uses internal surrogate keys and type 2 slowly changing dimensions. In the clearing we just have the business keys from the erp-system, like this:
In the Data Warehouse we want to use the surrogate keys instead (Note: Article price changed from 500$ to 1000$ and articles is using surrogate keys where possible, here only for manufacturer).
If we were just using the business keys it's no problem, just compare, update old entries, insert new entries. But what's the best way to do this with surrogate keys?
Get existing Ids (0 or -1 for not existing yet) from the Data Warehouse in the clearing and then compare the entries?
Keep the business keys in the Data Warehouse aswell, compare them and update Ids then in the Data Warehouse?