metadata for parent-child relationship

Anonymous
2011-05-02
2012-10-08
  • Anonymous - 2011-05-02

    When there is a dimension with a parent-child relationship, a level in the
    schema can map into an arbitrary number of levels in the result. An example of
    this in the Foodmart schema is the Employees dimension.

    How can we find out that we are dealing with a parent-child relationship from
    the olap4j API?
    What's a good strategy for generating MDX that will not recurse all the
    levels? I am guessing some flavor of Descendants()

    I ran into this trying to include the Employees level using the query API,
    which returned all 7 levels and 8000 members.

     
  • Julian Hyde

    Julian Hyde - 2011-05-03

    How can we find out that we are dealing with a parent-child relationship
    from the olap4j API?

    There is currently no way to find that out. Please log a feature request to
    add an attribute Hierarchy.getStructure(). It will return 'unbalanced' for
    parent-child hierarchies. (See in particular the STRUCTURE attribute of
    MDSCHEMA_HIERARCHIES,
    and the value MD_STRUCTURE_UNBALANCED.)

    What's a good strategy for generating MDX that will not recurse all the
    levels? I am guessing some flavor of Descendants()

    Pass a numeric DISTANCE flag to the Descendants function. Or use the Children function.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks