Re: [Olap4j-devel] calculated member in schema thats not a measure
Open Java API for OLAP
Brought to you by:
jhyde,
lucboudreau
From: Julian H. <jh...@pe...> - 2012-04-27 16:59:49
|
Regarding the bug. It is Cube.getMeasures() that is throwing. This member is not a measure, so Mondrian shouldn't be trying to return it from that method. Is this bug logged? If not please log it. Regarding your other question, which I guess is: How do we get metadata about calculated members? The usual way to query members is Cube.lookupMembers. However, I don't think it returns calculated members. So, try MDX: "select Filter(AddCalculatedMembers([Customers].Members), [Customers].CurrentMember.Properties('MEMBER_TYPE') is 'MDMEMBER_TYPE_FORMULA') from [Sales]". Or something like that. Julian On Apr 27, 2012, at 7:01 AM, Paul Stoellberger wrote: there is a bug that prevents the use of cubes that have a calculated member defined that doesn't live in the measures dimension. So those cubes will break with an exception and are completely unusable java.lang.ClassCastException: mondrian.olap4j.MondrianOlap4jMember cannot be cast to org.olap4j.metadata.Measure at mondrian.olap4j.MondrianOlap4jCube.getMeasures(MondrianOlap4jCube.java:130) for e.g. <CalculatedMember name="Semester 1 2004" formula="Aggregate([Time].[2004].[QTR1]:[Time].[2004].[QTR2])" dimension="Time" hierarchy="" visible="true"/> such calculated members can be a huge help, so I think we should fix that. The question is, how. I could live with cube.getCalculatedMembers() that would return a list of single members (basically returning all members that cannot be cast) Another option would be to pin them to MondrianOlap4jDimension.getCalculatedMembers() Since they don't have a level or hierarchy those are the only places I could think of where they can live. Any thoughts? I'm also not sure if something similar is possible in SSAS and if it would expose it in a way that we can handle as well. -Paul ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ olap4j-devel mailing list ola...@li...<mailto:ola...@li...> https://lists.sourceforge.net/lists/listinfo/olap4j-devel |