![]() | ![]() |
Home |
|
|
WarehouseArchitect - User's Guide |
|
| Part 3 WarehouseArchitect Model |
|
| Chapter 16: Aggregation and Partitioning |
When you aggregate a fact, you create a new fact table. The aggregated fact table and the original fact table form a hierarchy of facts.
Each time you create an aggregated fact table, you add another table to the hierarchy.
The Wizard for Fact Table Aggregation dialog box appears.
The List of Fact Tables appears. It lists only the facts in the Multidimensional Hierarchy that are attached to fact tables.
The name and code of the selected fact table appears in the Name and Code boxes.
The dialog box displays the multidimensional hierarchy for the fact corresponding to the selected fact table.
By default all checkboxes are selected.
When you clear a checkbox for a dimension in a dimension hierarchy, or for an attribute in an attribute hierarchy, all checkboxes for lower level dimensions or attributes are cleared.
or
Type a name and click the Equals button after the Code box.
or
Type a code and click the Equals button after the Name box.
| Displaying an aggregated table If you do not select the Show Aggregated Tables checkbox, you can display the table by selecting Dictionary-->List of Tables and selecting the corresponding Display checkbox.
|
A symbol for the aggregated table appears in the WAM. The aggregated fact table contains foreign key columns that correspond to the primary key columns in the dimension tables.
| Columns in fact table not displayed in aggregated fact table Columns in the fact table other than primary or foreign key columns, only appear in the aggregated fact table when they are attached to a metric or an attribute. To attach a column to a metric or an attribute, use the object property sheet in the Multidimensional Hierarchy.
|
In this example, a central fact table (Sales) is linked to the dimension tables Customer, Product, Store and Time.
The Time dimension has a hierarchy of attributes corresponding to Year, Quarter, Month, and so on.
To aggregate data so that you can quickly access data on sales per quarter, you clear the Month checkbox. Because the attributes are organized in a hierarchy, checkboxes for all levels below Month are automatically cleared.
This example shows a typical snowflake schema. A central table (Sales) is linked to the dimension tables Product, Customer, and Store. It is also linked to a dimension hierarchy that contains the tables Year, Quarter, Month, Week, and Day.
To aggregate data so that you can quickly access data on sales per quarter, you clear the Month checkbox. Because the dimensions are organized in a hierarchy, checkboxes for all levels below Month are automatically cleared.
A partitioned fact table contains atomic level data for specific values of one or more dimension attributes. For example, you could partition a sales fact table to obtain three separate fact tables containing data on the sales of red telephones for the years 1995, 1996 and 1997.
The number of partitioned tables you create depends on the number of values you specify for each dimension attribute. For example, specifying the sales of blue telephones as well would result in the creation of six separate fact tables.
You create partitioned tables by selecting dimension attributes. You can only partition a fact table when the columns in the dimension tables are attached to attributes.
The Wizard for Fact Table Partitioning dialog box appears.
The List of Fact Tables appears. It lists only the facts in the Multidimensional Hierarchy that are attached to fact tables.
The name and code of the selected fact appear in the Name and Code boxes.
The dialog box displays the multidimensional hierarchy for the selected fact.
By default, all checkboxes are cleared.
The dialog box lists the selected attributes, their code, and the fact or dimension to which they are attached.
An arrow appears at the beginning of the line.
The List of Values dialog box appears.
A partitioned table is created for each value of the attribute.
You must type at least one value for each attribute.
| Displaying a partitioned table If you do not select the Show Partitioned Tables checkbox, you can display the tables by selecting Dictionary-->List of Tables and selecting the corresponding Display checkboxes.
|
Partitioned tables appear in the WAM.
| Columns in fact table not displayed in partitioned fact tables Columns in the fact table other than primary or foreign key columns, only appear in the partitioned fact tables when they are attached to metrics or attributes. To attach a column to a metric or an attribute, use the object property sheet in the Multidimensional Hierarchy.
|
The result of partitioning is the same, regardless of the type of schema.
In this example, a central fact table (Sales) is linked to the dimension tables Customer, Product, Store and Time.
To partition data so that you can quickly access data on sales for the years 1995 and 1996, you select the attribute checkbox for Year.
To access data on sales of a particular category of products for these years, you also select the Category checkbox.
To specify the years 1995 and 1996, you enter the values 1995 and 1996 in the List of Values for the Year attribute.
To specify data for deluxe and standard categories only, you enter the corresponding values in the List of Values for the Category attribute.
|
|