Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

E17122-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

HIERSHAPE

The HIERSHAPE function identifies whether a hierarchical dimension has a specified shape.

Return Value

BOOLEAN

Syntax

HIERSHAPE(parent-relation[(qdr)] {LEVEL | RAGGED | SKIPLEVEL | REGULAR} USING levelrel -

[INHIERARCHY inhvalueset] LEVELORDER levelvalueset)

Parameters

parent-relation

A text expression that is the name of the child-parent self-relation for the hierarchical dimension. (See "Parentrel Relation".)

qdr

A text expression that is the name of a QDR that qualifies parent-relation.

LEVEL

This option determines whether all of the members are part of the same level as defined by the levelrel.

RAGGED

A hierarchy where leaf-nodes are located at different levels within the hierarchy.

SKIPLEVEL

A hierarchy where one or more leaf nodes link to a higher-level parent above its next most obvious level.

REGULAR

A traditional level-based hierarchy where each child has a parent at the next level up in the hierarchy.

levelrel

A text expression that is the name of the level relation for the hierarchical dimension. (See "Levelrel Relation".)

inhvalueset

A text expression that is the name of the inhier valueset for the hierarchical dimension. (See "Inhier Valueset or Variable".)

levelvalueset

A text expression that is the name of the hierlevels valueset for the hierarchical dimension. (See "Hierlevels Valueset".)

Usage Notes

Star-consistent Hierarchies

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.