Attribute Member Keys - Pt II: Composite Keys - Page 5
September 19, 2008
Source Property: KeyColumns
The value we select for the KeyColumns property specifies a column or columns within the underlying data source. The KeyColumns property specifies the column(s) containing the member key(s).
1. Click the box to the immediate right of the KeyColumns label, just beneath the expanded CustomRollupPropertiesColumn label, within the expanded Source properties group of the Properties pane.
We note that the setting box currently contains (Collection), instead of a Table.Column name (such as that which we see in the NameColumn setting just below the KeyColumns setting we currently occupy) an indicator that this is a composite key.
2. Click the ellipses (... ) button that appears on the right edge of the KeyColumns property box, as depicted in Illustration 10.
The DataItem Collection Editor appears, as shown in Illustration 11.
As we noted in Part I, the DataItem Collection Editor is used throughout the Business Intelligence Development Studio to edit the collection of data items associated with the KeyColumns property of various Analysis Services objects. The Members pane on the left side of the dialog lists the data items contained by the collection. Here, we can add or remove data items to the Members pane, as well as move the items up or down as appropriate to meet our business requirements.
We notice that two members appear within the Members pane, on the left side of the DataItem Collection Editor (as opposed to the single member that appears for a simple key). Because both members have similar settings in the Source properties group, we will only examine those of the 0 member, DimTime.CalendarYear, understanding that the settings for the 1 member, DimTime.CalendarQuarter (and other members, were they required to create a unique key, as discussed earlier), would be need to be set appropriately to specify its origin in the underlying data, etc.
3. Ensuring that the 0 member (DimTime.CalendarYear) is selected within the Members pane, expand the Misc group in the Properties pane (right half of the Editor) by clicking the + sign that appears to the immediate left of the Misc label, as depicted in Illustration 12.
4. Expand the Source properties group in the Properties pane, atop the list that appears under the newly expanded Misc group, by clicking the + sign that appears to the immediate left of the Source label.
The Properties pane displays a list of properties available for the data item that is selected within the Members pane (left half of the Editor), as shown in Illustration 13.
As we can see, the first of the displayed DimTime.CalendarYear DataItem properties, Source, expands to make available the TableID and the ColumnID boxes, where we specify the location of the key within the underlying database.
5. Click the box to the immediate right of the TableID label, just beneath the expanded Source group label, to enable the downward-pointing selector button.
6. Click the downward arrow selector button, to expose the tables for selection, as partially depicted in Illustration 14.
Once we have selected the TableID, we can select from a context-sensitive list of columns via the ColumnID selector immediately underneath the TableID selector, as partially shown in Illustration 15.
7. Leaving both Source subproperties at their previously established settings, click the box to the immediate right of the DataType label, just beneath the expanded Source ColumnID property, once again to enable the downward-pointing selector button.
8. Click the downward arrow selector button, to expose the types for selection, as partially depicted in Illustration 16.
We mentioned in Part I that the data type options within Analysis Services 2005 have been expanded over those of previous versions. The DataType property allows us to convert the data types from those applicable to the data within the underlying relational database to different data types that we might require for the corresponding member data within Analysis Services. We are thus afforded yet another element of versatility between these two layers of the integrated business intelligence solution.
9. Leaving the DataType property at its previously established setting, click the DataSize label, just beneath the DataType property label, simply to rest it there.
The DataSize property allows us to specify (for either binary or text data) a size (in bytes and characters, respectively). The setting we see in our example is 4. (The default is 255 characters anytime we do not specify size.)
10. Leaving the DataSize property at its previously established setting, click the box to the immediate right of the NullProcessing label, just beneath the DataSize property, once again to enable the downward-pointing selector button.
11. Click the selector button, to expose the five options for NullProcessing selection, as shown in Illustration 17.
Here we can select a value to dictate the manner in which Analysis Services processes null attribute member data. These values are explained in detail in Table 1.
12. Leaving the NullProcessing property at its previously established setting, click the box to the immediate right of the Collation label, just beneath the NullProcessing property, this time to enable the ellipses (...) button to its right.
13. Click the ellipses (...) button, to expose the Define Collation dialog, which appears as depicted in Illustration 18.