We've got a reusable SAS-script that runs 1 time per source table. It distributes each table to a corresponding target table. Some source tables have 1 primary key, others have 2-3. But we want to set 1 key per table (primarily because the reusable script can be simplified when the keys don't differ from table to table).
I've used the primary keys from the source tables to create 1 unique hex value per row. Example value: "C0EA54AAB21573E07D46E9BB9E9B1C73".
Ideally we wanted to change the hex into a numeric field (faster joins). But as Tom said: "The MD5() function returns 128 bits. So at 8 bits per byte that is 16 bytes. That is waaaaaay too many to convert into a single number. So leave it as character and use the $HEX32 format to display it."
Proper naming standard is important to us, and I'm stumped on what to call the field. Considered calling it a Retained Key (w/RK-suffix) because it's set based on primary keys from the source tables. But RKs are only supposed to be integers I think. And it seems wrong to call it a Primary Key (w/PK-suffix), because each target table has a composite key that will consist of this hex-variable and a date variable -- so the hex isn't unique by itself.
I'm thankful for any naming advice. 🙂