[Mondrian] Duplicate child nodes in hierarchy
Ika Krtveli
ikakartveli at yahoo.com
Sat Jan 9 14:40:25 EST 2010
That does work. thanks very much Sherman
~IK
________________________________
From: Sherman Wood <swood at jaspersoft.com>
To: Mondrian developer mailing list <mondrian at pentaho.org>
Sent: Sat, January 9, 2010 11:17:30 AM
Subject: RE: [Mondrian] Duplicate child nodes in hierarchy
Use uniqueMembers="false" in the levels below
the first.
Sherman
From:mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf
Of Ika Krtveli
Sent: Sunday, January 10, 2010 6:14 AM
To: mondrian at pentaho.org
Subject: [Mondrian] Duplicate child nodes in hierarchy
Hello Mondrian team,
I have recently noticed the following issue with tree hierarchy that is
returned by Mondrian. Here is an example:
This query, SELECT customer_id, country, fullname FROM customer WHERE
fullname='Sarah Smith'
produces following results:
2588;"USA";"Sarah Smith"
4947;"Mexico";"Sarah Smith"
i.e. there are two "Sarah Smith" entries in the table with
country="Mexico" and country="USA". Now consider following
schema
<?xml version="1.0"?>
<Schema name="FoodMart">
<Dimension name="HierarchyTest">
<Hierarchy
hasAll="true" allMemberName="All Customers"
primaryKey="customer_id">
<View
alias="HierarchyTest_view">
<SQL dialect="generic">
SELECT * FROM customer WHERE fullname='Sarah Smith'
</SQL>
</View>
<Level
name="Country"
column="country"
uniqueMembers="true"/>
<Level
name="Name"
column="fullname" uniqueMembers="true"/>
<Level
name="Country" column="country"
uniqueMembers="true"/>
<!--
<Level
name="Id"
column="customer_id" type="Numeric" uniqueMembers="true"/>
-->
</Hierarchy>
</Dimension>
<Cube name="Sales">
<Table name="sales_fact_1997"/>
<DimensionUsage
name="HierarchyTest" source="HierarchyTest"
foreignKey="customer_id"/>
</Cube>
</Schema>
This will produce the following hierarchy
All Customers
|--Mexico
| |--Sarah Smith
| |--Mexico
| |--USA
|
|--USA
|--Sarah Smith
|--Mexico
|--USA
sarah smith in Mexico or USA has child nodes both USA and Mexico, which does
not seem to be the right behavior under the above pivots. Instead, I would
expect to see
All Customers
|--Mexico
| |--Sarah Smith
| |--Mexico
|
|--USA
|--Sarah Smith
|--USA
Although aggregations work fine I think. It is only an issue with the
hierarchy.
Thanks,
~IK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100109/688d04cd/attachment.html
More information about the Mondrian
mailing list