[Mondrian] Hierarchy must have a foreign key error
mcampbell at pentaho.com
Fri May 16 08:39:39 EDT 2014
The rule is that a hierarchy must either specify a foreign key, or use the same table as the fact table (i.e. it must be degenerate). Is your schema violating that rule?
It is curous that you're seeing that error with newer versions of Mondrian but not pre-3.6.6, the logic around that check hasn't changed in quite awhile. Can you post a snippet of your schema?
From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Hilario Fernandes
Sent: Friday, May 16, 2014 7:57 AM
To: Mondrian mailing list
Subject: [Mondrian] Hierarchy must have a foreign key error
Since mondrian 3.6.6 build and above i'm getting a strange error in my project:
mondrian.olap.MondrianException: Mondrian Error:Hierarchy 'hier_name' in cube 'cube_name' must have a foreign key, since it is not based on the cube's fact table.
It seems like it's related to degenerate dimensions and the usage of alias in the fact table. In version 3.6.5 and bellow this error only occurred when the alias was specified, but now there seem to have been some changes on the class RolapSchema that enforces the usage of the alias.
In my project i'm adding and removing cubes from the schema, and this seems to mask the problem, since it only occurs after some time so i'm unable to blame any specific query or cube.
Anyone has ideas on this, or is getting the same error?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mondrian