porting multidimensional SSAS to ICCube. Scope() equivalent? other gaps/issues?

好久不见. 提交于 2019-12-06 03:55:02

[disclaimer I'm working for icCube]

Scope is not part of icCube, not yet planned. It's a tricky feature that didn't naturally fit into icCube's architecture (see discussion below, later ... ). The strength of icCube is also the agility of it's R&D team, do not hesitate to contact them directly they will me more than happy to improve and add features.

In icCube there are some functionalities that are different from classical MDX server that might be useful, it's Categories, SubCubes and the eval function.

Categories. Allows for defining a new member that behaves like classical members. This new member can be defined as a set of members or as a subcube. For example here we can define a [Top10] category member as our 10 most important customers :

 CATEGORY MEMBER [Top10] as TopCount( [Customers], 10, ([Measures].[Sales],[2015]) )

 -> so later on ( [Top10], [Sales] ) will return the sales of this top10 customers

SubCubes, allows defining richer logical relations on members as a set of tuples. icCube implements SubCubeComplement, SubCubeIntersect,SubCubeOthers, SubCubeSymDifference, SubCubeUnion and SubCubeMinus. So calculating all without France (it's trivial here, but think on hierachies with many-to-many relations)

  SubCubeMinus([Geography].[Geo].[All], [Geography].[Geo].[France] )

The Eval function, allows for evaluating an expression on a subCube. Here is a trivial example doing the sum using the union :

 MEMBER [US+CH] AS Eval( SubCubeUnion( [Switzerland], [United States]) , [Amount])

Last but not least, for the dates function you can define Function in icCube that you can reuse in your MDX, no need to copy&paste everywhere :

 CREATE FUNCTION square( Value val ) AS val * val

and combine with CompactSet for a faster evaluation on dates periods (if there are no m2m relations on this dimension) or call some Java functions (you've to activate this module that is off by default).

--------------------- Scope ---------------------------

Warning : Comments might be obsolete as my understanding of scope is the one of a few years ago. Let's go :

Scope is a nice functionality but there are some drawbacks that you can check in Chris Webb's presentation ( link ), check from 47:30 for about 5 minutes.

The issues where/are :

Somehow a scope allows to define a new value for a subcube (remember a subcube might be a single indivisible cell as well as thousands of them)

1) Scopes allows for defining the value of a subcube but what do you do if you want a 'part' of this subcube ?

2) What happens if two scopes collide (intersection is not empty) ?

And all this mixed with security, many-to-many relations, subqueries and set where clauses.

We're not SSAS specialist and it's possible that with a better understanding we try again to implement a clean solution but for know we believe there are other ways solving the problems (for example using calc. members or writebacks).

hope it helps.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!