<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hello Mondrian team, <br><br>I have recently noticed the following issue with tree hierarchy that is returned by Mondrian. Here is an example: <br><br>This query, SELECT customer_id, country, fullname FROM customer WHERE fullname='Sarah Smith'<br><br>produces following results:<br><br>2588;"USA";"Sarah Smith"<br>4947;"Mexico";"Sarah Smith"<br><br>i.e. there are two "Sarah Smith" entries in the table with country="Mexico" and country="USA". Now consider following schema<br><br><?xml version="1.0"?><br><Schema name="FoodMart"><br> <Dimension name="HierarchyTest"><br> <Hierarchy hasAll="true" allMemberName="All Customers"
primaryKey="customer_id"><br> <View alias="HierarchyTest_view"><br> <SQL dialect="generic"><br> SELECT * FROM customer WHERE fullname='Sarah Smith'<br> </SQL><br> </View><br> <Level name="Country" column="country" uniqueMembers="true"/><br> <Level name="Name" column="fullname"
uniqueMembers="true"/><br> <Level name="Country" column="country" uniqueMembers="true"/><br> <!--<br> <Level name="Id" column="customer_id" type="Numeric" uniqueMembers="true"/><br> --><br> </Hierarchy><br> </Dimension><br><br> <Cube name="Sales"><br> <Table name="sales_fact_1997"/><br> <DimensionUsage name="HierarchyTest" source="HierarchyTest"
foreignKey="customer_id"/><br> </Cube><br></Schema><br><br>This will produce the following hierarchy<br><br>All Customers<br> |--Mexico<br> | |--Sarah Smith<br><span style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: black;"> | </span> |--Mexico</span><br style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: black;"> | </span> |--USA</span><br> |<br> |--USA<br> |--Sarah Smith<br><span style="color: rgb(192, 0, 0); font-weight: bold;"> |--Mexico</span><br style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: rgb(192, 0, 0);
font-weight: bold;"> |--USA</span><br><br>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<br><br>All Customers<br>
|--Mexico<br>
| |--Sarah Smith<br>
<span style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: black;"> | </span> |--Mexico</span><span style="color: rgb(192, 0, 0); font-weight: bold;"><span style="color: black;"></span></span><br>
|<br>
|--USA<br>
|--Sarah Smith<span style="color: rgb(192, 0, 0); font-weight: bold;"></span><br style="color: rgb(192, 0, 0); font-weight: bold;">
<span style="color: rgb(192, 0, 0); font-weight: bold;"> |--USA</span><br><br><br>Although aggregations work fine I think. It is only an issue with the hierarchy.<br><br>Thanks, <br>~IK<br><br><br></div>
<!-- cg37.c4.mail.gq1.yahoo.com compressed/chunked Sat Jan 9 10:40:06 PST 2010 -->
</div><br>
</body></html>