Wednesday, March 7, 2012

Materializing a reference dimension in SSAS

Hi,

I think there is an issue with the Materialize option when we have a referenced dimension in SSAS. For example if there is a dimension B which is linked to a measure group F through dimension A and materialize option is checked (which is default and in best practices to be followed) I have an issue. If there are any dimension keys of dimension A in measure group F that are not in dimension A then it doesn’t give an error saying dimension key not found when processing. The processing query ignores the rows that do not have a corresponding dimension key and the processing succeeds. Only when the materialize option is unchecked I get the error.

It seems that there is a problem since there is a regular relationship between dimension A and measure group F and if there are dim key errors then it should fail and not ignore those rows and process.

Can you please confirm if this is a bug in SSAS and if we should always avoid using this option (Materialize option checked) when use referenced dimensions?

I am using SQL 2005 SP2a.

Thanks

Arun

This is not a bug. When you click materialize, the fact table associated with the measure group is joined to the intermediate dimension using an inner join. If you have a missing reference, the effect of the inner join is that fact records are dropped.

What we always recommend to folks is that they do NOT use the Unknown Member and associated error handling features in their cubes. Instead, we recommend they resolve all references in the data warehouse. For example, if you have a fact table that represents an order that has not shipped, the order fact record has a NULL ship date reference. In the Date dimension table, you would have an entry for the NULL date and your fact record would reference that Date record's surrogate key (which we usually set to -1).

B.

No comments:

Post a Comment