Showing posts with label lookup. Show all posts
Showing posts with label lookup. Show all posts

Wednesday, March 7, 2012

NULL values in Cube Dimension

I have a fact table with a simple integer lookup key into a basic dimension table. However, some of the fact lookup key fields are NULL. I would like the Analaysis Services reports to show this NULL category. Instead, Analysis Services discards any NULL entries and the records are completely absent from the reports. What is the best way to achieve this?

Thank you!There should be no NULLs field in fact table. insert nulls or something in dimension table|||That makes sense; I can work around that. Thanks for the help!!

Originally posted by rafala
There should be no NULLs field in fact table. insert nulls or something in dimension table

Monday, February 20, 2012

NULL Entry in Lookup

Hi,

In my Integration Scenario I have a source field 'CompanyTypeCode' which is nullable in 'tblCompany' and There is a specific lookup Table 'tblCompanyType' to map the codes with descriptions for this field. When I want to transform this table, The NULL Entries fail in Lookup and I ran into problem. Please suggest a clean solution for bypassing the lookup when the entry in source is NULL. (If I bypass the lookup, the flow changes since there is not an extra column from the lookup component any more, therefore I must have another OLEDB Destination if the code is NULL).

Regards,
Sassan

Sassan,

You can still have the extra column if the lookup fails. What you do is in your error path from the lookup add a derived column for the description and put an "Unknown type" string in there. That way both the pipelines will have the same number of data columns.
You can then 'union all' the clean and error outputs from the lookup to a single destination.

I don't think you should bypass the lookup, but if you want to do it, how about using a conditional split before the lookup to re-route the NULL rows?

Hope that helps.