Comment by LewisC on Foreign Keys in a Data Mart

When you say gaps, do you mean instances where you might have late arriving dimensional data or dirty data that needs to be cleaned prior to loading? In those cases, I usually use “data not arrived yet” and “dirty record” FKs. I set up a surrogate key like -1, -2 whatever. When the data finally comes in and is cleaned, I update the fact to the correct key value.

I have also used an all encompassing -1 depending on requirements. That one is a “might be null, missing or data”.

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.