Oracle® OLAP Reference 10g Release 2 (10.2) Part Number B14350-01 |
|
|
View PDF |
The following examples show how to set some of the metadata descriptors.
Note: If you have used Enterprise Manager to create your OLAP Catalog metadata, be sure to respect the case of metadata names. |
The following statements specify the quarter, month, and year levels in the time dimension XADEMO.TIME
.
execute cwm2_olap_classify.add_entity_descriptor_use ('Level Year', 'LEVEL', 'XADEMO', 'TIME', 'L1'); execute cwm2_olap_classify.add_entity_descriptor_use ('Level Quarter', 'LEVEL', 'XADEMO', 'TIME', 'L2'); execute cwm2_olap_classify.add_entity_descriptor_use ('Level Month', 'LEVEL', 'XADEMO', 'TIME', 'L3');
The following statement indicates that the value separator used by the OLAP API to construct dimension member names for XADEMO.TIME
is the default ("::").
execute cwm2_olap_classify.add_entity_descriptor_use ('Value Separator', 'DIMENSION', 'XADEMO', 'TIME', NULL, NULL, 'Value Separator','::');
The following statement indicates that the data in the cube XADEMO.ANALYTIC_CUBE
is dense over Time and Geography, but sparse over Channel and Product.
execute cwm2_olap_classify.add_entity_denseindicator_use ('XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'TIME', 'YES'); execute cwm2_olap_classify.add_entity_denseindicator_use ('XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'GEOGRAPHY', 'YES'); execute cwm2_olap_classify.add_entity_denseindicator_use ('XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'CHANNEL', 'NO'); execute cwm2_olap_classify.add_entity_denseindicator_use ('XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'PRODUCT', 'NO');
The following statement removes the Dense Indicator
descriptors from XADEMO.ANALYTIC_CUBE
.
execute cwm2_olap_classify.remove_entity_descriptor_use ('Dense Indicator', 'DENSE INDICATOR','XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'CHANNEL'); execute cwm2_olap_classify.remove_entity_descriptor_use ('Dense Indicator', 'DENSE INDICATOR','XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'PRODUCT'); execute cwm2_olap_classify.remove_entity_descriptor_use ('Dense Indicator', 'DENSE INDICATOR','XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'GEOGRAPHY'); execute cwm2_olap_classify.remove_entity_descriptor_use ('Dense Indicator', 'DENSE INDICATOR','XADEMO', 'ANALYTIC_CUBE', 'XADEMO', 'TIME');
Table 8-2 CWM2_OLAP_CLASSIFY Subprograms
Subprogram | Description |
---|---|
|
Adds the |
|
Adds the |
|
Adds the |
|
Applies a descriptor to a metadata entity. |
|
Adds the |
|
Removes a descriptor from a metadata entity. |
This procedure adds the Estimated Cardinality
descriptor to a level of a hierarchy.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
ADD_ENTITY_CARDINALITY_USE ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, hierarchy_name IN VARCHAR2, level_name IN VARCHAR2, estimated_cardinality IN NUMBER);
Parameters
Table 8-3 ADD_ENTITY_CARDINALITY_USE Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Hierarchy within the dimension. If the dimension has no hierarchy, specify |
|
Level within the hierarchy. |
|
Estimated number of dimension members in the level. |
Example
The following statement sets the estimated cardinality of a level in the Standard hierarchy of the Geography dimension.
execute cwm2_olap_classify.add_entity_cardinality_use ('XADEMO', 'GEOGRAPHY', 'STANDARD', 'L4', 60);
This procedure adds the Default Member
descriptor to a hierarchy.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
ADD_ENTITY_DEFAULTMEMBER_USE ( dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, hierarchy_name IN VARCHAR2, default_member IN VARCHAR2, default_member_level IN VARCHAR2, position IN NUMBER DEFAULT NULL);
Parameters
Table 8-4 ADD_ENTITY_DEFAULTMEMBER_USE Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the dimension. |
|
Name of the dimension. |
|
Name of the hierarchy. |
|
Name of a dimension member in the hierarchy. |
|
Level of the default dimension member. |
|
Position of the default member within a multi-column key. If position is not meaningful, this parameter is NULL (default). |
Example
The following statement sets the default member of the Standard hierarchy in the Geography dimension to Paris.
execute cwm2_olap_classify.add_entity_defaultmember_use ('XADEMO', 'GEOGRAPHY', 'STANDARD', 'Paris', 'L4');
This procedure adds the Dense Indicator
descriptor to a dimension of a cube.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
ADD_ENTITY_DENSEINDICATOR_USE ( cube_owner IN VARCHAR2, cube_name IN VARCHAR2, dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, dense_indicator IN VARCHAR2 );
Parameters
Table 8-5 ADD_ENTITY_DENSEINDICATOR_USE Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the cube. |
|
Name of the cube. |
|
Owner of the dimension. |
|
Name of the dimension. |
|
|
Example
See "Example: Creating Descriptors".
This procedure adds a descriptor to a metadata entity.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
ADD_ENTITY_DESCRIPTOR_USE ( descriptor_name IN VARCHAR2, entity_type IN VARCHAR2, entity_owner IN VARCHAR2, entity_name IN VARCHAR2, entity_child_name IN VARCHAR2 DEFAULT NULL, entity_secondary_child_name IN VARCHAR2 DEFAULT NULL, parameter_name IN VARCHAR2 DEFAULT NULL, parameter_value IN VARCHAR2 DEFAULT NULL);
Parameters
Table 8-6 ADD_ENTITY_DESCRIPTOR_USE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the descriptor. |
|
Type of metadata entity to which the descriptor applies. Types are:
|
|
Schema of the cube or dimension. |
|
Name of the cube or dimension. |
|
Name of a child of the cube or dimension. For example, a dimension attribute is a child of a dimension, and a measure is a child of a cube. If the descriptor applies to a cube or dimension, this parameter is NULL. |
|
Name of a child of the child entity. For example, a level attribute is a child of a level, which is a child of a dimension. If the descriptor applies to a cube or dimension, or a child of a cube or dimension, this parameter is NULL. |
|
Label for the descriptor. You can specify any label that you choose. |
|
Value of the descriptor. |
Example
See "Example: Creating Descriptors".
This procedure adds the Fact Table Join
descriptor to a cube. The Fact Table Join
descriptor applies to CWM2 metadata only.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
ADD_ENTITY_FACTJOIN_USE ( cube_owner IN VARCHAR2, cube_name IN VARCHAR2, dimension_owner IN VARCHAR2, dimension_name IN VARCHAR2, hierarchy_name IN VARCHAR2, dim_table_owner IN VARCHAR2, dim_table_name IN VARCHAR2, dim_table_column_name IN VARCHAR2, position IN NUMBER DEFAULT NULL);
Parameters
Table 8-7 ADD_ENTITY_FACTJOIN_USE Procedure Parameters
Parameter | Description |
---|---|
|
Owner of the cube. |
|
Name of the cube. |
|
Owner of a dimension of the cube. |
|
Name of the dimension. |
|
Name of a hierarchy of the dimension. |
|
Owner of the dimension table. |
|
Name of the dimension table. |
|
Key column in the dimension table that maps to a foreign key column in the fact table. |
|
Position of the key column in a multi-column key. If the key is in a single column, this parameter is NULL (Default). |
Example
The following statement adds Fact Table Join descriptor to the Standard hierarchy of the Geography dimension of the ANALYTIC_CUBE
.
execute cwm2_olap_classify.add_entity_factjoin_use ('XADEMO', 'ANALYTIC_CUBE', 'XADEMO','GEOGRAPHY, 'STANDARD', 'XADEMO', 'XADEMO_GEOGRAPHY', 'GEOG_STD_CITY');
This procedure removes a descriptor from an entity.
The OLAP Catalog metadata descriptors are described in Table 8-1, "OLAP Catalog Metadata Descriptors".
Syntax
REMOVE_ENTITY_DESCRIPTOR_USE ( descriptor_name IN VARCHAR2, entity_type IN VARCHAR2, entity_owner IN VARCHAR2, entity_name IN VARCHAR2, entity_child_name IN VARCHAR2 DEFAULT NULL, entity_secondary_child_name IN VARCHAR2 DEFAULT NULL);
Parameters
Table 8-8 REMOVE_ENTITY_DESCRIPTOR_USE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the descriptor to remove. |
|
Type of metadata entity to which the descriptor applies. Types are: DIMENSION HIERARCHY LEVEL LEVEL ATTRIBUTE DIMENSION ATTRIBUTE CUBE MEASURE ESTIMATED CARDINALITY DEFAULT MEMBER DENSE INDICATOR FACT TABLE JOIN |
|
Schema of the cube or dimension. |
|
Name of the cube or dimension. |
|
Name of a child of the cube or dimension. For example, a dimension attribute is a child of a dimension, and a measure is a child of a cube. If the descriptor applies to a cube or dimension, this parameter is NULL. |
|
Name of a child of the child entity. For example, a level attribute is a child of a level, which is a child of a dimension. If the descriptor applies to a cube or dimension, or a child of a cube or dimension, this parameter is NULL. |
Example