Database Reference
In-Depth Information
7 < Hierarchies >
8 < Hierarchy name= ' Supervision ' hasAll= ' true ' >
9 < Level name= ' Employee ' attribute= ' Employee Key '
10 parentAttribute= ' Supervisor Key ' nullParentValue= ' NULL ' / >
11 < /Hierarchy >
12 < /Hierarchies >
13 < /Dimension >
The parentAttribute attribute in line 10 states the name of the attribute that
references the parent member in a parent-child hierarchy. The nullParentValue
attribute indicates the value determining the top member of the hierarchy, in
this case a null value. As in Analysis Services, each member of a parent-child
hierarchy has a shadow member, called its data member , that keeps the
measure values directly associated with it.
As we studied in this chapter and in the previous one, ragged hierarchies
allow some levels in the hierarchy to be skipped when traversing it. The
Geography hierarchy in the Northwind data warehouse shows an example. It
allows one to handle, for example, the case of Israel, which does not have
states or regions, and the cities belong directly to the country. As in Analysis
Services, Mondrian creates hidden members, for example, a dummy state
and a dummy region for Israel, to which any city in Israel belongs. Thus, if
we ask for the parent member of Tel Aviv , Mondrian will return Israel ,the
dummy members will be hidden. In short, in Mondrian, when we define a
ragged hierarchy, we must tell which members must be hidden. This is done
with the hideMemberIf attribute, as shown next:
< Dimension name= ' Customer ' table= ' Customer ' / >
1
< Attributes >
2
< Attribute name= ' Continent ' table= ' Continent '
3
keyColumn= ' ContinentKey ' / >
4
< Attribute name= ' Country ' table= ' State ' keyColumn= ' CountryKey ' / >
5
< Attribute name= ' Region ' table= ' State ' keyColumn= ' RegionName ' / >
6
< Attribute name= ' State ' table= ' State ' keyColumn= ' StateKey ' / >
7
< Attribute name= ' City ' table= ' City ' keyColumn= ' CityKey ' / >
8
< Attribute name= ' Customer ' keyColumn= ' CustomerKey ' / >
9
...
10
< /Attributes >
11
< Hierarchies >
12
< Hierarchy name= ' Geography ' / >
13
< Level attribute name= ' Continent ' / >
14
< Level attribute name= ' Country ' / >
15
< Level attribute name= ' Region ' hideMemberIf= ' IfBlankName ' / >
16
< Level attribute name= ' State ' hideMemberIf= ' IfBlankName ' / >
17
< Level attribute name= ' City ' / >
18
< Level attribute name= ' Customer ' / >
19
< /Hierarchy >
20
< /Hierarchies >
21
< /Dimension >
22
In the schema above, hideMemberIf= ' IfBlankName ' tells that a member in
this level does not appear if its name is null, empty, or a whitespace. Other
Search WWH ::




Custom Search