Creating Dimensions Automatically


You can set up a dimension automatically from a logical dimension table if a dimension for that table does not exist. To create a dimension automatically, the Administration Tool examines the logical table sources and the column mappings in those sources and uses the joins between physical tables in the logical table sources to determine logical levels and level keys. Therefore, it is best to create a dimension in this way after all the logical table sources have been defined for a dimension table.
The following rules apply:
  • Create Dimensions is only available if the selected logical table is a dimension table (defined by 1:N logical joins) and no dimension has been associated with this table.
  • An automatically created dimension uses the same name as the logical table, adding Dim as a suffix. For example, if a table is named Periods, the dimension is named Periods Dim.
  • A grand total level is automatically named [name of logical table] Total. For example, the grand total level of the Periods Dim table is Periods Total.
  • When there is more than one table in a source, the join relationships between tables in the source determine the physical table containing the lowest level attributes. The lowest level in the hierarchy is named [name of logical table] Detail. For example, the lowest level of the periods table is Periods Detail.
  • The logical key of the dimension table is mapped to the lowest level of the hierarchy and specified as the level key. This logical column should map to the key column of the lowest level table in the dimension source.
    • If there are two or more physical tables in a source, the columns that map to the keys of those tables become additional logical levels. These additional level names use the logical column names of these key columns.
    • The order of joins determines the hierarchical arrangement of the logical levels. The level keys of these new logical levels are set to the logical columns that map to the keys of the tables in the source.
  • If there is more than one logical table source, the tool uses attribute mappings and physical joins to determine the hierarchical order of the tables in the physical sources. For example, you might have three sources (A, B, C) each containing a single physical table and attribute mappings for 10, 15, and 3 attributes, respectively, (not counting columns that are constructed from other logical columns). The following is a list of the results of creating a dimension for this table automatically:
    • The Administration Tool creates a dimension containing 4 logical levels, counting the grand total and detail levels.
    • The key of the table in source B (that has the greatest number of columns mapped and contains the column mapping for the logical table key) should be the level key for the detail level.
    • The parent of the detail level should be the logical level named for the logical column that maps to the key of the physical table in source A.
    • Any attributes that are mapped to both A and B should be associated with level A.
    • The parent of level A should be the logical level named for the logical column that maps to the key of the physical table in source C.
    • Any columns that are mapped to both A and C should be associated with level C.
  • Table joins in a physical source might represent a pattern that results in a split hierarchy. For example, the Product table may join to the Flavor table and a Subtype table. This would result in two parents of the product detail level, one flavor level and one subtype level.
  • You cannot create a dimension automatically in the following situations:
    • If a dimension with joins and levels has already been created, Create Dimension will not appear on the right-click menu.
    • If the table is not yet joined to any other table, the option is not available because it is considered a fact table.
  • In a snowflake schema, if you use a table with only one source, and create the dimension automatically the child tables will automatically be incorporated into a hierarchy. The child tables will form intermediate levels between the grand total level and detail level. If more then one child table exists for a dimension table, while creating dimension automatically hierarchy will be split hierarchy.
To create a dimension automatically
  1. In the Administration Tool, open a repository.
  2. In the Business Model and Mapping layer of a repository, right-click a logical table.
  3. From the right-click menu, choose Create Dimension.
    A dimension appears in the Business Model and Mapping layer.

No comments:

Post a Comment

Popular Posts