Page 1 of 1

Handling Null value

Posted: Tue Aug 31, 2004 2:19 am
by Rajendran
Hi,
We have a small issue in loading the fact table. We are getting null values in certain dimensions like vehicle and driver, but when Amruta checked the same with Shabber, he said, that is a valid record, and we need to take that row into account (need not through in to reject). Following are the two solutions we have in mind to proceed further:



If the required source column is null, transform the same as NA and populate the surrogate key OR
If the required source column is null, transform the same as NULL or 0 (we can have NULL or 0 as a value in dimension), and populate the fact with appropriate surrogate key.

Posted: Wed Sep 01, 2004 7:49 am
by Charley
I would always try to avoid NULL values. In my project we initially encountered pretty much difficulties with it and the way DS is handling it.

I would say: go for the surrogate values (your 1st option)

Charley

Posted: Wed Sep 01, 2004 8:11 am
by KeithM
I agree with Charley. I would try to avoid Null values in your tables and would convert any null value to the 'NA' when populating your fact table.

One other thing you may have to consider is if the column you are converting makes up part of your key in the fact table, you have the potential to create duplicate keys no matter what method you choose. That's one of the problems you have when your dimensions are not in sync with your source data and your forced to convert keys to 'unknown' values.