Dimension Attributes: Introduction and Overview, Part IV

Thursday May 29th 2008 by William Pearson
Share:

Business Intelligence Architect Bill Pearson continues his introduction to dimension attributes, focusing upon the Parent-Child group of attribute properties. This article continues our subseries surrounding components of the Analysis Services dimensional model.

About the Series ...

This article is a member of the series Introduction to MSSQL Server Analysis Services. The series is designed to provide hands-on application of the fundamentals of MS SQL Server Analysis Services (“Analysis Services”), with each installment progressively presenting features and techniques designed to meet specific real-world needs. For more information on the series, please see my initial article, Creating Our First Cube. For the software components, samples and tools needed to complete the hands-on portions of this article, see Usage-Based Optimization in Analysis Services 2005, another article within this series.

Introduction

In Dimensional Model Components: Dimensions Parts I and II, we introduced the dimensional model in general, noting its wide acceptance as the preferred structure for presenting quantitative and other organizational data to information consumers. We then began our examination of dimensions, the analytical “perspectives” upon which the dimensional model relies in meeting the primary objectives of business intelligence, including its capacity to support:

  • the presentation of relevant and accurate information representing business operations and events;
  • the rapid and accurate return of query results;
  • “slice and dice” query creation and modification;
  • an environment wherein information consumers can pose questions quickly and easily, and achieve rapid results datasets.

In Dimension Attributes: Introduction and Overview, Part III, the third of our multi-part article introducing dimension attributes, we continued our current subseries focusing upon dimensional model components, with an objective of discussing the associated concepts, and of providing hands-on exposure to the properties supporting each. We reviewed our initial introduction to the dimensional model and summarized its role in meeting the primary objectives of business intelligence. Next, we provided a brief overview of dimension attributes in general.

Having covered the general characteristics and purposes of attributes, we fixed our focus upon the properties underlying them, based upon the examination of a representative attribute within our sample cube. We discussed the Misc group of properties, looking forward to subsequent parts of our introduction and overview of dimension attributes, where we explore the remaining attribute properties groups. In this part of our overview of attributes, our examination will include:

  • A continuation of our introduction to dimension attributes from a conceptual perspective;
  • Extended discussion surrounding the general characteristics of attributes;
  • An examination of the Parent-Child group of attribute properties (including what these properties define and support, and how we can manage them).

Dimensions in Analysis Services: Attributes (continued ...)

We learned, in Dimensional Model Components: Dimensions Parts I and II, that dimensions form the foundation of the dimensional model. They represent the perspectives of a business or other operation, and reflect the intuitive ways that information consumers need to query and view data. We noted that we might consider dimensions as nouns that take part in, or are otherwise associated with, the verbs (or actions / transactions undertaken by the business) that are represented by the facts or measures contained within our business intelligence systems.

We discovered in these two articles that, within the Analysis Services model, database dimensions underlie all other dimensions, whose added properties distinguish them from the database dimensions they reference, within the model. Each dimension within our model contains one or more hierarchies. As we will learn in later articles of this subseries, two types of hierarchies exist within Analysis Services: attribute hierarchies and user (sometimes called “multi-level”) hierarchies. For purposes of most of our articles, the term “attribute” means the same thing as “attribute hierarchy”. (We will examine user hierarchies, to which we will simply refer as “hierarchies,” in subsequent articles.)

As we noted in Dimension Attributes: Introduction and Overview, Part II, we might summarize our introduction in earlier articles of this subseries by extending the metaphor we have used in describing dimensions as nouns and measures as verbs, and consider attributes as somewhat similar to adjectives. That is, attributes help us to define with specificity what dimensions cannot define by themselves. Dimensions alone are like lines in geometry: they don't define “area” within multidimensional space, nor do they themselves even define the hierarchies that they contain. A database dimension is a collection of related objects called attributes, which we use to specify the coordinates required to define cube space.

As we discussed in Part I, within the table underlying a given dimension (assuming a more-or-less typical star schema database) are individual rows supporting each of the members of the associated dimension. Each row contains the set of attributes that identify, describe, and otherwise define and classify the member upon whose row they reside. For instance, a member of the Patient dimension, within the Analysis Services implementation for a healthcare provider, might contain information such as patient name, patient ID, gender, age group, race, and other attributes. Some of these attributes might relate to each other hierarchically, and, as we shall see in subsequent articles of this subseries (as well as within other of my articles), multiple conceptual hierarchies of this sort are common in real-world dimensions.

As we further discussed in Part I, Dimensions and dimension attributes should support the way that management and information consumers of a given organization describe the events and results of its business operations. Because we maintain dimension and related attribute information within the database underlying our Analysis Services implementation, we can support business intelligence for our clients and employers even when these details are not captured within the system where transaction processing takes place. Within the analysis and reporting capabilities we supply in this manner, dimensions and attributes are useful for aggregation, filtering, labeling, and other purposes.

In looking forward to each of our practice sessions in Parts I, II and III, we stated that, in addition to a few key values, several properties (each of which has, in its own right, multiple possible values) are associated with each attribute residing in a given model. We got some hands-on exposure to some of these key values and properties in the practice session – focusing upon the Advanced, Basic and Misc properties groups, respectively, of attribute properties (including what they define and support, and how we can manage them). We will examine, in like manner, the Parent-Child and Source groups of attribute properties in the practice section of this (where we focus upon the Parent-Child properties) and the subsequent article.

Before we get started working within a sample cube clone, we will need to prepare the local environment for the practice session. We will take steps to accomplish this within the section that follows.

Preparation: Locate and Open the Sample Basic UDM Created Earlier

In Dimensional Model Components: Dimensions Part I, we created a sample basic UDM within which to perform the steps of the practice sessions we set out to undertake in the various articles of this subseries. Once we had ascertained that the new practice database appeared to be in place, and once we had renamed it to ANSYS065_Basic AS DB, we began our examination of dimension properties. We will continue our examination of attributes within the same practice environment, which we will access taking the following steps within the SQL Server Business Intelligence Development Studio, as we did within Dimensional Model Components: Dimensions Parts I, II, and III.

NOTE: Please access the UDM which we prepared in Dimensional Model Components: Dimensions Part I before proceeding with this article. If you have not completed the preparation to which I refer in the previous article, or if you cannot locate / access the Analysis Services database with which we worked there, please consider taking the preparation steps provided in Dimensional Model Components: Dimensions Part I before continuing, and prospectively saving the objects with which you work, so as to avoid the need to repeat the preparation process we have already undertaken for subsequent related articles within this subseries.

1.  Click Start.

2.  Navigate to, and click, the SQL Server Business Intelligence Development Studio, as appropriate.

We briefly see a splash page that lists the components installed on the PC, and then Visual Studio .NET 2005 opens at the Start page.

3.  Close the Start page, if desired.

4.  Select File -> Open from the main menu.

5.  Click Analysis Services Database ... from the cascading menu, as depicted in Illustration 1.


Illustration 1: Opening the Analysis Services Database ...

The Connect to Database dialog appears.

6.  Ensuring that the Connect to existing database radio button is selected, type the Analysis Server name into the Server input box atop the dialog.

7.  Using the selector just beneath, labeled Database, select ANSYS065_Basic AS DB, as shown in Illustration 2.


Illustration 2: Selecting the New Basic Analysis Services Database ...

8.  Leaving other settings on the dialog at default, click OK.

SQL Server Business Intelligence Development Studio briefly reads the database from the Analysis Server, and then we see the Solution Explorer populated with the database objects. Having overviewed dimension attributes in previous articles, we will continue to get some hands-on exposure to properties for an example attribute, from within our sample UDM.

Procedure: Examine Further Attribute Properties in Analysis Services 2005

Having begun an examination of the properties that define and support a representative attribute in Dimension Attributes: Introduction and Overview, Parts I, II, and III, we focused upon the Advanced, Basic and Misc groups, respectively, of attribute properties within our practice sessions. In the practice procedures that follow, we will examine the properties that are classified within the Parent - Child group of the same attribute with which we worked in Part I, namely Geography Key, one of the attributes belonging to the Geography dimension.

We will conduct our practice sessions within the SQL Server Business Intelligence Development Studio, from which we will perform our examination of attribute properties within our Analysis Services database, ANSYS065_Basic AS DB. In Dimension Attributes: Introduction and Overview, Part I, we noted that, to access the properties settings for attributes within a representative dimension, we needed to open that dimension within the Dimension Designer first. (Recall that, because database dimensions, and not cube dimensions, contain attributes, we access properties supporting dimension attributes via the Dimension Designer, and not the Cube Designer.)

1.  Within the Solution Explorer, right-click the Geography dimension (expand the Dimensions folder as necessary).

2.  Click Open on the context menu that appears, as depicted in Illustration 3.


Illustration 3: Opening the Dimension via the Dimension Designer ...

The tabs of the Dimension Designer open.

3.  Click the Dimension Structure tab, if we have not already arrived there by default.

We noted in Part I that five attributes appear within the Attributes pane of the Dimension Structure tab. The attributes belonging to the Geography dimension appear as shown in Illustration 4.


Illustration 4: The Member Attributes, Geography Dimension

We will continue our examination of the properties associated with attributes by re-entering the Geography Key attribute, as before.

Overview of the Attribute Properties

As we noted in previous articles of this subseries, Analysis Services exposes many properties that determine how dimensions and dimension attributes function. We can review the properties for our selected attribute, Geography Key, within our sample UDM, by taking the following steps.

1.  Within the Attributes pane of the Dimension Structure tab, right-click the Geography Key attribute.

2.  Click Properties on the context menu that appears, as depicted in Illustration 5.


Illustration 5: Select Properties from the Context Menu ...

The Properties pane appears for the Geography Key attribute. (The Properties pane likely appeared when we selected the Geography Key attribute dimension within the Dimensions pane, by default, below the Solution Explorer. The design environment can, of course, be customized in many ways to accommodate our local development needs.)

We can, at this stage, see the thirty DimensionAttribute properties for the Geography Key attribute within the Properties pane. We examined the first eleven properties, the members of the Advanced properties group, in Dimension Attributes: Introduction and Overview, Part I. We noted that these properties include the following:

  • AttributeHierarchyDisplayFolder
  • AttributeHierarchyEnabled
  • AttributeHierarchyOptimizedState
  • AttributeHierarchyVisible
  • DefaultMember
  • DiscretizationBucketCount
  • DiscretizationMethod
  • EstimatedCount
  • IsAggregatable
  • OrderBy
  • OrderByAttribute

The five Basic properties, which appear underneath the Advanced properties group, and which we reviewed in Part II, include the following:

  • Description
  • ID
  • Name
  • Type
  • Usage

The Misc group, which we explored in Part III, comes next, and includes the following four properties:

  • AttributeHierarchyOrdered
  • GroupingBehavior
  • InstanceSelection
  • MemberNamesUnique

Beneath the Misc group in the Properties pane lies the Parent-Child group, which we examine in this article, and which includes the following five properties:

  • MembersWithData
  • MembersWithDataCaption
  • NamingTemplate
  • RootMemberIf
  • UnaryOperatorColumn

Finally, the five Source properties (which we explore in the next article of this subseries), appearing underneath the Parent-Child properties group, include the following:

  • CustomRollupColumn
  • CustomRollupPropertiesColumn
  • KeyColumns
  • NameColumn
  • ValueColumn

The Properties pane for the Geography Key attribute, with the Parent-Child properties group (which we will examine in the practice session that follows) expanded, appears as shown in Illustration 6.


Illustration 6: The Properties Pane for the Geography Key Attribute (Parent-Child Properties Expanded)

Having finished our overview of the Misc attribute properties in Part III, we will examine the attribute properties group that next appears within the Properties pane for Geography Key.

Examine Attribute Properties: Parent-Child Properties

The Parent-Child properties group appears just underneath the Misc properties within the Properties pane. In this section, we will discuss the purpose of each property within the Parent-Child group for our chosen attribute example. As we did for the other properties groups, we will discuss / examine, in most cases, possible settings with which we can come into contact within the context of each property.

Each of the property values within the Parent-Child properties group is relevant only when the Usage property (a member of the Basic properties group we discuss in the section we dedicate to the subject above) for the attribute under consideration is set to Parent, meaning that a parent-child hierarchy has been defined. When the Usage property is set to Regular or Key, this setting is ignored by Analysis Services.

Parent-Child Property: MembersWithData

The MembersWithData property specifies the manner of treatment of fact data that is associated with non-leaf members. In effect, the value selected for the property (there are two options) dictates whether data members for non-leaf members in the parent attribute are displayed.

1.  Click the downward arrow selector button that appears to the immediate right of the MembersWithData property label button, to expose the two options for selection, as depicted in Illustration 7.


Illustration 7: MembersWithData Property Value Selection Options

The two selection options include NonLeafDataHidden and NonLeafDataVisible, as we can see in the illustration above.

Parent-Child Property: MembersWithDataCaption

MembersWithDataCaption affords us a means of specifying, if we desire to do so, a string. The purpose of the string is to serve as a template, to be used by parent attributes, upon which captions, for system-generated data members within the parent attribute, can be based.

Parent-Child Property: NamingTemplate

The NamingTemplate property allows us to specify the manner in which levels are named in a parent-child hierarchy constructed from the parent attribute. This is accomplished via a Level Naming Template we can access at the property level, as we shall see in the next step.

2.  Click the ellipses (“ .... “) button that appears to the immediate right of the NamingTemplate property label, as shown in Illustration 8.


Illustration 8: Click the Ellipses ( “... “) Button to the Right of the NamingTemplate Property

The Level Naming Template dialog appears, as depicted in Illustration 9.


Illustration 9: The Level Naming Template Dialog Appears

The Level Naming Template affords us a means of specifying the level names displayed to information consumers as they browse the cube that houses the dimension displayed in the dialog box title bar.

Because the sample attribute with which we are working is not a member of a parent-child dimension, the dialog box that we see is not typical. A parent-child dimension always contains a single metadata level (excluding the “All” level, if any), which typically produces multiple displayed levels. Because the number of displayed levels is not always known when the dimension is created or edited, and because this number can change – if and when the data in the dimension table is updated – the Level Naming Template dialog box is made available to allow us to specify the names applied to the displayed levels.

NOTE: For more information on parent-child dimensions, together with more details of the property settings that support these dimensions and their member attributes, see other articles of my Introduction to MSSQL Server Analysis Services series at Database Journal.

3.  Click the Cancel button at the bottom of the Level Naming Template dialog box to dismiss the dialog.

Parent-Child Property: RootMemberIf

The value we select for the RootMemberIf property specifies the criteria by which members of the highest level (excluding the “All” level) are identified.

4.  Click the downward arrow selector button that appears to the immediate right of the RootMemberIf property label, to expose the four options for selection, as shown in Illustration 10.


Illustration 10: RootMemberIf Property Value Selection Options

The four selection options include the following:

  • ParentIsBlankSelfOrMissing: (Default) Only members that meet one or more of the conditions described for ParentIsBlank, ParentIsSelf, or ParentIsMissing are treated as root members.
  • ParentIsBlank: Only members with a null, a zero, or an empty string in the key column or columns are treated as root members.
  • ParentIsSelf: Only members with themselves as parents are treated as root members.
  • ParentIsMissing: Only members with parents that cannot be found are treated as root members.

The behavior of the RootMemberIf property in determining how the root or topmost members of a parent-child hierarchy are identified, is, therefore, dependent upon which of the selections above is made. The default, as noted above, is ParentIsBlankSelfOrMissing.

Parent-Child Property: UnaryOperatorColumn

The value we supply to UnaryOperatorColumn is used to specify the column within the underlying data source that provides unary operators.

5.  Click the downward arrow selector button that appears to the immediate right of the UnaryOperatorColumn label, to expose the two basic options for selection, as depicted in Illustration 11.


Illustration 11: UnaryOperatorColumn Property Value Selection Options

The two selection options that are available are “None” and “New.”

6.  Select the “New” option within the selector.

The Object Binding dialog appears. As most of us are well aware, we use the Object Binding dialog box in Business Intelligence Development Studio to define bindings between the property of an Analysis Services object and a table / column in a data source view. The Object Binding dialog box can be called by selecting (new) from the drop-down list for the value of the following properties of an Analysis Services object in the Properties window of Business Intelligence Development Studio:

  • NameColumn;
  • ValueColumn;
  • CustomRollupColumn;
  • CustomRollupPropertiesColumn;
  • UnaryOperatorColumn (where we currently rest).

Using the Object Binding dialog, we select Binding type, Source table and Source column as appropriate to our needs, and then save our changes. Because we are not dealing with a Parent-Child dimension as our practice example, we will simply dismiss the dialog via the Cancel button, as we have done in similar situations before.

7.  Click the Cancel button at the bottom of the Object Binding dialog box to dismiss the dialog.

Having completed our review of the Parent-Child attribute properties, we will conclude this part of our examination of attribute properties. We will extend our introductory examination of dimension attributes, specifically continuing our discussion with the Source group of properties, within the next article of this series.

NOTE: Please consider saving the project we have created to this point for use in subsequent related articles of this subseries. Doing so will allow us to avoid the need to repeat the preparation process we have undertaken, initially, to provide a practice environment.

8.  Select File -> Save All to save our work, up to this point, within the originally chosen location, where it can be easily accessed for our activities within subsequent articles of this subseries.

9.  Select File -> Exit to leave the design environment, when ready, and to close the Business Intelligence Development Studio.

Conclusion

In this, the fourth part of a multi-part article introducing dimension attributes, we continued our current subseries focusing upon dimensional model components, with an objective of discussing the associated concepts, and of providing hands-on exposure to the properties supporting each. We reviewed our initial introduction to the dimensional model and summarized its role in meeting the primary objectives of business intelligence. Next, we provided a brief review of dimension attributes in general.

We overviewed many of the general characteristics and purposes of attributes, including their names, and the names of the groups within which each is classified. We then continued our focus upon the properties underlying them, based upon the examination of a representative attribute within our sample cube. In this article, we extended our discussion beyond the Advanced, Basic and Misc groups of properties, which we began in Part I, and continued in
Part II and Part III, respectively, and examined the attribute properties belonging to the Parent-Child group, including what they define and support, and how we can manage them. We will continue our examination of attribute properties, this time for those that constitute the membership of the Source properties group, in the next part of this article.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved