Creating Cubes and Dimensions
Creating Cubes and Dimensions
By PenchalaRaju.Yanamala
The Target Designer provides an interface to enable you to create and edit cubes
and dimensions. Multi-dimensional metadata refers to the logical organization of
data used for analysis in online analytical processing (OLAP) applications. This
logical organization is generally specialized for the most efficient data
representation and access by end users of the OLAP application. The following
sections provide an overview of the concepts relevant to the multi-dimensional
features of PowerCenter.
Creating a Dimension
Before you can create a cube, you need to create dimensions. Complete the
following steps to create a dimension:
To create a dimension:
Note: You cannot change the database type after you create the dimension.
4.Click OK.
After you create the dimension, add the needed levels. Levels hold the properties
necessary to create target tables.
1.In the Dimension Editor, select Levels and click Add Level.
2.Enter a name and description for the level.
The Level name must be unique within the dimension.
3.Click Level Properties.
4.Click the Import from Source Fields button.
The name of a level property must be unique within the dimension.
5.Select a source table from which you want to copy columns to the level.
The columns display in the Source Fields section.
6.Select the columns you want to add to the level.
7.Click the Copy Columns button to add source columns to the level.
8.Click the Add Columns button to add a new column to the level.
9.Click OK after you add all the columns.
The Dimension Editor displays the new level.
After you create a hierarchy, you add levels to it. You can have only one root
level in a hierarchy.
1.From the Dimension Editor, drill down to view the levels in the dimension.
2.Drag the level you want to define as the root level in the hierarchy.
The root level is the level of finest granularity.
3.Enter a target table name and description of the target table.
4.Click OK.
A window displays a listing of all the objects affected by the new level.
5.Click OK.
The new level displays under the hierarchy.
Creating a Cube
To create a cube:
Editing a Cube
You can edit a cube in the Target Designer. You cannot edit a fact table or
dimension table directly. To edit a column in a fact table or dimension table, you
need to edit the cube or dimension.
To edit a cube:
Editing a Dimension
You can edit dimensions in the Target Designer. You cannot, however, change
the database type after you create a dimension.
When you edit a dimension, the Designer marks all mappings with the dimension
invalid.
To edit a dimension:
You can delete a cube or dimension from the Navigator in the Designer. Unlike
target tables, you cannot delete cubes and dimensions in the Target Designer.
When you delete a cube, you delete all fact tables associated with the cube.
When you delete a dimension, you delete all dimension tables and references to
the dimension.
To open a cube:
To close a cube in the Target Designer, click Targets > Close Cube. The
Designer closes the cube, saving the layout of all the tables.
Viewing Metadata for Cubes and Dimensions
You can view the metadata for cubes and dimensions in the Repository
Manager.
Consider the following tips when working with cubes and dimensions:
If you want to copy a cube, you need to copy the folder that stores the cube.
To view the levels of a cube or dimension, you can either edit the cube or
dimension or use the Navigator in the Repository Manager.
You cannot revert to previous versions of cubes or dimensions.
You can delete a cube or dimension from the Navigator.
You can delete a dimension using Targets > Create/Edit Dimension.
You cannot delete cubes and dimensions from the Target Designer workspace.
If you want to change a column in a fact table or dimension table, you need to
edit the cube or dimension. You cannot edit a fact table or dimension table
directly.
If you delete a level, the Designer deletes the associated level instances in
hierarchies. The Designer also removes the level instance from any associated
cubes.
A primary key is generated for each fact and dimension table. The format is
GK_TABLE_NAME.
A foreign key is added to the appropriate fact table when you associate a
dimension level instance to the fact table.
You can drag a cube to the workspace and then edit the cube and cardinality by
double-clicking the links.
You cannot delete or create a link between fact and dimension tables in the
workspace. You can only delete and create links in the Cube and Dimension
Editors. You can create a graph in the hierarchy.