Procedure: Create the Analytic Workspace Cube
Once the appropriate metadata exists in the OLAP Catalog, you can create the cube within the analytic workspace. Within a script, invoke the
AW_CREATE procedures as follows:
- For each of the cube's dimensions, call the AW_DIMENSION_CREATE Procedure to define the data structures for the dimension within the analytic workspace. The first call to
AW_DIMENSION_CREATE creates the analytic workspace if it does not already exist.
- Create one or more load definitions for each dimension. Call the AW_DIM_DEFINE_LOAD Procedure to name the load definition and specify its type. You can also call the AW_DIM_FILTER_LOAD Procedure to specify a SQL WHERE clause for the query against the dimension tables.
- Call the AW_CUBE_CREATE Procedure to define the data structures for the cube within the analytic workspace.
- Create one or more load definitions for the cube. Call the AW_CUBE_DEFINE_LOAD Procedure to name a load definition. Call the following procedures to complete the load definition:
- To load data that meets a certain criteria, call the AW_CUBE_FILTER_LOAD Procedure to specify a SQL WHERE clause for the query against the fact table.
- To specify which of the cube's measures to load, call the AW_CUBE_MEASURE_LOAD Procedure.
- If you want to partially aggregate the cube's data within the analytic workspace, call the AW_CHOOSE_LEVEL_TUPLES Procedure to create a table of level combinations for the cube. By default, all level combinations are selected for aggregation. For partial aggregation, edit the table to deselect the appropriate levels. Then call the AW_DEFINE_AGG_PLAN Procedure to define the aggregation plan for the cube.
If you do not specify partial aggregation, the cube will be fully aggregated within the analytic workspace.
- Call the AW_DIMENSION_REFRESH Procedure with a given load definition to load each analytic workspace dimension.
- Call the AW_CUBE_REFRESH Procedure with a given load definition to load the analytic workspace cube.