[Mondrian] Duplicate child nodes in hierarchy

Sherman Wood swood at jaspersoft.com
Sat Jan 9 14:17:30 EST 2010

Use uniqueMembers="false" in the levels below the first.




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"
            <View alias="HierarchyTest_view">
                <SQL dialect="generic">
                    SELECT * FROM customer WHERE fullname='Sarah Smith'
            <Level name="Country"   column="country"
            <Level name="Name"      column="fullname"
            <Level name="Country"   column="country"
            <Level name="Id"              column="customer_id"
type="Numeric" uniqueMembers="true"/>

    <Cube name="Sales">
        <Table name="sales_fact_1997"/>
        <DimensionUsage name="HierarchyTest" source="HierarchyTest"

This will produce the following hierarchy

All Customers
    |    |--Sarah Smith
    |        |--Mexico
    |        |--USA
        |--Sarah Smith

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
    |    |--Sarah Smith
    |        |--Mexico
        |--Sarah Smith

Although aggregations work fine I think. It is only an issue with the



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

More information about the Mondrian mailing list