View Full Version : Parent-child hierarchies

03-26-2003, 08:30 PM
Hi Julian!
In the "How to design a Mondrian schema" tutorial you mention in "Advanced logical constructs", that there is a possibility to define "Parent-child hierarchies". Unfortunatelly I couldn't find anything more to this subject in the docs. Could you give me a hint how I could define them in Mondrian schema?
Thanks in advance

03-26-2003, 10:15 PM
I'm implementing parent-child hierarchies (and adding a section to doc/schema.html) right now. I hope to check in within a few days. (JPivot support may take a while longer.)
I'll post a follow-up when I check in.

03-26-2003, 10:18 PM
Thanks a lot, Julian!

03-29-2003, 04:29 PM
Parent-child hierarchies are implemented in change 406. I've added instructions for parent-child hierarchies and access-control to
If you want some test data, the "Employees" hierarchy of the "HR" cube in FoodMart.xml is a parent-child hierarchy.

06-16-2004, 08:44 PM
I have a problem using parent child hierarchies on my data, so i made a query on employees in foodmart :
{[Measures].[Org Salary]} on columns,
{([Employees].[All Employees], [Pay Type])} ON rows
from HR
where ([Time].[1997])
I set mondrian.trace.level to "1" so i see that mondrian execute queries in order to build the complete hierarchy. But in JPivot, only
Sheri Nowmer
is shown, and you can't span the hierarchy further (no "+" drawn)
Is there a problem of JPivot ?

06-17-2004, 01:45 AM
I cut the hierarchy to the 3rd level in the data in order to have 3 full level (no element have no child exept the third level elements)
Now, all employees (those i didn't cut) are shown but it's "flat" : there is no hierarchy at all : all elements are listed when you click on the expand "+" of "All Employees" in JPivot
Somebody have the same ?

06-21-2004, 10:13 PM
Yes, Jpivot needed an adaption to the latest Mondrian changes.
Will be fixed with by next Jpivot release.

07-29-2004, 10:35 PM
Hi Nicolas,
I met same error as you.
I create a simple DB to test.
32 records in table "hrinfo"
employee_id and supervisor_id both are char(6)
xml is:
<?xml version="1.0"?>
<Schema name="Movie">
<Cube name="SalaryInfo">
<Table schema="MovieDB.dbo" name="salary"/>
<Dimension name="Employees" foreignKey="employee_id">
<Hierarchy hasAll="true" allMemberName="All Employees" primaryKey="employee_id">
<Table schema="MovieDB.dbo" name="hrinfo"/>
<Level name="EmployeeID" type="String" uniqueMembers="true" column="employee_id" parentColumn="supervisor_id" nameColumn="employee_id" nullParentValue="NULL" />
<Measure name="Salary" column="salary" aggregator="sum" formatString="Standard" />
<Measure name="Bonus" column="bonus" aggregator="sum" formatString="#,#"/>
It is supposed to display in 4 levels including All Employees, because database records as belows:
Employee_id | | Supervisor_id
GV0001 | | null
GV0002 | | GV0001
GV0003 | | GV0001
GV0004 | | GV0001
GV0005 | | GV0002
GV0006 | | GV0002
GV0007 | | GV0003
GV0008 | | GV0004
SH0001 | | null
SH0002 | | SH0001
SH0003 | | SH0001
SH0004 | | SH0001
SH0005 | | SH0002
SH0006 | | SH0002
SH0007 | | SH0003
SH0008 | | SH0004
EW0001 | | null
EW0002 | | EW0001
EW0003 | | EW0001
EW0004 | | EW0001
EW0005 | | EW0002
EW0006 | | EW0002
EW0007 | | EW0003
EW0008 | | EW0004
CA0001 | | null
CA0002 | | CA0001
CA0003 | | CA0001
CA0004 | | CA0001
CA0005 | | CA0002
CA0006 | | CA0002
CA0007 | | CA0003
CA0008 | | CA0004
Anyone else knows why?
Thanks and best regards

03-21-2005, 05:41 PM
Does this bug has amended in JPivot 1.3.0?