MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 23: Rowsets in OLE DB for OLAP


 

Flattening Algorithm

OLE DB for OLAP defines the following algorithm for flattening a dataset:

  1. The components of each tuple on the COLUMNS axis are concatenated together with a period (.) separator to yield compound names. Each component consists of a unique name. Call this set of names X.

  2. For every non-X axis dimension Di:
  3. Let C represent the union of all Ci values obtained in step 2.

  4. The flattened dataset has the following columns:
  5. Among the properties for a given level, the order is as specified in the DIMENSION PROPERTIES clause.

  6. If there is no DIMENSION PROPERTIES clause, the column name is just the unique name of the level. (See step 2—Ci is the same as Li.) The CAPTION property is returned as the value of this column.

    Note   The main idea behind a flattened rowset is that it is a quick and easy method for rowset-based consumers to display multidimensional data. Therefore, the default (without the DIMENSION PROPERTIES clause) is to return the display caption.

  7. Each name in X is a column.
  8. If a hierarchy has an ALL member and that member appears on an axis, this is represented in the flattened rowset by a row that has a NULL in every column that corresponds to a level below it.