Hello All,
We have many entities where we have more than 1 business keys (composite key) .
Is it better to have them concatenated together as a single business key or keep them as different columns ? What is the impact of on hub & links on this ?
Hi CuriousMind,
Are you planning on hashing your business key to create a unique hash key (SHA256)? If so, you don’t need to concatenate them.
Thanks,
Carl
Yes HASH keys will be used as per DV standards .
Standard says you can do Natural Key DV, on Snowflake (at least) they can outperform joining on surrogate hash keys.
Concatenating bk is a bad idea, it means all code using that hub will need to de-contatenate them. In fact, you can also keep composite keys in the sats; there is nothing in the standard that says you cannot do this.
Hi Patrick,
What would be the benefit of hashing the business keys if Natural Keys outperform surrogate keys?
Thanks,
Carl
Hey Carl,
I go into a lot of detail here: https://www.youtube.com/watch?v=8xTAOGK5t-g
Hash Keys: nice for simplified joins, single columns, always binary data type.
Natural Keys: if permitted through compression, will outperform hash key joins.
BUT, you will still have hashing wrt to the record digest, i.e. HashDiff
If you try to do a by-attribute comparison for satellite table loads, the larger the satellite (width and depth) the slower this option will be.