Oracle® OLAP DML Reference 11g Release 2 (11.2) E17122-08 |
|
|
PDF · Mobi · ePub |
The HIERSHAPE function identifies whether a hierarchical dimension has a specified shape.
HIERSHAPE(parent-relation[(qdr)] {LEVEL | RAGGED | SKIPLEVEL | REGULAR} USING levelrel -
[INHIERARCHY inhvalueset] LEVELORDER levelvalueset)
A text expression that is the name of the child-parent self-relation for the hierarchical dimension. (See "Parentrel Relation".)
A text expression that is the name of a QDR that qualifies parent-relation.
This option determines whether all of the members are part of the same level as defined by the levelrel.
A hierarchy where leaf-nodes are located at different levels within the hierarchy.
A hierarchy where one or more leaf nodes link to a higher-level parent above its next most obvious level.
A traditional level-based hierarchy where each child has a parent at the next level up in the hierarchy.
A text expression that is the name of the level relation for the hierarchical dimension. (See "Levelrel Relation".)
A text expression that is the name of the inhier valueset for the hierarchical dimension. (See "Inhier Valueset or Variable".)
A text expression that is the name of the hierlevels valueset for the hierarchical dimension. (See "Hierlevels Valueset".)
A dimension is "star consistent" if all of the level hierarchies of the dimension can be represented as a single table with one column per dimension level and one row per leaf member. A dimension is "star inconsistent" if it cannot be represented in this way.
For an example of a dimension that is not "star consistent", suppose that a time dimension has three levels, YEAR, QUARTER, and MONTH, and that it has two hierarchies, FISCAL and CALENDAR. Both hierarchies have the levels, in descending order, YEAR, QUARTER, and MONTH. Suppose that the hierarchies have the following members.
CALENDAR hierarchy:
CY2012 CYQ1_2012 Jan_2012 Feb_2012 Mar_2012 CYQ2_2012 Apr_2012 May_2012 Jun_2012 ...
FISCAL hierarchy:
FY2012 FYQ1_2012 Apr_2012 May_2012 Jun_2012 FYQ2_2012 Jul_2012 Aug_2012 Sep_2012 ...
This is a valid and consistent dimension, but it is not star consistent because you cannot represent it using only three columns in a table. For example, the row in which MONTH is "Apr_2012" would need to have two different values for QUARTER, "CYQ2_2012" and "FYQ1_2012", which is not possible.
To make this dimension star consistent, you would need to replace the MONTH level with two distinct levels, FISCAL_MONTH and CALENDAR_MONTH, and similarly replace the year YEAR level with FISCAL_YEAR and CALENDAR_YEAR.