Hi everyone,I read everywhere that it's best to fix the fact tables' foreign keys that can't be found in the dimension tables in the data warehouse by setting it to -1 for instance and by creating an "undefined" record in the dimension table.That makes perfect sense and I like this idea, this way we can create foreign keys constraints, we can always use inner joins, it's cleaner and we can see right away that the link is missing.However, it means you have to find "undefined" values for all your columns for this particular dimension row. If it's a text column that's fine, but if it's a date or a bit, then you have to make arbitrary choices that could be problematic. For instance, ok, 1900-01-01 could be used for the undefined date, but for a bit you'll have to choose 0 or 1 which already has a specific meaning.In SSAS I like the UnkownMember because it's very clear, you can use it on any data type and you can change the label to whatever you want. So I think from an end user perspective, using this is way better than using your "undefined" values. But it seems that you can use this only if the key has not been found, which, again, is considered bad practice. So my question is, is there a way to use the UnknownMember for a particular key (-1 for example) even if it has been found, and then override that row's values?Thank you.
↧