[Mondrian] How to identify Dimensions of cube which are notselected in any axes yet

Julian Hyde jhyde at pentaho.com
Mon Jan 3 13:04:57 EST 2011


You probably should be working with hierarchies, not dimensions, since these
days you can place different hierarchies of the same dimension on axes.
 
First form a set of all hierarchies in the cube. (Iterate over
Cube.getDimensions() and Dimension.getHierarches().)
 
Then iterate over
CellSet.getCellSetMetadata().getAxesMetaData().getHierarchies() and remove
them from the set of all hierarchies.
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Venkatesh U
Sent: Monday, January 03, 2011 8:39 AM
To: Mondrian developer mailing list
Subject: [Mondrian] How to identify Dimensions of cube which are notselected
in any axes yet


Hi, 
  Could anyone suggest a good way to identify the Dimensions of cube which
are not selected in any axes yet.

i.e SELECT dim1 on columns,
     dim2 on rows
     from [CUBE1]
     where dim3

   Assume the cube has 5 dimensions, namely
   dim1,
   dim2,
   dim3,
   dim4,
   dim5

  After parsing the query, I would like to get the list of dimensions which
are not used in the query yet. So that I can get a list of dimensions which
can be presented in GUI and the selected value of those dimensions can be
added to the query. Thanks in Advance.


Thanks,
Venkatesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110103/f30e2d31/attachment.html 


More information about the Mondrian mailing list