Attribute relationships between attributes in a user-defined hierarchy :
You have learned about the content in this tutorial. Now you can organize the Attribute Hierarchy to a level within the user hierarchy to provide navigation paths for users in cubes. User hierarchies can represent natural hierarchies (such as cities, counties, states, provinces, autonomous regions, and countries ), you can also specify only the navigation path (such as the employee name, position, and department name ). The two types of user hierarchies are the same for users who navigate in hierarchies.
When using a natural hierarchy, if you establish an attribute relationship between the attributes at the composition level, Microsoft SQL Server 2005 Analysis Services (SSAs) you can use the aggregation of an attribute to obtain the result of the relevant attribute. If there is no defined relationship between attributes, analysis services aggregates all non-key attributes based on the key attributes. You should also understand that when defining such a link, you can specify the link as an elastic or rigid link. If you define the link as rigid, analysis services retains the aggregation when updating the dimension. If the defined rigid relationship is changed in the actual process, analysis services will generate an error during the process unless the dimension is fully processed. Specifying appropriate link and Link Attributes can improve query and processing performance. For more information, see And .
In each task of this topic, you define attribute relationships for the attributes in the natural user hierarchy of the Analysis Services Tutorial Project. These hierarchies include the "customer region" hierarchies in the "customer" dimension, the "sales region" hierarchies in the "sales region" dimension, and the "Product Model Series" hierarchies in the "product" dimension. and the "accounting time" and "calendar time" hierarchies in the "time" dimension. All these user hierarchies are natural hierarchies.
Define attribute relationships for properties in the "customer's region" Hierarchy
Define attribute relationships for properties in the "customer's region" Hierarchy
-
-
Switch to the dimension designer of the customer dimension, and click"Dimension Structure"Tab.
In"Hierarchy and level"In the pane, note that"Customer region"The Level in the User-Defined hierarchy. This level is currently only the user's drill-down path-no relationships are defined between levels or attributes.
-
In"Attribute"In the pane, expand"Region".
Note that there are four attribute relationships used to link the non-key attributes of the geography table to the key attributes of the geography table.
-
-
In"Attribute"In the pane, expand"Full name".
Note that the "region" attribute is related to the "full name" attribute. Note that the "zip code" attribute is indirectly linked to the "full name" attribute through the "region" attribute, because the "zip code" is linked to the "region" attribute, the "region" attribute is linked to the "full name" attribute.
-
-
Set"Zip code"Attribute Link"Region"Drag property"Full name"Attribute"<New property relationship>"Mark.
The "zip code" attribute is directly related to the "full name" attribute. In the "properties" window, note thatRelationshiptypeSet propertyFlexible. This is correct because the relationship between the customer and the zip code may change over time.
-
In"Attribute"In the pane, expand"Zip code"Attribute.
The "city/county" attribute is currently related to the "zip code" attribute through the "region" attribute, rather than directly related.
-
-
Set"City/county"Attribute Link"Region"Drag property"Zip code"Attribute"<New property relationship>"Mark.
The "city/county" attribute is now directly related to the "zip code" attribute. In the "properties" window, note thatRelationshiptypeSet propertyFlexible. This is correct because the relationship between the city/county and the zip code may change over time.
-
-
In"Attribute"In the pane, expand"City/county".
"Province/city/Autonomous Region" attributes are currently related to "city/county" attributes through "Full name" and "region" attributes.
-
Set"Province/city/Autonomous Region name"Attribute Link"Region"Drag property"City/county"Attribute"<New property relationship>"Tag, and thenRelationshiptypeProperty value changedRigid.
LinkRelationshiptypeAttribute value should be setRigidBecause the relationship between cities, counties, states, provinces, and autonomous regions will not change over time.
-
-
In"Attribute"In the pane, expand"Province/city/Autonomous Region", Set"Country/region-region"Attribute Link"Region"Drag property"Province/city/Autonomous Region"Attribute"<New property relationship>"Tag, and thenRelationshiptypeProperty value changedRigid.
LinkRelationshiptypeAttribute value should be setRigidBecause the relationship between the state, province, and autonomous region and the country or region does not change over time.
-
In"Attribute"In the pane, delete"Region"Attribute.
This attribute is no longer required.
|
| In this task, you learn to move the property relationship from the "region" property to another property, rather than creating a property relationship for each property. Defining redundant links usually makes no sense and increases unnecessary processing time. |
Define property relationships for properties in the sales region hierarchy
Define property relationships for properties in the sales region hierarchy
-
-
Open"Sales region"Dimension designer, and then click"Dimension Structure"Tab.
-
-
In the hierarchy and level pane, click the sales area hierarchy, and then expand"Region of the sales region"And"Country of the sales region".
Please note that,"Sales region group"Link directly to key properties"Region of the sales region"Instead of linking"Country of the sales region"Attribute.
-
drag "sales region group" from "sales region Region" to The flag of the attribute of the "country of the sales region.
"sales region group" is now linked to "country of the sales region", and "country of the sales region" is now linked to "region of the sales region ". The relationshiptype attribute of each link above should be set to Flexible , because the regional grouping in a country/region may change over time, and the grouping in the country/region may change over time.
note you can set attribute relationships for user-defined hierarchies in the properties pane or in the hierarchies and levels pane.
define attribute relationships for attributes in the" Product Model Series "Hierarchy
define attribute relationships for attributes in the" Product Model Series "Hierarchy
-
open the dimension designer for the product dimension, and click the dimension structure tab.
-
In the "attributes" pane, expand the model name attribute and "Product Name" attribute.
-
drag "product series" from "Product Name" to "Model " of the attribute.
the relationshiptype attribute value of this attribute relationship should be set to Flexible , because the relationship between product series and Model names may change over time.
Define attribute relationships for attributes in the "accounting time" Hierarchy
Define attribute relationships for attributes in the "accounting time" Hierarchy
-
-
Switch"Time"Dimension designer, and then click"Dimension Structure"Tab.
-
-
In"Attribute"In the pane, expand the following attributes:
- Date
- Month name
- Accounting quarter
- Accounting half period
-
Set"Accounting quarter"Attribute Link"Date"Drag property"Month name"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
-
Set"Accounting half period"Attribute Link"Date"Drag property"Accounting quarter"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
-
Set"Fiscal Year"Attribute Link"Date"Drag property"Accounting half period"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
Define attribute relationships for attributes in the "calendar time" Hierarchy
Define attribute relationships for attributes in the "calendar time" Hierarchy
-
-
In"Attribute"In the pane, expand"Month name","Calendar quarter"And"Half calendar period".
-
Set"Calendar quarter"Attribute Link"Date"Drag property"Month name"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
-
Set"Half calendar period"Attribute Link"Date"Drag property"Calendar quarter"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
-
Set"Calendar year"Attribute Link"Date"Drag property"Half calendar period"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
Define attribute relationships for attributes in the "region" Hierarchy
Define attribute relationships for attributes in the "region" Hierarchy
-
-
Open the dimension designer for the "region" dimension, and then click"Dimension Structure"Tab.
-
-
In"Attribute"In the pane, expand the following attributes:
- City/County
- Region keywords
- Zip code
- Province/city/Autonomous Region
-
Set"City/county"Attribute Link"Region keyword"Drag property"Zip code"Attribute"<New property relationship>"Mark.
Because the postal code of a city or county may change over timeRelationshiptypeThe corresponding property value isFlexible.
-
-
Set"Province/city/Autonomous Region"Attribute Link"Region keyword"Drag property"City/county"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
Set"Country/region-region"Attribute Link"Region keyword"Drag property"Province/city/Autonomous Region"Attribute"<New property relationship>"Tag, and thenRelationshiptypeSet the property valueRigid.
-
-
Set the "region keyword" attribute to invisible, unoptimized, and unordered.
-
-
Deploy the Analysis Services Tutorial Project.