Showing posts with label partition. Show all posts
Showing posts with label partition. Show all posts

Saturday, February 25, 2012

Cube Partitions

I deleted default partition that is created while cube processing. and after that I have created 2 new partitions for different date ranges. even after processing i am unable to see any data in the cube. I am following right process of using partitions? Please let me know how i can get data?

Thanks in adv

Everything you've done sounds fine - so it should work. Can you check how you specified the data ranges for the partitions ? During processing, how many rows do you see being read into the partitions ? How did you check that the cube is empty ? Perhaps you were looking at different slice ?|||

If you are doing partitions with a query you can paste the TSQL into Managament Studios query window and see what the query returns.

HTH

Thomas Ivarsson

|||

So, deleting default partition doesnt hamper it right..let me check with query and get back to you.

thanks for the replies.

Cube Partition

How do you slice a Cube Partition, if you want it to slice by "less than" instead of "equal to"? Analysis Services does not give you a choice.
Example: Time.FiscalYear AllTime.FY2005

Unfortunately, it looks like it can't be done without explicitly naming all the members included in the "less than" slice. For instance, if you wanted "less than" 2003, generally in MDX you'd just say {null:[Date].[Calendar Year].&[2003]}. But, for reasons I'll explain below, it doesn't appear that SSAS allows such an expression as the slice for a partition. Instead, you have to manually list all the members: {[Date].[Calendar Year].&[2001],[Date].[Calendar Year].&[2002],[Date].[Calendar Year].&[2003]}

If I understand this correctly, the "slice" for a partition has to be a string which resolves to a set. The way SSAS resolves it to a set is by running it through StrToSet("your slice",CONSTRAINED). The CONSTRAINED parameter tells it to only accept a simple set of explicitly named members. So StrToSet("{null:[Date].[Calendar Year].&[2003]}",CONSTRAINED) blows up during processing with the following error: "Errors in the OLAP storage engine: The restrictions imposed on partition slice where violated."

Though that's not a very good error message, I think that's what's happening because the following MDX query blows up:

select StrToSet("{null:[Date].[Calendar Year].&[2003]}",CONSTRAINED) on 0
from [Adventure Works]

One problem is that when you do a syntax check in Visual Studio when you're constructing the partition slice, it says it checks out fine... I've reported this as a bug:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=155391

Just as reference on where I got my info...

Info on what the Slice property of a partition allows (i.e. only something that works with StrToSet and CONSTRAINED):
http://msdn2.microsoft.com/en-us/library/microsoft.analysisservices.partition.slice(d=ide).aspx

Info on how the CONSTRAINED parameter works:
http://cwebbbi.spaces.msn.com/blog/cns!7B84B0F2C239489A!488.entry

Cube Partition

How do you slice a Cube Partition, if you want it to slice by "less than" instead of "equal to"? Analysis Services does not give you a choice.
Example: Time.FiscalYear AllTime.FY2005

Unfortunately, it looks like it can't be done without explicitly naming all the members included in the "less than" slice. For instance, if you wanted "less than" 2003, generally in MDX you'd just say {null:[Date].[Calendar Year].&[2003]}. But, for reasons I'll explain below, it doesn't appear that SSAS allows such an expression as the slice for a partition. Instead, you have to manually list all the members: {[Date].[Calendar Year].&[2001],[Date].[Calendar Year].&[2002],[Date].[Calendar Year].&[2003]}

If I understand this correctly, the "slice" for a partition has to be a string which resolves to a set. The way SSAS resolves it to a set is by running it through StrToSet("your slice",CONSTRAINED). The CONSTRAINED parameter tells it to only accept a simple set of explicitly named members. So StrToSet("{null:[Date].[Calendar Year].&[2003]}",CONSTRAINED) blows up during processing with the following error: "Errors in the OLAP storage engine: The restrictions imposed on partition slice where violated."

Though that's not a very good error message, I think that's what's happening because the following MDX query blows up:

select StrToSet("{null:[Date].[Calendar Year].&[2003]}",CONSTRAINED) on 0
from [Adventure Works]

One problem is that when you do a syntax check in Visual Studio when you're constructing the partition slice, it says it checks out fine... I've reported this as a bug:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=155391

Just as reference on where I got my info...

Info on what the Slice property of a partition allows (i.e. only something that works with StrToSet and CONSTRAINED):
http://msdn2.microsoft.com/en-us/library/microsoft.analysisservices.partition.slice(d=ide).aspx

Info on how the CONSTRAINED parameter works:
http://cwebbbi.spaces.msn.com/blog/cns!7B84B0F2C239489A!488.entry