To use Cognos product documentation, you must enable JavaScript in your browser.

Organizing the Model

Information about organizing an SAP BW model appears in a different topic .

When you organize the model, you make it easier for your users to find and understand the data in the model. You also make the model easier for you to manage and maintain. We recommend that you create several views, or layers, in the model:

Security can be defined in any of the views. It depends on your business requirements. For example, if you need to keep everyone from viewing an object, you add security to the object in the import view. Typically security is applied in the business view.

To organize the model, you can do the following:
      

create star schema groups

      

include metadata in several folders by using shortcuts

      

create namespaces or folders

      

create query item folders

      

create measure folders

Create a Star Schema Group

Use the Star Schema Grouping wizard to quickly create groups of shortcuts that will provide context for your users regarding which objects belong together. This makes the model more intuitive for your users. Star schema groups can also facilitate multiple-fact reporting by allowing the repetition of shared dimensions in different groups. This helps your users to see what different groups have in common and how they can do cross-functional, or multiple-fact, reporting. For more information, see Multiple-fact, Multiple-grain Queries.

Star schema groups also provide context for queries with multiple join paths. By creating star schema groups in the business view of the model, you can clarify which join path to select when many are available. This is particularly useful for fact-less queries.

In a star schema design, numeric, transactional data is contained in a central fact table with related dimension tables radiating out from the fact table.

Star schema groups can contain the selected dimensions, query subjects, or shortcuts. The objects in a star schema group cannot reference, or be referenced by, any object outside the group. Therefore, Framework Manager automatically creates a shortcut for any object that is referenced by an object outside the group.

For example, in a project for sales analysis, you include these dimensions:

You include quantity in the fact table.

Steps
  1. Select one or more dimensions or query subjects.

  2. From the Tools menu, click Create Star Schema Grouping.

  3. If you want to exclude an object from the group, in the Available objects box, clear the check box next to the object.

  4. Do one of the following:

  5. To move the selected objects to a separate namespace, ensure that the Create a new namespace for this grouping check box is selected and type the name in the Namespace name box.

  6. Click OK.

  7. If there are multiple relationships, also known as role-playing dimensions, create relationship shortcuts for them , or create individual dimensions or query subjects if you must rename them.

A Star Schema Group Based on One Dimension or Query Subject

Generally, you select a single object when it is a fact that has a relationship to every dimension or query subject that you want in the star schema group. When you create a star schema group that is based on one object, the following occurs:

A Star Schema Group Based on Multiple Dimensions or Query Subjects

Selecting multiple dimensions or query subjects is useful if you want to group dimensions or query subjects that do not already have relationships defined. The new group is placed under the nearest common parent of the dimensions or query subjects.

Resolve Multiple Conformed Star Schemas

You will likely see dimensional query subjects that are joined to more than one fact query subject. Join ambiguity is an issue when you report using items from multiple dimensions or dimensional query subjects without including any items from the measure dimension or fact query subject. This is called a fact-less query.

For example, Product and Time are related to the Product forecast and Sales facts.

Using these relationships, how do you write a report that uses only items from Product and Time? The business question could be which products were forecasted for sale in 2005 or which products were actually sold in 2005. Although this query involves only Product and Time, these dimensions are related through multiple facts. There is no way to guess which business question is being asked. You must set the context for the fact-less query.

In this example, we recommend that you create two namespaces, one containing shortcuts to Product, Time, and Product forecast, and another containing Product, Time, and Sales.

When you do this for all star schemas, you resolve join ambiguity by placing shortcuts to the fact and all dimensions in a single namespace. The shortcuts for conformed dimensions in each namespace are identical and are references to the original object. Note: The exact same rule is applied to regular dimensions and measure dimensions.

With a namespace for each star schema, it is now clear to your users which items to use. To create a report on which products were actually sold in 2005, they use Product and Year from the Sales Namespace. The only relationship that is relevant in this context is the relationship between Product, Time, and Sales, and it is used to return the data.

Steps
  1. Select one of the measure dimensions.

  2. From the Tools menu, click Create Star Schema Grouping.

  3. If you want to exclude an object from the group, in the Available objects box, clear the check box next to the object.

  4. Click Create a shortcut for all selected objects.

  5. To move the selected objects to a separate namespace, ensure that the Create a new namespace for this grouping check box is selected and type the name in the Namespace name box.

  6. Click OK.

  7. Repeat these steps for the other measure dimension.

Model a Snowflaked Dimension as a Star Dimension

A snowflaked dimension removes low-level cardinality attributes from the dimension tables and places them in secondary dimensions that are linked back to the original dimensions by artificial keys.

To model a snowflaked dimension as a star dimension, do the following:

      

Select the query subjects that are required to access the data, and put them in a new namespace .

      

Ensure that all relationships are correct .

      

Handle multilingual metadata .

      

Create a model dimension for each snowflaked dimension:

  • Select the query subjects you need.

  • From the Actions menu, click Merge in New Regular Dimension.

  • Rename the new model dimension. By default, its name is composed of the concatenated names of the original objects.

      

If you require multiple levels, do one of the following:

  • Use the dimension map to define hierarchies and levels for the dimension .

  • Specify determinants if the levels are stored in a single query subject .

Use Shortcuts

Information about shortcuts for SAP BW metadata appears in a different topic .

A shortcut is a pointer to an object, such as a relationship, a dimension, a query subject, or a folder. We recommend that you use shortcuts in the business view when there is an overlap between user groups and you want to include the metadata in more than one folder. With shortcuts, you can have multiple references to an object.

For example, you create folders named Orders, Products, and Customers. If you want both Orders and Customers to contain the same dimension, you must create a shortcut to the dimension and add it to both folders.

When you create a shortcut, Framework Manager does not set the Screen Tip and Description properties. Unless you define these properties, the values shown in the Cognos 8 studios are the same as those defined in the object that the shortcut references.

Tip: To go to the object that the shortcut references, right-click the shortcut and click Go To Target.

Shortcuts are less flexible from a presentation perspective than model objects, but they require much less maintenance because they are automatically updated when the target object is updated. If maintenance is a key concern and there is no need to customize the appearance of the query subject, use shortcuts.

Framework Manager has two types of shortcuts:

Regular shortcuts are typically used as conformed dimensions with star schema groups, creating multiple references with the exact same name and appearance in multiple places. In the example below, the shortcuts created for Products and Order Time behave as references. If a query is written that brings Products from both Product Forecast and Sales Target, the query uses the definition of Products based on the original and this definition appears only once in the query.

Alias shortcuts are typically used in role-playing dimensions or shared tables. Because there is already an example in this document for role-playing dimensions, we will look at the case of shared tables. In this example, Sales Staff and Sales Branch can be treated as different hierarchies. From our knowledge of the data, we know that because staff can move between branches, we need to be able to report orders against Sales Branch and Sales Staff independently as well as together. To achieve this, we need to create an alias to Sales Branch that can be used as a level in the Sales Staff hierarchy.

With the new alias shortcut in place, it is possible to create queries that require orders by sales branch and orders by sales staff with their current branch information simultaneously.

Shortcuts and Relationships

When you decide where to place shortcuts, consider how the scope of the shortcut affects relationships. Shortcuts in a different folder from the target query subject use the relationships of the target query subject. Shortcuts in the same folder as the target query subject ignore the relationships of the target query subject and use only those specified for the shortcut.

You can specify a different relationship for a shortcut than the relationships of the target query subject. By creating relationships from the shortcut to other query subjects, you avoid cross-join errors in the model.

You cannot create shortcuts to scope relationships.

Shortcuts and Dimensions or Query Subjects

Shortcuts result in fewer dimensions or query subjects to maintain. You can keep dimensions or query subjects in the import view and keep shortcuts in the business view. Shortcuts are most frequently used when creating star schema groups.

When you create a shortcut to a dimension or query subject, you cannot customize which query items are in the shortcut. The entire dimension or query subject is included in the shortcut.

Being able to specify the behavior of shortcuts is new to Cognos 8.3.

When you open a model from a previous release, the Shortcut Processing governor is set to Automatic. When Automatic is used, shortcuts work the same as in previous releases, that is, a shortcut that exists in the same folder as its target behaves as an alias, or independent instance, whereas a shortcut existing elsewhere in the model behaves as a reference to the original. To take advantage of the Treat As property, it is recommended that you verify the model and, when repairing, change the governor to Explicit. The repair operation changes all shortcuts to the correct value from the Treat As property based on the rules followed by the Automatic setting, this means that there should be no change in behavior of your model unless you choose to make one or more changes to the Treat As properties of your shortcuts.

When you create a new model, the Shortcut Processing governor is always set to Explicit.

When the governor is set to Explicit, the shortcut behavior is taken from the Treat As property and you have complete control over how shortcuts behave without being concerned about where in the model they are located.

Shortcuts can be created by the Create Star Schema Grouping wizard. For example, a fact table and its dimension tables are stored in the import view. If you want to represent conformed dimensions in several star schema groups, only one dimension or query subject can exist for each dimension table. Use shortcuts for all other instances of the dimension or query subject. By using shortcuts, you can build queries involving multiple fact tables that are related through shared dimension tables.

In the case of role-playing dominions, there are two main approaches documented in Role-Playing Dimensions. You can create a query subject and regular dimension for each role and then use shortcuts as references in star schema groups to allow the use of the role-playing dimensions as conformed dimensions, or you can create a shortcut for each role in each star schema group and create a new join between each role-playing shortcut and its related fact shortcut. As long as the target of the shortcuts is not contained in the same folder, all shortcuts behave as aliases.

The security you specify for an object is passed to shortcuts that reference the secured object. If you have a shortcut to a secured object, only users with permission to see the secured object can see the shortcut in the published package.

If a shortcut is to a dimension or query subject, you can specify the behavior for the shortcut in the Treat As property. You can set the property to one of the following:

The Shortcut Processing governor controls the behavior for all shortcuts. The Shortcut Processing governor takes priority over the Treat As property. For example, if the governor is set to Automatic, the behavior of the shortcut is determined by the location of the shortcut relative to its target no matter what the setting of the Treat As property. For more information, see Set Governors.

Steps
  1. Right-click the query subjects, dimensions, or folders that you want to create shortcuts to, and do one of the following:

  2. For shortcuts to query subjects or dimensions, in the Properties pane, set the Treat As property to Alias or Reference.

Create a Folder or Namespace

Information about folders and namespaces for SAP BW metadata appears in a different topic .

You can create folders or namespaces to organize objects in the model.

The most important thing to know about namespaces is that once you have begun authoring reports, any changes you make to the names of published namespaces will impact your Cognos 8 content. This is because changing the name of the namespace changes the IDs of the objects published in the metadata. Because the namespace is used as part of the object ID in Cognos 8, each namespace must have a unique name in the model. Each object in a namespace must also have a unique name. Part of the strategy of star schema groups is placing shortcuts into a separate namespace, which automatically creates a unique ID for each object in the namespace. This allows us to use the same name for shortcuts to conformed dimensions in different star schema groups.

The next time you try to run a query, report, or analysis against the updated model, you get an error. If you need to rename the namespace that you have published, use Analyze Publish Impact to determine which reports are impacted.

Folders are much simpler than namespaces. They are purely for organizational purposes and do not impact object IDs or your Cognos 8 content. You can create folders to organize objects by subject or functional area. This makes it easier for you to locate metadata, particularly in large projects.

The main drawback of folders is that they require unique names for all query subjects, dimensions, and shortcuts. Therefore, they are not ideal for containing shared objects such as conformed dimensions.

Tip: When viewing metadata in the Diagram tab, you can expand or collapse folders and namespaces. From the Diagram menu, click Collapse All or Expand All.

If you set security on a folder and then move objects into the folder, confirm that exclusions are set correctly.

Steps to Create a Namespace
  1. From the Actions menu, click Create, Namespace.

  2. Right-click the namespace, click Rename, and give the namespace a descriptive, unique name.

  3. Add objects by importing metadata or moving model objects or shortcuts to the objects into the namespace.

Steps to Create a Folder
  1. From the Actions menu, click Create, Folder.

  2. In the Folder name box, type a name for the new folder.

  3. Click Next.

  4. Choose whether to move the objects or to create shortcuts:

  5. Select the objects you want to add to the folder.

  6. Click Finish.

Create a Query Item Folder

You can create query item folders to organize query subjects or dimensions that contain a large number of query items. A query item folder can contain only query items and query item folders.

If you create a query item folder, you cannot change the order of query items in the Edit Definition dialog box for the model query subject. You can change the order of items only in the Project Viewer.

Steps
  1. In the Project Viewer pane, click a query subject or dimension.

  2. From the Actions menu, click Create, Query Item Folder.

    A new query item folder appears in the Project Viewer, under the query items that belong to that query subject or dimension.

  3. Drag the query items that you want into the query item folder.

    You cannot add query items that do not exist in the parent query subject or dimension.

Create a Measure Folder

You can create measure folders to organize measure dimensions that contain a large number of query items. You can nest measure folders within other measure folders.

You cannot create a measure folder from a measure shortcut.

If you create a measure folder, you cannot change the order of measures in the Edit Definition dialog box for the measure dimension. You can change the order of measures only in the Project Viewer.

Steps
  1. In the Project Viewer pane, click a measure dimension.

  2. From the Actions menu, click Create, Measure Folder.

    A new folder appears in the Project Viewer, under the measures that belong to that measure dimension.

  3. Drag the query items that you want into the measure folder.

    You cannot add measures that do not exist in the parent measure dimension.