[Mondrian] ParentChild hierarchy in Mondrian 3.2

Julian Hyde jhyde at pentaho.com
Wed Jun 30 19:32:34 EDT 2010


The attributes hideMemberIf and nullParentValue are usually only used in
ragged hierarchies. Do the problems go away if you remove them?
 
I notice that it is joining to '... = 1000.0'. Is ANCESTORID an integer in
the database? Does that query return different results if you change 1000.0
to 1000?
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Anton Nikitin
Sent: Wednesday, June 30, 2010 5:49 AM
To: mondrian at pentaho.org
Subject: [Mondrian] ParentChild hierarchy in Mondrian 3.2


I am experiencing some difficulties after upgrading from 3.1.2 to 3.2.0 with
parent-child hierarchy.

I have a hierarchy defined as follows:

    <Dimension name="Liquidity Risk Group">
        <Hierarchy hasAll="true" allMemberName="All Nodes"
primaryKey="NODEID">
            <Table name="LIQUIDITYRISKGROUP"/>

            <Level approxRowCount="100" name="Risk Group" column="NODEID"
nameColumn="RISKGROUPNAME"
                parentColumn="PARENT" nullParentValue="-1" type="Numeric"
uniqueMembers="true"
                levelType="Regular" hideMemberIf="Never">
                <Closure parentColumn="ANCESTORID" childColumn="NODEID">
                    <Table name="RISKGROUPCLOSURE" />
                </Closure>
            </Level>
        </Hierarchy>
    </Dimension>

And with such definition it returns empty cells if MDX includes any member
from this hierarchy other than AllMember.
If I comment out closure definition it starts to work correctly.

During analysis I found the following in Mondrian log:


[2010-06-30 16:26:51,896] [DEBUG] (RolapUtil             ) Segment.load:
executing sql [select "RISKGROUPCLOSURE"."ANCESTORID" as "c0",
sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHI
ERARCHY"."STRESSCFAMOUNTMINUS") as "m0" from "
RISKGROUPCLOSURE" "RISKGROUPCLOSURE", "DAILYCFBYRISKGROUPHIERARCHY"
"DAILYCFBYRISKGROUPHIERARCHY" where "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" =
"RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = 1000.0
group by "RISKGROUPCLOSURE"."ANCESTORID"], exec 15 ms

[2010-06-30 16:26:51,896] [DEBUG] [/lrm230] [OTIDO\aln at 192.168.1.171] -
(RolapUtil             ) Segment.load: done executing sql [select
"RISKGROUPCLOSURE"."ANCESTORID" as "c0",
sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHI
ERARCHY"."STRESSCFAMOUNTMINUS") as "m0" from "RISKGROUPCLOSURE"
"RISKGROUPCLOSURE", "DAILYCFBYRISKGROUPHIERARCHY"
"DAILYCFBYRISKGROUPHIERARCHY" where "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" =
"RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = 1000.0
group by "RISKGROUPCLOSURE"."ANCESTORID"], exec+fetch 15 ms, 0 rows

[2010-06-30 16:26:51,896] [DEBUG] [/lrm230] [OTIDO\aln at 192.168.1.171] -
(FastBatchingCellReader$Batch) Batch.loadAggregation (millis) 15
[2010-06-30 16:26:51,896] [DEBUG] [/lrm230] [OTIDO\aln at 192.168.1.171] -
(FastBatchingCellReader) loadAggregation (millis): 15
[2010-06-30 16:26:51,897] [DEBUG] [/lrm230] [OTIDO\aln at 192.168.1.171] -
(ResultBase            ) RolapResult<init>: FREE_MEMORY: 197383kb 63.82%
[2010-06-30 16:26:51,897] [DEBUG] [/lrm230] [OTIDO\aln at 192.168.1.171] - (mdx
) 1: exec: 18 ms

It reports that query returned 0 rows (if I understand it correctly).
But when I tried to execute the same SQL manually against my database it
returned one row.

Could anybody help me with it? We didn't change schema definition and
database content, so it worked in 3.1.2.
Any hint why closure could stop working would be much appreciated...

Thanks.

Anton Nikitin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100630/65eef029/attachment.html 


More information about the Mondrian mailing list