[Mondrian] DimensionUsage and captions

Julian Hyde jhyde at pentaho.com
Thu Feb 14 01:31:24 EST 2013


Short answer: Upgrade to 4. DimensionUsage is obsolete.

Julian


On Feb 13, 2013, at 4:50 PM, Paul Stoellberger <p.stoellberger at gmail.com<mailto:p.stoellberger at gmail.com>> wrote:

Ok I guess I was a bit too quick.

Using the caption attribute will actually cause some more errors:

01:29:55,794 ERROR [RolapCube] RolapCube.lookupChild: In cube "Sales" use of unaliased Dimension name "[Store]" rather than the alias name "StoreUsage"
mondrian.olap.MondrianException: Mondrian Error:RolapCube.lookupChild: In cube "Sales" use of unaliased Dimension name "[Store]" rather than the alias name "StoreUsage"
at mondrian.rolap.RolapCube.lookupChild(RolapCube.java:2657)


There are a few JIRAs about it:

http://jira.pentaho.com/browse/MONDRIAN-399 - suggests it works and then there are new rules in place (cant find such rules in the code)
http://jira.pentaho.com/browse/MONDRIAN-646 - actually filed by me 3.5 years ago

Whats your take on this?
I think the used dimension caption should just use the name attribute and therefore have the same method as a normal dimension.
Julian, you suggested a few different ways how this should be handled in those JIRAs.. if you can point me in the right direction I'm happy to send a pull request

-Paul


On Feb 14, 2013, at 1:27 AM, Paul Stoellberger wrote:

Hi,

I was just trying to fix an issue a number of people were complaining about in mondrian.
When using DimensionUsage it doesn't apply the expected caption, which would be the name of the DimensionUsage in this case.

I didn't know you could set the caption attribute in DimensionUsage as well

 <DimensionUsage name="StoreUsage" caption="StoreUsage" source="Store" foreignKey="store_id"/>

This works just fine.

However, like most people I would expect the caption of a DimensionUsage to be the name of the Usage and not the underlying Dimension.
This is due to the constructor of RolapCubeDimension (the description part seems a bit odd.. checking cubeDim.caption != null instead of description)

Do you agree that the DimensionUsage caption should be the name in case it is not set explicitly?


-Paul


_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
http://lists.pentaho.org/mailman/listinfo/mondrian

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


More information about the Mondrian mailing list