Oracle® OLAP Reference 10g Release 2 (10.2) Part Number B14350-01 |
|
|
View PDF |
The following statements create four levels for the PRODUCT_DIM
dimension and assign them to the PRODUCT_DIM_ROLLUP
hierarchy.
execute cwm2_olap_level.create_level ('JSMITH', 'PRODUCT_DIM', 'TOTALPROD_LVL', 'Total Product', 'All Products', 'Total', 'Equipment and Parts of standard product hierarchy'); execute cwm2_olap_level.create_level ('JSMITH', 'PRODUCT_DIM', 'PROD_CATEGORY_LVL', 'Product Category', 'Product Categories', 'Category', 'Categories of standard product hierarchy'); execute cwm2_olap_level.create_level ('JSMITH', 'PRODUCT_DIM', 'PROD_SUBCATEGORY_LVL', 'Product Sub-Category', 'Product Sub-Categories', 'Sub-Category', 'Sub-Categories of standard product hierarchy'); execute cwm2_olap_level.create_level ('JSMITH', 'PRODUCT_DIM', 'PRODUCT_LVL', 'Product', 'Products', 'Product', 'Individual products of standard product hierarchy'); execute cwm2_olap_level.add_level_to_hierarchy ('JSMITH', 'PRODUCT_DIM', 'PRODUCT_DIM_ROLLUP', 'PRODUCT_LVL', 'PROD_SUBCATEGORY_LVL'); execute cwm2_olap_level.add_level_to_hierarchy ('JSMITH', 'PRODUCT_DIM', 'PRODUCT_DIM_ROLLUP', 'PROD_SUBCATEGORY_LVL', 'PROD_CATEGORY_LVL'); execute cwm2_olap_level.add_level_to_hierarchy ('JSMITH', 'PRODUCT_DIM', 'PRODUCT_DIM_ROLLUP', 'PROD_CATEGORY_LVL', 'TOTALPROD_LVL'); execute cwm2_olap_level.add_level_to_hierarchy ('JSMITH', 'PRODUCT_DIM', 'PRODUCT_DIM_ROLLUP', 'TOTALPROD_LVL');
Table 15-1 CWM2_OLAP_LEVEL Subprograms
Subprogram | Description |
---|---|
ADD_LEVEL_TO_HIERARCHY Procedure |
Adds a level to a hierarchy. |
|
Creates a level. |
|
Drops a level. |
|
Locks the level metadata for update. |
REMOVE_LEVEL_FROM_HIERARCHY Procedure |
Removes a level from a hierarchy. |
|
Sets the description for a level. |
Sets the display name for a level. |
|
|
Sets the name of a level. |
|
Sets the plural name for a level. |
SET_SHORT_DESCRIPTION Procedure |
Sets the short description for a level. |
This procedure adds a level to a hierarchy. A hierarchy can have a maximum of 31 levels.
Syntax
ADD_LEVEL_TO_HIERARCHY ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, hierarchy_name IN VARCHAR2, level_name IN VARCHAR2, parent_level_name IN VARCHAR2 DEFAULT NULL);
Parameters
Table 15-2 ADD_LEVEL_TO_HIERARCHY Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the hierarchy. |
|
Name of the level to add to the hierarchy. |
|
Name of the level's parent in the hierarchy. If you do not specify a parent, then the added level is the root of the hierarchy. |
This procedure creates a new level in the OLAP Catalog.
You must specify descriptions and display properties as part of level creation. Once the level has been created, you can override these properties by calling other procedures in the CWM2_OLAP_LEVEL
package.
Syntax
CREATE_LEVEL ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, display_name IN VARCHAR2, plural_name IN VARCHAR2, short_description IN VARCHAR2, description IN VARCHAR2);
Parameters
Table 15-3 CREATE_LEVEL Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
|
Display name for the level. |
|
Plural name for the level. |
|
Short description of the level. |
|
Description of the level. |
This procedure drops a level from the OLAP Catalog. All related level attributes are also dropped.
Syntax
DROP_LEVEL ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2);
Parameters
Table 15-4 DROP_LEVEL Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
This procedure locks the level metadata for update by acquiring a database lock on the row that identifies the level in the CWM2
model table.
Syntax
LOCK_LEVEL ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, wait_for_lock IN BOOLEAN DEFAULT FALSE);
Parameters
Table 15-5 LOCK_LEVEL Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
|
(Optional) Whether or not to wait for the level to be available when it is already locked by another user. If you do not specify a value for this parameter, the procedure does not wait to acquire the lock. |
This procedure removes a level from a hierarchy.
Syntax
REMOVE_LEVEL_FROM_HIERARCHY ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, hierarchy_name IN VARCHAR2, level_name IN VARCHAR2);
Parameters
Table 15-6 REMOVE_LEVEL_FROM_HIERARCHY Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the hierarchy. |
|
Name of the level to remove from the hierarchy. |
This procedure sets the description for a level.
Syntax
SET_DESCRIPTION ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, description IN VARCHAR2);
Parameters
Table 15-7 SET_DESCRIPTION Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
|
Description of the level. |
This procedure sets the display name for a level.
Syntax
SET_DISPLAY_NAME ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, display_name IN VARCHAR2);
Parameters
Table 15-8 SET_DISPLAY_NAME Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
|
Display name for the level. |
This procedure sets the name for a level.
Syntax
SET_LEVEL_NAME ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, set_level_name IN VARCHAR2);
Parameters
Table 15-9 SET_LEVEL_NAME Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Original name for the level. |
|
New name for the level. |
This procedure sets the plural name of a level.
Syntax
SET_PLURAL_NAME ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, plural_name IN VARCHAR2);
Parameters
Table 15-10 SET_PLURAL_NAME Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the level. |
|
Plural name for the level. |
This procedure sets the short description for a level.
Syntax
SET_SHORT_DESCRIPTION ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, level_name IN VARCHAR2, short_description IN VARCHAR2);
Parameters