[Mondrian] Same dimension in different axis

Julian Hyde jhyde at pentaho.com
Fri Jul 17 01:39:26 EDT 2009



> The cdf team (cdf == community dashboard framework, a project 
> that allows
> an easy way to build dashboards in pentaho) is working on a 
> cdf editor that
> will be very closely connected to mondrian, and the engine 
> will generate
> selector, charts, tables, etc, while the user only has to 
> drag and drop
> dimensions / levels in a GUI. 

I know all about CDF... Your good works precede you...

> When will this be available? I don't mind working with a 
> build from source
> or even try to implement this myself.  Am I being too naive 
> to think that
> all I need is to go to the block that checks if a member is 
> used in more
> than one dimension and comment that out? :)

I'm giving it a shot to do a basic implementation. Basic is, as you say,
removing those nasty error messages. It used to be an error if you use two
members in the same dimension on different axes (or otherwise combine them,
in a crossjoin etc.); now it will be an error if you use two members from
the same hierarchy.

Next, mondrian will need a slot in its context for each hierarchy, not for
each dimension. Otherwise if you specify the context as the tuple
([Time].[Yearly].[1997].[Q1], [Time].[Weeky].[1997].[10], [Gender].[F]) the
second assignment will overwrite the first. Sounds esoteric, but you run a
query and all of the cells tend to come out with the same value.

It may be good enough for your purposes, though, if you just want to allow
people to create as many hierarchies as they like and freely use them
anywhere.

Be sure to set mondrian.olap.SsasCompatibleNaming=true. Then you can say
[Time].[Weekly] for a shared dimension, rather than [Time.Weekly]. That
property is currently false by default. That will change in 4.0.

For this stuff to work as you expect, we need to get attribute relationships
working. Here's a paper from one of the Analysis Services team describing
how they work:
http://www.sqlserveranalysisservices.com/OLAPPapers/AttributeRelationships.h
tm . Yes, we will need to implement all of that functionality. This stuff is
not trivial. :)

(If you want to find out more about this stuff, also try googling 'mdx
strong hierarchies'.)

I may be able to get 1+2 working and checked into perforce fairly quickly.
Attribute relationships will definitely not happen until 4.0; it's not
practical to even define those relationships until I've completed the schema
changes (to make Mondrian's schema behave more like Microsoft UDM).

> ps: I remember a while back Julian twitting about the 
> possibility to use
> sets in the where clause. How is the syntax? I tried it 
> recently and still
> got an error. This would be great to avoid an extra member 
> definition with
> just an aggregate();

You can literally put any set expression in the slicer. There are a few
examples in
http://p4web.eigenbase.org/open/mondrian/testsrc/main/mondrian/test/Compound
SlicerTest.java . This was added in change 12732 - so it did not get into
mondrian-3.1.1.12687. You'll have to build from perforce (or the svn
mirror).

Julian





More information about the Mondrian mailing list