Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Not picking up parent child hierarchies

  1. #1
    Join Date
    Sep 2003
    Posts
    14

    Default Not picking up parent child hierarchies

    Am having problems using parent/child relationships...
    .xml follows:
    <?xml version="1.0"?>
    <Schema name="FoodMart">
    <!--
    == $Id: //open/mondrian/demo/FoodMart.xml#14 $
    == This software is subject to the terms of the Common Public License
    == Agreement, available at the following URL:
    ==
    http://www.opensource.org/licenses/cpl.html.
    == Copyright (C) 2000-2003 Kana Software, Inc. and others.
    == All Rights Reserved.
    == You must accept the terms of that agreement to use this software.
    ==
    == todo:
    == 1. <CalculatedMember/>
    -->

    <Dimension name="FinTime">
    <Hierarchy hasAll="true" allMemberName="All Periods" primaryKey="perid">
    <Table name="period"/>
    <Level name="Period ID" uniqueMembers="true" column="perid" parentColumn="parid" nameColumn="pernm" nullParentValue="0">
    </Level>
    </Hierarchy>
    </Dimension>
    <Dimension name="BusUnit">
    <Hierarchy hasAll="true" allMemberName="All Business Units" primaryKey="bid">
    <Table name="busunit"/>
    <Level name="Business Unit" type="Numeric" uniqueMembers="true" column="busunitid" parentColumn="busunitpar" nameColumn="busunitnm" nullParentValue="0">
    </Level>
    </Hierarchy>
    </Dimension>

    <Cube name="Fin">
    <Table name="factmndb"/>
    <Dimension name="Account" foreignKey="accid">
    <Hierarchy hasAll="true" allMemberName="All Accounts" primaryKey="acid">
    <Table name="accmn"/>
    <Level name="Account ID" uniqueMembers="true" column="acid" parentColumn="paccid" nameColumn="description" nullParentValue='0'>
    </Level>
    </Hierarchy>
    </Dimension>
    <DimensionUsage name="BusUnit" source="BusUnit" foreignKey="busunt"/>
    <DimensionUsage name="FinTime" source="FinTime" foreignKey="per"/>
    <Measure name="Amount" column="amt" aggregator="sum" formatString="Currency"/>
    </Cube>
    </Schema>
    MDX query being used:
    select
    {[Measures].[Amount]} on columns,
    {[Account].[All Accounts]} ON rows
    from [Fin]
    The Hierarchy for the Account dimension is flat... the parent/child relationships are not being picked up as they are in the employee dimension in the HR cube which I have working.
    Any help appreciated.
    Regards,
    Shaun

  2. #2
    Join Date
    Nov 1999
    Posts
    1,618

    Default RE: Not picking up parent child hierarchies

    I notice that you have used single-quotes for the nullParentValue attribute.
    Check that your top-level accounts really do have their parents set to 0, not null.
    Other than that, no clue.

  3. #3
    Join Date
    Nov 1999
    Posts
    1,618

    Default RE: Not picking up parent child hierarchies

    Just noticed this tracker item:
    http://sourceforge.net/tracker/index...02&atid=414614
    It might be the same issue. I don't have time to look at it now, I'm afraid.

  4. #4
    Join Date
    Sep 2003
    Posts
    14

    Default RE: Not picking up parent child hierarchies

    Hi Julian, first off thanks for your time and effort today. It is appreciated.
    This is the same issue I have as the traker... I will test the 100+ requirment.
    I did use double quotes first but didnt work, so changed to singles.. :0)
    I work extensivly with commercial olap tools and am very keen for a 'free' olap server. We have developed a nifty way of managing dimensions and parent/child hierarchies for our project implementation system and have asked one of my team to look at modifying it to help with modeling dimensions and cube for Mondrian.
    Again, thanks for your help.
    Regards,
    Shaun

  5. #5
    Join Date
    Sep 2003
    Posts
    14

    Default RE: Not picking up parent child hierarchies

    Have tested the 100+ constraint, hierarchies now picking up parent/child relationships, all be it a bit raged.
    Regards,
    Shaun

  6. #6
    Join Date
    Nov 1999
    Posts
    1,618

    Default RE: Not picking up parent child hierarchies

    The '100' number sounds suspiciously like the value of the mondrian.rolap.LargeDimensionThreshold parameter. If you reduce that, I suspect that parent-child behavior will work in smaller dimensions. (There may be some performance cost associated with this workaround, of course.)
    Please log this issue as a bug, and list the workaround (if it works) and I will look at it when I get back.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.