Skip Headers

Oracle9i OLAP User's Guide
Release 2 (9.2)

Part Number A95295-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

CWM2_OLAP_TABLE_MAP, 10 of 18


MAP_FACTTBL_LEVELKEY Procedure

This procedure creates the join relationships between a fact table and a set of dimension tables. A join must be specified for each of the dimensions of the cube. Each dimension is joined in the context of one of its hierarchies.

For example, if you had a cube with three dimensions, and each dimension had only one hierarchy, you could fully map the cube with one call to MAP_FACTTBL_LEVELKEY.

However, if you had a cube with three dimensions, but two of the dimensions each had two hierarchies, you would need to call MAP_FACTTBL_LEVELKEY four times to fully map the cube. For dimensions Dim1, Dim2, and Dim3, where Dim1 and Dim3 each have two hierarchies, you would specify the following mapping strings in each call to MAP_FACTTBL_LEVELKEY, as shown below.

Dim1_Hier1, Dim2_Hier, Dim3_Hier1
Dim1_Hier1, Dim2_Hier, Dim3_Hier2
Dim1_Hier2, Dim2_Hier, Dim3_Hier1
Dim1_Hier2, Dim2_Hier, Dim3_Hier2

Typically the data for each hierarchy combination would be stored in a separate fact table.

Syntax

MAP_FACTTBL_LEVELKEY (
          cube_owner         IN   VARCHAR2,
          cube_name          IN   VARCHAR2,
          facttable_owner    IN   VARCHAR2,
          facttable_name     IN   VARCHAR2,
          storetype          IN   VARCHAR2,
          dimkeymap          IN   VARCHAR2,
          dimktype           IN   VARCHAR2 DEFAULT NULL);

Parameters

Table 24-12 MAP_FACTTBL_LEVELKEY Procedure Parameters
Parameter Description

cube_owner

Owner of the cube.

cube_name

Name of the cube.

facttable_owner

Owner of the fact table.

facttable_name

Name of the fact table.

storetype

One of the following:

LOWEST LEVEL, for a fact table that stores only lowest level data

ET, for a fact table that stores embedded totals in addition to lowest level data

ROLLED UP, for an embedded total fact table with key columns for all levels

For more information on storetype, see Joining Fact Tables with Dimension Tables.

dimkeymap

A string specifying the mapping for each dimension of the data in the fact table. For each dimension you must specify a hierarchy and the lowest level to be mapped within that hierarchy.

Enclose the string in single quotes, and separate each dimension specification with a semicolon. Each dimension specification must be in the following form:

DIM:dimname /HIER:hiername /GID:columnname /LVL:levelname/COL:columnname;

This string must also be specified as an argument to the MAP_FACTTBL_MEASURE procedure.

dimktype

This parameter is not currently used.

Exceptions

Table 24-13 MAP_FACTTBL_LEVELKEY Procedure Exceptions
Exception Description

no_access_privileges

User does not have the necessary privileges. User must be the dimension owner and have the OLAP_DBA role.

cube_not_found

Cube does not exist within the OLAP 2 Catalog.

fact_table_not_found

Fact table does not exist or is not accessible to the calling user

Example

The following call to the MAP_FACTTBL_LEVELKEY procedure maps a cube named ANALYTIC_CUBE_AW in the schema XADEMO to a fact table named XADEMO_AW_SALES_VIEW_4 in the same schema. The fact table stores lowest level data and embedded totals for all level combinations. The cube has four dimensions: PRODUCT, CHANNEL, TIME, and GEOGRAPHY.


cwm2_olap_table_map.Map_FactTbl_LevelKey 
     ('XADEMO', 'ANALYTIC_CUBE_AW','XADEMO', 'XADEMO_AW_SALES_VIEW_4', 'ET',

'DIM:XADEMO.PRODUCT_AW/HIER:STANDARD/GID:PRODUCT_GID/LVL:L4/COL:PRODUCT_ET;

DIM:XADEMO.CHANNEL_AW/HIER:STANDARD/GID:CHANNEL_GID/LVL:STANDARD_1/COL:CHANNEL_ET;

DIM:XADEMO.TIME_AW/HIER:YTD/GID:TIME_YTD_GID/LVL:L3/COL:TIME_YTD_ET;

DIM:XADEMO.GEOGRAPHY_AW/HIER:CONSOLIDATED/GID:GEOG_CONS_GID/LVL:L4/COL:GEOG_CONS_ET;');

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback