问题描述
我要在最近的13个月内对多维数据集进行分区,然后再对旧的分区进行分区以容纳较旧的月份.
I am partitioning my cube by the most recent 13 months, and then a legacy partition to hold older months.
我已经成功创建了动态分区,但是现在我需要为每个分区添加一个动态切片.
I have successfully created dynamic partitions, but now I need to add a dynamic slice to each partition.
我想我可以在分区切片表达式"中使用它:
I thought I could use this in the Partition Slice Expression:
[Dim Date].[Month].&[" + CStr(Month(Now())) + "].lag(8)
但是失败了.有人有什么想法吗?
but it's failing. Does anyone have any ideas?
推荐答案
我整日尝试,但最终解决了分区片表达式不喜欢不是维成员值的任何事情.
I tried all day, but ultimately resolved that partition slice expressions dont like anything that is not a dimension member value.
要明确一点,我的目标是使用上述14个分区来创建动态分区.最佳实践建议还应根据Mosha的文章,但是由于我的partitons是动态的,所以我的切片需要是动态的.
To be clear my goal was to create dynamic partitioning using the 14 described partitions above. Best Practice advises to also use slices on the partitions per Mosha's Article but since my partitons are dynamic, then my slices needed to be dynamic.
最后,我在日期维度"中添加了一个成员,该成员模仿了我要创建的14个分区的动态标签.接下来,我将新的日期维成员值引用到每个相应的分区切片,基本上将动态"切片移至多维数据集结构.
I finally added a member to my Date Dimension that mimics the dynamic labeling of the 14 partitions I wanted to create. Next I referenced the new date dimension member values to each of the corresponding partition slices, basically moving the "dynamic" slices to the cube structure.
它很好用,并给了我另一个有用的Dimension成员.我还使用分区方案将数据表中的事实表分区为相同的14个分区,文件组等.此外,由于所有内容都是动态的,因此我的SSIS包不那么复杂,并且不需要DDL任务即可移动分区.
It works great, and give me another usefull Dimension Member. I have also partitioned the fact table in the data warehouse with the same 14 partitions using a partitioning scheme, file groups, etc. As an added bonus, since everything is dynamic my SSIS package is much less complex and does not require DDL tasks to move partitions around.
这篇关于SSAS分区片表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!