SQL SERVER SSAS:如何在我的事实表中处理NULL日期值,以便我可以无误地处理我的时间维度?(SQL SERVER SSAS: How do I handle a NULL date value in my fact table, so I can process my time dimension without errors?)
我有一个事实表,它有一个从MS Access源加载日期的列。 事情是,有些值是NULL,SSAS不会让我引用我的DATE维度。
在SSIS阶段解决它更好还是SSAS有解决方案?
非常感谢您的帮助。
I have a fact table that has a column with dates loaded from an MS Access source. The thing is, some of the values are NULL and the SSAS won't let me refer my DATE dimension to it.
Is it better to solve it at the SSIS stage or is there some solution at the SSAS?
Thank you very much for you help.
最满意答案
最佳做法是在Fact表中不要有任何NULL键(即Dimension键)值。
相反,在Date维度表(或“UnknownValue”,例如-1)中创建一个MAX日期,并键入该日期。
Best practice is not to have any NULL key (i.e. Dimension key) values in a Fact table.
Instead, create a MAX date in the Date dimension table (or an 'UnknownValue', -1 for instance) and key to that.
更多推荐
发布评论