Building Attribute Dimensions and Associating Attributes

When the data source for an Essbase dimension build contains attribute information, use one or more load rules to build attribute dimensions and to associate attributes with members of their base dimensions.

You can use load rules to build attribute dimensions dynamically, to add and delete members, and to establish or change attribute associations.

Working with attributes involves the following operations:

  • If the base dimension does not exist, you must build it.

  • You must build the attribute dimension.

  • You must associate members of the base dimension with members of the attribute dimension.

You can use any of the following approaches to perform these operations:

  • Build the base and attribute dimensions and perform the associations all simultaneously. Doing so, you use a single rules file to build the base dimension and one or more attribute dimensions to associate each attribute with the appropriate member of the base dimension. Because this approach uses a single rules file, it can be the most convenient. Use this approach if the base dimension does not exist and each source data record contains all attribute information for each member of the base dimension.

  • Build the attribute dimension and perform the associations in one rules file. Assuming that the base dimension is built in a separate step or that the base dimension already exists, you can build an attribute dimension and associate the attributes with the members of the base dimension in one step. You need only to define the attribute associations in the rules file. See Associating Attributes in a Dimension Build.

  • Build the attribute dimension and then perform the associations using separate rules files. Assuming that the base dimension is built in a separate step or that the base dimension already exists, you can build an attribute dimension and associate the attributes with the members of the base dimension in separate steps. Build the attribute dimension, and then associate the attribute members with members of the base dimension. Use this approach when you build numeric attribute dimensions that are multilevel or that have members that represent different-sized ranges.

See:

Building Attribute Dimensions

Before you build attribute dimensions in a database, you must define the attribute member name formats for the outline. See Setting Member Names in Attribute Dimensions.

You can build attribute dimensions in one of the following ways:

Essbase does not support concurrent attribute association with the Add as build methods.

When you define the rules file for building attribute dimensions, specify the base dimension and the name of the attribute dimension file.

Associating Attributes in a Dimension Build

When a source of data contains attribute information, use one or more dimension builds to add attribute dimensions to the Essbase outline and to associate the attribute members with base dimension members.

Whether you build the attribute dimension and associate the attribute members with the members of the base dimension in one step or in separate steps, define the fields as described in this section.

Every record of the source data must include at least two columns: one for the member of the base dimension and one for the attribute value of the base dimension member. In the same source data record, you can include additional columns for other attributes that you want to associate with the member of the base dimension. You must position the base member fields before the corresponding attribute member fields.

Example

You can have Essbase build members of base dimensions and attribute dimensions, and make attribute associations, in the same dimension build job.

Assume you want to perform a dimension build that adds to Sample Basic new Product members 500-10 and 500-20, as children of 500.

In the same dimension build, you want to add a new numeric attribute member, 64, to the Ounces attribute dimension.

Finally, you want the dimension build to associate 500-10 and 500-20 with the 64 Ounces numeric attribute, and to associate 500-10 with the existing Caffeinated_True attribute, and 500-20 with Caffeinated_False. The text data file you are using for the dimension build looks as follows:
500	500-10	64	True
500	500-20	64	False

After you run the dimension build job, it builds members and associates attributes as shown in the outline below. Member 64 is a new member of the Ounces attribute dimension. Members 500, 500-10, and 500-20 are new members of the base dimension, Product, and are associated with member 64.


This image shows the new members in the base dimension and attribute dimension.

To recreate this example,

  1. Import/build the Sample Basic cube, using the application workbook available from the gallery in the file catalog on the Essbase Server.

  2. Create a tab-delimited data file like the following, name it attrprod.txt, and upload it to the Sample Basic cube directory.

    500	500-10	64	True
    500	500-20	64	False
  3. On the Applications page, expand the application (Sample).

  4. From the Actions menu, to the right of the cube name (Basic), launch the inspector.


    Popup menu with Inspect selected

  5. Select the Scripts tab, and then click Rules.


    Scripts tab is selected in the database inspection dialog, and Rules is highlighted

  6. Click Create and choose Dimension Build (Regular).


    In the database inspection dialog, create button is pressed and option Dimension Build (Regular) is selected

  7. In the New Rule dialog,

    1. Enter a rule name; for example, attrprod.

    2. For Source Type select File, click Catalog and navigate to attrprod.txt.

      When you click Catalog, the file is expected to be located in the cube directory on the Essbase Server by default, so you must have already uploaded it using the Files section of the Essbase web interface. If the file is on your client machine, click File Browser to locate the file.

    3. Leave the Header Record Number and Dimension Build Record Number fields as 0. Header records are not useful for dimension builds.

    4. Change the Delimiter value from Comma to Tab.

    5. Click Proceed.

    6. The dimension build rule opens with undefined fields, and preview data (from the text file) populating the grid below the fields.
      Dimension build rule named attrprod with undefined fields, and preview data populating the grid below the fields.

  8. As this is a new rule, there are no dimensions associated yet.

    1. Click Dimensions.
      Dimensions button in rule editor

    2. Select or type the dimension name Product, and click Add.
  9. Now you need to define the build method and check other dimension build operational instructions. Click Product to edit the properties.
    Clickable Product dimension name in the Edit Dimensions dialog.

  10. Ensure Build Method is Generation. Leave the Member Name field below it blank.
    Image of the Edit Dimensions dialog box, with the Generation build method selected.

  11. Click Advanced, and select Create Attributes.
    Image of the Advanced panel in the Edit Dimensions dialog box, with Create Attributes selected.

  12. Click OK.
  13. In the attrprod rule:
    1. In Field 1, select Product for the Dimension, and Generation for the Type. Increment the Generation field to 2.
    2. In Field 2, select Product for the Dimension, and Generation for the Type. Increment the Generation field to 3.
    3. In Field 3, select Product for the dimension, and Attribute Dimension for the Type. Below it, select Ounces.

      Field 3 contains members of the Ounces attribute dimension associated with the Product dimension. Because this field immediately follows the data field defined as the generation 3 member of the base dimension Product, Essbase associates the attribute member 64 with the 500-10 and 500-20 members.

    4. In Field 4, select Product for the dimension, and Attribute Dimension for the Type. Below it, select Caffeinated.

      Field 4 shows how to associate an attribute from an additional single-level attribute dimension. Because the base dimension is already specified, you need only to define an additional field for each attribute that you want to associate with the member of the base dimension.


      Image of the completed attrprod rule file, with Product, Generation, 2 in field 1, Product, Generation, 3 in field 2, Product, Attribute Dimension, Ounces in field 3, and Product, Attribute Dimension, Caffeinated in field 4.

    Note:

    When you are working with numeric ranges, you may need to build attribute dimensions and perform associations in separate steps. See Working with Numeric Ranges.
  14. Verify the rule, then save and close. If there are any errors, see Requirements for Valid Dimension Build Rule Files.

  15. Run the dimension build job.

  16. Open the outline. Before checking results of your dimension build, adjust the displayed columns to show attribute associations. On the outline toolbar, select the Display selected columns in the table icon.
    Image of the Display selected columns in the table icon in the outline editor toolbar.

  17. Scroll down. For property name Attributes, click Show in name. Click Apply and Close.
  18. Expand the Product dimension, and then expand the member, 500.

    After you run the dimension build job, it builds members and associates attributes as shown in the outline below. Member 64 is a new member of the Ounces attribute dimension. Members 500, 500-10, and 500-20 are new members of the base dimension, Product, and are associated with member 64.


    Image of the attrprod outline in the outline editor, showing the expanded Product dimension, with two new children of 500, 500-10 and 500-20. 500-10 shows Caffeinated: True, and Ounces: 64. 500-20 shows Caffeinated False, and Ounces: 64.

Note:

You should not create an outline in which a shared member is located before its prototype member. If you do this, you will encounter an error while validating the outline.

Updating Attribute Associations

You can also use the rules file shown in Associating Attributes in a Dimension Build to change attribute associations. Ensure that you allow association changes.

For duplicate member situations, the field to which the attribute is associated must contain the qualified member name. See Building Qualified Member Names Through the Rule File.

Removing Attribute Associations

To remove attribute associations, use the same process as for updating them, plus the following steps:

  • In the Dimension Build Properties tab of the Field Properties dialog box, select Delete when the field is empty for the attribute field. (This option is ignored if Allow association changes is not selected.)

  • Leave the field empty or NULL in the data source.

Working with Numeric Ranges

In many cases, you can use one rules file in a dimension build operation to dynamically build attribute dimensions for numeric ranges and to associate the members of the base dimension with the ranges. In the following situations, however, you must use two rules files: one to build the attribute dimension and one to associate the attributes with the appropriate members of the base dimension:

  • When the range size is different for different members.

    For example, you can define small ranges for towns and cities with smaller populations, larger ranges for mid-sized cities, and ranges greater than 1,000,000 for cities with large populations.

  • When the ranges are members of a multilevel attribute dimension.

    For example, the Population attribute dimension can have level 1 members that categorize the population ranges as Towns, Cities, and Metropolitan Areas.

The Population attribute dimension shown below demonstrates both situations. Population is a multilevel, numeric attribute dimension with level 0 members representing ranges of different sizes.

Figure 15-7 Numeric Attribute Dimension with Different-Sized Ranges


This image shows a numeric attribute dimension with different-sized ranges, as described in the text preceding the image.

You must use one rules file to build the Population dimension and another rules file to associate the Population dimension members as attributes of members of the base dimension.

Building Attribute Dimensions that Accommodate Ranges

First, create a cube that uses the generation, level, or parent-child build method. To build the attribute dimension, specify the following information in the rule:

The source data must be in attribute sequence, in ascending order. If ranges have different sizes, the source data must include a record for every attribute range.

Note:

In later builds, you cannot insert attribute members between existing members.

To use the generation method to build the outline, you must sequence the source data in ascending sequence, based on the numeric attribute value. Define the fields in the rule as shown below.

The following example is based on Sample Basic, exported to an application workbook using the Generation build method, and re-imported.

Figure 15-8 Rule for Building a Numeric Attribute Dimension with Ranges


Rule for building a numeric attribute dimension with ranges, as described in the text preceding the image.

Associating Base Dimension Members with Their Range Attributes

After you build the numeric attribute dimension ranges, you need a rule to associate the members of the base dimension with their attributes. The source data includes fields for the members of the base dimension and fields for the data values that Essbase uses to associate the appropriate Population attribute.

Define the rule as shown below.

Figure 15-9 Rule for Associating Numeric Range Attributes


Rule for associating base dimension members with numeric range attributes. New generation 3 cities are added and associated to markets based on population size.

When you define the association field (for example, Field 3: Market, Attribute Dimension, Population), place the attribute members within a range.

Note:

The rule includes a city, Boston, whose population of 3,227,707 is outside the ranges of the attribute dimension, where the ranges extend only to 3,000,000. To allow for values in the source data that are outside the ranges in the attribute dimension, enter a range size, such as 1000000. Essbase uses the range size to add members to the attribute dimension above the existing highest member or below the existing lowest member, as needed.

Caution:

After you associate members of the base dimension with members of the attribute dimension, if you manually insert new members into the attribute dimension or rename members of the attribute dimension, you may invalidate existing attribute associations. Consider an example where numeric range attributes are defined as “Tops of ranges” and an attribute dimension contains members 100, 200, 500, and 1000. A base dimension member with the value 556 is associated with the attribute 1000. If you rename a attribute dimension member from 500 to 600, the base dimension member with the value 556 now has an invalid association. This base member is still associated with the attribute 1000 when it should be associated with the attribute 600. If you manually insert new members or rename existing members, to ensure that associations are correct, rerun the dimension build procedure and associate the base members with the changed attribute dimensions. For example, rerunning the attribute association procedure correctly associates the member of the base dimension with the value 556 with the new attribute 600.

Ensuring the Validity of Associations

To ensure the validity of attribute associations, you must select the correct dimension building options and perform the builds in the proper sequence.

  • Adding or Changing Members of the Attribute Dimension: After you associate members of a base dimension with their numeric attribute ranges, if you manually insert new members or rename existing members in the attribute dimension, ensure that associations between attributes and base members are correct by performing one of the following tasks:

    • Rerun the dimension build procedure that associates the base members with the changed attribute dimension.

    • Use Outline Editor to manually review and fix, as needed, the associations of all base dimensions.

  • Deleting Members from the Attribute Dimension: You can delete all members of an attribute dimension so that you can rebuild the dimension with new data.

  • Adding Members to the Base Dimension: You can use the same rules file to add new members to the base dimension and to associate the new members with their numeric range attributes simultaneously. Provide a value for the range size.

    If Essbase encounters a base dimension value that is greater than the highest attribute member by more than the range size or is lower than the lowest attribute member by more than the range size, it creates members in the attribute dimension to accommodate the out-of-range values.

    For example, in the image below, the numeric range attributes are defined as “Tops of ranges.” The highest value member of the Population attribute dimension is 3000000. If the source data includes a record with the population 4,420,000, and the range size is 1000000, Essbase adds two members to the attribute dimension, 4000000 and 5000000, and associates the base member with the value of 4,420,000 with the 5000000 attribute.

    Figure 15-10 Dynamically Adding Attribute Range Members


    This image shows new members in the attribute dimension, as described in the text preceding the image.

When you add range members and base dimension members simultaneously, Essbase does not create aliases for the new members of the attribute dimension. If you want aliases that describe the range values for the new members of the attribute dimension, you must add the aliases in a separate operation.

Reviewing the Rules for Building Attribute and Base Dimensions

The information in this section describes areas unique to defining and associating attributes through a dimension build.

Getting Ready

  • Before running a dimension build, you must define the attribute member name formats for the outline.

    See Setting Member Names in Attribute Dimensions.

  • Defining new attribute dimensions in a rules file is different from defining new standard dimensions in a rules file.

Defining Fields in Rules Files

Rules files that are used to build single-level attribute dimensions require fewer field types than rules files that build and associate members of multilevel attribute dimensions.

  • For single-level attribute dimensions, define the field that contains the attribute values as the field to be associated with the members of the base dimension. A dimension build uses the defined field to add new members to the attribute dimension.

    See Associating Attributes in a Dimension Build.

  • For multilevel attribute dimensions, Essbase requires fields that define each generation or level in the attribute dimension and fields that define the associations. Use the new field type, Attribute Parent, to identify fields that are parent members for the attribute members being associated.

Controlling Adding New Attribute Members

When Essbase encounters attribute data values that are not members of the attribute dimension, it automatically adds the values as new members.

To prevent adding new members to attribute dimensions, select the Do not create members option for the attribute dimension.

Controlling Associations

You can control the following associations:

  • Making changes to attribute associations

    Select the Allow association changes option for the attribute dimension.

  • Enabling automatic association of base members with attributes that represent ranges of values

    Define the size of the range.

    See Set Dimension Build Field Type Information.

  • Concurrent attribute associations

    Use any build method except the Add as build methods.

    See Understanding Build Methods.

Note:

Because attributes are defined only in the outline, the data load process does not affect them.