[Mondrian] parent child hierarchies

damien hostin damien.hostin at axege.com
Wed Apr 3 03:35:12 EDT 2013


That's the same problem I was trying to explain in this case 
http://jira.pentaho.com/browse/MONDRIAN-1328 some weeks ago, "an 
ordering problem that come from an unexpected (actually untested) 
hierarchy declaration". I remember that the code seem to load the 
parent-child hierarchy recursively but actually only one SQL request is 
executed with ORDER BY on primary key. I do not remember the class name, 
but something near SqlTupleReader. So if this ORDER BY doesn't return 
the query with parent records before children records, there's a lot of 
warnings.

(By the way, the level is wrong on members of parent-child hierarchy 
even if they are loaded correctly, which doesn't allow to build 
semi-aggregate calculated measure on such hierarchies, but that's 
another history)

I hope it helps.

Damien Hostin

Le 02/04/2013 20:31, Paul Stoellberger a écrit :
> Well I cant really explain it either, but suddenly all the warnings 
> that parent values are missing disappeared
>
> Here the JIRA: http://jira.pentaho.com/browse/MONDRIAN-1511
>
> I was debugging SqlTupleReader above line 177, and just noticed that 
> in the first case the cache was almost empty when the first WARNING 
> occured, while the second time it was almost full (only 1 warning 
> showed up, which i considered as ok)
> So the order did matter somehow.
>
>
>
> -Paul
>
> On Apr 2, 2013, at 8:19 PM, Julian Hyde <jhyde at pentaho.com 
> <mailto:jhyde at pentaho.com>> wrote:
>
>> Sounds like good general advice. Thanks for letting us know.
>>
>> Please log a case. I don't see any reason why, say, VARCHAR columns 
>> couldn't be used as key columns for parent-child hierarchies and 
>> their closure tables, but I can believe there is a bug.
>>
>> Julian
>>
>>
>> On Apr 2, 2013, at 9:10 AM, Paul Stoellberger 
>> <p.stoellberger at gmail.com <mailto:p.stoellberger at gmail.com>> wrote:
>>
>>> Because I just lost almost half a day on this:
>>>
>>> Can we add a note in the documentation that when using parent child 
>>> hierarchies and closure tables, it is mandatory to use numeric keys 
>>> - otherwise the whole thing will just blow up in your face
>>>
>>> I ended up getting arbitrary hierarchies because the order by clause 
>>> etc. was actually necessary to compute a correct parent child 
>>> hierarchy.
>>> And ordering on string values seem to produce a different result 
>>> than ordering numeric values.
>>> I only changed that and suddenly my PC hierarchies work correctly.
>>>
>>> And if thats still an issue in mondrian 4 - please add it to the 
>>> book :-)
>>>
>>> Thanks
>>>
>>> Paul
>>>
>>> _______________________________________________
>>> Mondrian mailing list
>>> Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>
>
> _______________________________________________
> Mondrian mailing list
> 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/20130403/a0084ad8/attachment-0001.html 


More information about the Mondrian mailing list