<!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.7600.16466"></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial>>> a method "Hierarchy
Level.getAttributeHierarchy()". Would that be sufficient to allow analyzer to
decompose hierarchies?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial>I think this interface would need to return
a list of Hierarchies since a single attribute can participate in many
hierarchies. Suppose we get back a list of hierarchies, how would we know
which level in the hierarchy does the current attribute level correspond
with? From a metadata perspective, a member needs to be able to identify
its dimension (Product), attribute (SKU), hierarchy (SKU attribute vs Product
Hierarchy) and hierarchy level. In Mondrian 3.3, a member really only
knows its hierarchy and hierarchy level. There's no link to tell us that
levels in different hierarchies are the same attribute. In Mondrian 4, the
client would need to know this information.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial>From a client perspective, if the user
changes from an attribute hierarchy into another multi-level hierarchy, many
things will need to happen. First, the <SPAN
class=569085714-03082011>hierarchy </SPAN>level MDX would change from for
example, [Product-SKU].[SKU] to [Product-Hierarchy].[SKU]. Second, the MDX
members now have to become fully qualified in the new hierarchy. For
example, [Product-SKU].[SKU-XYZ] to [Product-Hie<SPAN
class=569085714-03082011>r</SPAN>archy].[ManufactureX].[DeptY].[FamilyZ].[SKU-XYZ].
At any point in time, the user is not allowed to put levels from the same
hierarchy on different axis but they may put attributes of the same level but
different hierarchies on different axis. </FONT></DIV>
<DIV dir=ltr align=left><SPAN class=569085714-03082011><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT size=2 face=Tahoma><B>From:</B> Julian Hyde
[mailto:jhyde@pentaho.com] <BR><B>Sent:</B> Wednesday, August 03, 2011 2:32
PM<BR><B>To:</B> Benny Chow; 'Mondrian developer mailing
list'<BR><B>Subject:</B> PAGES axis, and attribute
hierarchies<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011>Benny,</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011>I have opened this up the mondrian-dev list, as I think
it gets to the core of the "attribute-oriented analysis" issue. Hope you don't
mind.</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011>See reponses inline.</SPAN></FONT></DIV><FONT
color=#000080 size=2 face="Lucida Sans"></FONT><FONT color=#000080 size=2
face="Lucida Sans"></FONT><FONT color=#000080 size=2
face="Lucida Sans"></FONT><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><SPAN
class=556224814-27072011><FONT face=Arial><SPAN class=754270706-03082011><FONT
color=#000080 size=2 face="Lucida Sans"> [If analyzer supported a 3rd
'PAGES' axis, users would] </FONT></SPAN>want to split levels from the
same hierarchy across axis. For example, in the Product Hierarchy, I want
Product Family on the Page axis and Product Dept on the Rows axis. I
don't think we can do this with Mondrian 3.3.</FONT><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011> </SPAN></FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>It's not just the PAGES axis.
If you have 3 years' data to display, sometimes it's nice to put years on
columns and months on rows. It's more compact, and data for the same month in
different years appears side-by-side.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>You can do a lot of this stuff
manually in mondrian 3.3. You can create a {Product] dimension with a [Product]
hierarchy consisting of levels [Manufacturer], [Dept], [Family], [SKU], and
single-level "attribute hierarchies" [Manufacturer], [Dept]
etc.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>There is currently no mapping
between the Dept level of the product hierarchy and the Dept attribute
hierarchy. But let's suppose there was: a method "Hierarchy
Level.getAttributeHierarchy()". Would that be sufficient to allow analyzer to
decompose hierarchies?</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>Note that the schema designer
would have had to create those attribute hierarchies, and mondrian would have to
deduce the mapping somehow.</SPAN></FONT></SPAN></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV><SPAN class=556224814-27072011><FONT face=Arial>Will this be possible
with Mondrian 4.0?<SPAN class=754270706-03082011><FONT color=#000080 size=2
face="Lucida Sans"> </FONT></SPAN></FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>Yes, Mondrian 4.0 will allow
you to define 'attributes' in your schema. It will be easy to create a hierarchy
for an attribute. In fact, it will have its own hierarchy unless you set
"hasHierarchy=false" in the attribute definition.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>And, when you define a
hierarchy, you will just say "I want level X based on attribute A, level Y based
on attribute B". You've already done the work defining keys, sort keys,
properties when you define attributes.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>I don't know yet how to expose
the mapping. But I note that XMLA's MDSCHEMA_LEVELS rowset has a <SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="TEXT-ALIGN: left; LINE-HEIGHT: 19px; BORDER-COLLAPSE: collapse; FONT-FAMILY: 'Segoe UI', Verdana, Arial; FONT-SIZE: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px"
class=Apple-style-span>LEVEL_ATTRIBUTE_HIERARCHY_NAME</SPAN></SPAN> column. That
maps nicely to the getAttributeHierarchy method
above.</SPAN></FONT></SPAN></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV><SPAN class=556224814-27072011><FONT face=Arial>The SQL generation will
also need to be smart enough to know that both these levels come from the same
dimension so there should be only one join to the underlying dimension
table.</FONT><FONT color=#000080 size=2 face="Lucida Sans"><SPAN
class=754270706-03082011> </SPAN></FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN class=754270706-03082011>It should already be smart
enough. (Even if you define the single-level hierarchies manually.) Please log a
bug if it isn't.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=556224814-27072011><FONT color=#000080 size=2
face="Lucida Sans"><SPAN
class=754270706-03082011>Julian</SPAN></FONT></SPAN></DIV></BODY></HTML>