How to create the link when linking keys are non-business keys

Hi,

I have HUB defined on the business key like: Area_ID. However, I need to link this HUB with another HUB on a non-business key e.g. STREET_NUMBER. How do we build the link in this scenario? Because while making the links between 2 hubs I have to take the HASH Keys from both the hubs but I can’t take the Hash generated based on Area_ID. So how to create the links when you’re not joining two hubs based on business keys?

I’m having a hard time trying to understand what you mean with non-business key in this example. Can you share your data model? What other hub are we talking about, what do you think needs to go in the link?

I would urge you to re-think your design if you are using a HUB on a non-business key" as that is not what HUBs are for. Doing so will very likely cause issues for you, as something called “street_number” seems unlikely to uniquely identify anything. Perhaps posting more info will make the problem clear. In general, the Link hash key is constructed from all the HUBs and any dependent children attributes necessary for the unique relationship forming the Link.

Have a look at the standards and HUBs should contain BK that uniquely identifies some business element. Hope that helps.

2 Likes

I’ve been solving this for the ingestion of D365 data where every table is keyed with a GUID and every FK is a GUID.

  • I maintain the mapping of GUID to BK in the staging db of all tables sourced from D365.
    • Watchout for changing BK! - yes this happens with this source and D365 doesn’t require an immutable BK (that’s another story!)
  • when loading a LINK, I dereference the FK GUID into the foreign BK
  • I assemble the BK of the LINK and hash that as the HKEY of the link
  • I’ve just recently added the BK attributes (redundantly) to the lINK

This seems to be working (still don’t have a hardcore tester to prove me wrong)