Handling Null value

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Rajendran
Participant
Posts: 16
Joined: Wed Jul 28, 2004 7:56 am
Location: Dubai

Handling Null value

Post 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.
Charley
Participant
Posts: 7
Joined: Thu Jul 17, 2003 8:52 am
Location: Netherlands

Post 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
Charley
KeithM
Participant
Posts: 61
Joined: Thu Apr 22, 2004 11:34 am
Contact:

Post 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.
Keith
Post Reply