设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

BCM 门户 IT世界 资料备录 查看内容

MS SSAS 2008 Unleashed - Chapter 9. Multidim - Models and BI Development Studio

2012-8-16 15:24| 发布者: demo| 查看: 1248| 评论: 0

摘要: Chapter 9. Multidimensional Models and Business Intelligence Development Studio In This Chapter Creating a Data SourceDesigning a Data Source ViewDesigning a DimensionDesigning a CubeConfiguring and D ...
Designing a Dimension


Designing a Dimension

After you have created your DSV, you are ready to start creating the dimensions for your multidimensional model. For details about dimensions, see Chapter 5, “Dimensions in the Conceptual Model.”

Creating a Dimension

Review the names of the dimensional tables before you start designing your dimensions.

You use the Dimension Wizard to create your dimensions.

Launch the Dimension Wizard

1.
In the Solution Explorer of BI Dev Studio, right-click the Dimensions node.

2.
From the menu that appears, select New Dimension. Bypass the Welcome page of the wizard.


1.
On the Select Creation Method page, select Use an Existing Table, as shown in Figure 9.6.

Figure 9.6. Select the Build Dimension Using a Data Source option on the Select Build Method page.


2.
On the Specify Source Information page, under Data Source View, select a DSV to base your dimension. Choose a main table for your dimension (from the Main Table drop-down list). Under Key Columns, you will see a key column suggested for you by BI Dev studio based on the key of the relational table. You can change that column or add more columns if you would like a key attribute of your dimension to be based on the composite key.

You can change the member name column for your key attribute in the Name column drop-down list.

When you have everything as you like it, click Next.

3.
If the Dimension Wizard detects that one or more tables are related to the selected dimension table, your next page will be the Select Related Tables page, where you can select additional tables. When you have selected your tables, click Next. (This page will not appear if there is only one possible dimension table in your DSV.)

4.
On the Select Dimension Attributes page, you can see the attributes that Analysis Services suggests in the Attribute Name column. (That column contains all the attributes found in the dimension tables.) You can reject the suggestions and substitute your own, and you can change the names of the attributes, as shown in Figure 9.7.

Figure 9.7. Select the dimension attributes on the Select Dimension Attributes page.


In the Attribute Key Column, you will find the key column for the attribute. If you select a key column, you will enable a drop-down list from which you can change the column.

In the Attribute Name Column, you will find the name column for the attribute. Just like with the key column, you can select a new column.

When satisfied with all your selections and changes, click Next.

5.
On the Completing the Wizard page, you can review the dimension structure and name your dimension. After you click Finish, the Dimension Editor appears with your new dimension.

In Analysis Services 2008, the Dimension Wizard has been greatly simplified. It does not suggest that you choose the dimension type or that you start building hierarchies. You will use Dimension Editor to finish your dimension design.

Modifying an Existing Dimension

Now we are going to use the Dimension Editor in BI Dev Studio to modify the Customer dimension. Double-click the Customer dimension in the Solution Explorer, and the Dimension Editor will open, with the Dimension Structure tab showing, as shown in Figure 9.8.

Figure 9.8. Start with the Dimension Structure tab in the Dimension Editor.


  • The left pane contains the name of the dimension with a list of the all the attributes for the dimension. Select the dimension to see its properties in the Properties pane. Select an attribute to see its properties there.

  • The Hierarchies and Levels pane contains the user-defined hierarchies, each one in a table with the names of its levels.

  • The Data Source View pane, on the right, contains the dimension tables with their columns.

Working with Attributes

You can create a new attribute on the Dimension Structure tab by dragging a column from a table in the Data Source View pane to the Attributes pane. You can modify an existing attribute on the Dimension Structure tab by selecting an attribute in the Attributes pane; its properties appear in the Properties pane in the lower-right corner. You can change the properties there.

When you create a dimension in the Dimension Wizard, you do not have the opportunity to define the relationships between the dimension attributes. We strongly recommend that you define the relationships between the attributes in your dimension before you use it in the cube. Figure 9.9 shows the Attribute Relationship tab of the Dimension Editor as it appears when you are working on defining relationships. Attribute Relationship tab is new in Analysis Services 2008. It shows you the relationship chains and enables you to easily create attribute relationships.

Figure 9.9. Define attribute relationships in the Dimension Editor.


To create a new attribute relationship object, in the Attribute Relationship tab drag one attribute on top of another. The attribute that you want to drag to another should be the “more granular” (in other words, the attribute that will appear higher in the level hierarchy). For example, drag the City attribute on top of State Province attribute to create a relationship.

By default, Analysis Services creates the RelationshipType property as Flexible. You can see a relationship’s properties in the Properties pane if you select the relationship in the main pane. Change the property to Rigid if you are sure that the members of the City attribute are not going move to another state. Specifying a Rigid relationship guarantees that an aggregation based on attributes with rigid relationships will not get dropped after an incremental update of the dimension.

If you made a mistake and dragged a wrong attribute and created an unwanted relationship, you have an option to delete an attribute relationship by selecting an arrow in a flow chart diagram in the main drawing pane or by selecting a relationship in the Attribute Relationship pane in the lower middle.

In many cases, as in our example, you want the Name column and the Key column to be different. We have already done this for the Customer attribute in the Customer dimension. Here’s how we did it:

1.
Select the Customer attribute.

2.
In the Properties pane, scroll down to the Source. In the drop-down box of the NameColumns property, select (new) and choose a new column in the Object Binding dialog box.

Working with Hierarchies

When an end user connects to the server, typically he will see list of hierarchies and a list of the levels in each hierarchy. From these lists, he can choose what sort of data he wants to view.

There are two types of hierarchy in Analysis Services: attribute hierarchies and user hierarchies.

An attribute hierarchy is a hierarchy that contains a single level with the same name as the attribute it is based on. Attribute hierarchies provide you with the flexibility to arrange a report in a number of ways. For example, you can place a Gender level from the Gender attribute hierarchy on top of the Age level from the Age attribute hierarchy.

You are going to pay a price for this flexibility. If the only hierarchies you have in your dimension are attribute hierarchies, you need to define ways to drill down from one level to another. Otherwise, the performance of your system will be significantly degraded.

For the attributes that are not queried often, we recommend that you set the AttributeHierarchyOptimizedState property to NotOptimized.

To Hide an Attribute Hierarchy from the End User

1.
Select the attribute in the Attributes pane of the Dimension Editor.

2.
In the Properties pane, change the attribute property AttributeHierarchyVisible to False.


User hierarchies are the hierarchies you create in your dimension by dragging and dropping attributes into the Hierarchies and Levels pane in the Dimension Editor. (You can accomplish the same thing by editing the DDL.) Go back to Figure 9.8 to see the Customer dimension with a single hierarchy (Customers). The hierarchy contains levels, which we created by dragging attributes into the hierarchy.

There are two types of user hierarchies: natural hierarchies and unnatural hierarchies. See Chapter 5, “Dimensions in the Conceptual Model,” for details about natural and unnatural hierarchies.

In a natural hierarchy, every attribute is related to its parent attribute in the hierarchy. An attribute relationship object points to the parent of an attribute. In our example of the Customers hierarchy in Figure 9.9, you see the City attribute is related to the State Province attribute.

Although unnatural hierarchies give you a great deal of flexibility, they lead to poor performance. It is always better to create natural hierarchies in your dimensions.

Working with Translations

Analysis Services offers powerful multilingual support for multidimensional models. You can define translations for every visible caption in your dimensions and in your cubes. You use the Translations tab in the Dimension Designer to define translations.

We will turn once again to our FoodMart 2008 sample. Click the Translations tab in the Dimension Designer and you should see (in Figure 9.10) the way we have initially defined our translations.

Figure 9.10. Define translations for your dimension on the Translations tab.


For FoodMart 2008, we have defined a Russian translation for the Customer dimension. All the authors speak Russian, so that was our first choice. In the Properties pane, you can see the locale identifier for the translation selected for the City attribute: 1049. That is the identifier for Russian. You would get the same value for Translation for any of the attributes of the Customer dimension.

When your users browse the cube and see the City attribute in Russian, they probably want to see the name of each city also in Russian. They want to see not only the City attribute caption translated to Russian, but also all the members for the City attribute translated to Russian. To accomplish this, you specify that the CaptionColumn property points to the column in the relational database that contains the Russian translations of each of the member cities.

Using the Browser Tab

Click the Browser tab to browse your dimension. When you open the Browser tab, you will see one of the hierarchies of your dimension. At the top of the screen is a text box titled Hierarchy, with a drop-down list of the hierarchies in your dimension. Another text box (Language) contains a drop-down list of languages. This drop-down list is likely to contain more languages than you have defined for your dimension. Select a language to view the hierarchy in the selected language.



鲜花

握手

雷人

路过

鸡蛋

相关阅读

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2025-12-13 22:14 , Processed in 0.014661 second(s), 17 queries .

Supported by Best Deal Online X3.5

© 2001-2025 Discuz! Team.

返回顶部