[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mondrian
Subject:    RE: [Mondrian] How to identify Dimensions of cube which are
From:       "Julian Hyde" <jhyde () pentaho ! com>
Date:       2011-01-03 18:04:57
Message-ID: 169F15C74C7E4E83866F65CC9B627C5E () mackerel
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@pentaho.org [mailto:mondrian-bounces@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


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18999"></HEAD>
<BODY>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans">You probably should be working with hierarchies, not 
dimensions, since these days you can place different hierarchies of the same 
dimension on axes.</FONT></SPAN></DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans">First form a set of all hierarchies in the cube. (Iterate 
over Cube.getDimensions() and Dimension.getHierarches().)</FONT></SPAN></DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans">Then iterate over 
CellSet.getCellSetMetadata().getAxesMetaData().getHierarchies() and remove them 
from the set of all hierarchies.</FONT></SPAN></DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207290118-03012011><FONT color=#000080 size=2 
face="Lucida Sans">Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> mondrian-bounces@pentaho.org 
  [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Venkatesh 
  U<BR><B>Sent:</B> Monday, January 03, 2011 8:39 AM<BR><B>To:</B> Mondrian 
  developer mailing list<BR><B>Subject:</B> [Mondrian] How to identify 
  Dimensions of cube which are notselected in any axes yet<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,
  <DIV>&nbsp;&nbsp;Could anyone suggest a good way to identify 
  the&nbsp;Dimensions of cube which are not selected in any axes yet.</DIV>
  <DIV><BR></DIV>
  <DIV>i.e SELECT dim1 on columns,</DIV>
  <DIV>&nbsp;&nbsp; &nbsp; dim2 on rows</DIV>
  <DIV>&nbsp;&nbsp; &nbsp; from [CUBE1]</DIV>
  <DIV>&nbsp;&nbsp; &nbsp; where dim3</DIV>
  <DIV><BR></DIV>
  <DIV>&nbsp;&nbsp; Assume the cube has 5 dimensions, namely</DIV>
  <DIV>&nbsp;&nbsp; dim1,</DIV>
  <DIV>&nbsp;&nbsp; dim2,</DIV>
  <DIV>&nbsp;&nbsp; dim3,</DIV>
  <DIV>&nbsp;&nbsp; dim4,</DIV>
  <DIV>&nbsp;&nbsp; dim5</DIV>
  <DIV><BR></DIV>
  <DIV>&nbsp;&nbsp;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.</DIV>
  <DIV><BR></DIV>
  <DIV><BR></DIV>
  <DIV>Thanks,</DIV>
  <DIV>Venkatesh</DIV></BLOCKQUOTE></BODY></HTML>


_______________________________________________
Mondrian mailing list
Mondrian@pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic