Framework Manager
Framework Manager
Version 11.1.0
User Guide
IBM
©
Product Information
This document applies to IBM Cognos Analytics version 11.1.0 and may also apply to subsequent releases.
Copyright
Licensed Materials - Property of IBM
© Copyright IBM Corp. 2005, 2021.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
IBM, the IBM logo and ibm.com are trademarks or registered trademarks of International Business Machines Corp.,
registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other
companies. A current list of IBM trademarks is available on the Web at " Copyright and trademark information " at
www.ibm.com/legal/copytrade.shtml.
The following terms are trademarks or registered trademarks of other companies:
• Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe
Systems Incorporated in the United States, and/or other countries.
• Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States,
other countries, or both.
• Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep,
Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United
States and other countries.
• Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
• UNIX is a registered trademark of The Open Group in the United States and other countries.
• Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Microsoft product screen shot(s) used with permission from Microsoft.
© Copyright International Business Machines Corporation .
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
Contents
Introduction......................................................................................................... ix
iii
Setting up the business view..................................................................................................................... 45
Relationships............................................................................................................................................. 46
Cardinality.............................................................................................................................................46
Modifying a relationship....................................................................................................................... 49
Creating complex expressions for a relationship................................................................................ 50
Creating relationships ......................................................................................................................... 50
Creating a relationship shortcut ..........................................................................................................50
Detecting and generating relationships ..............................................................................................51
Bridge tables.........................................................................................................................................52
Query subjects........................................................................................................................................... 54
Data source query subjects..................................................................................................................55
Model query subjects........................................................................................................................... 56
Stored procedure query subjects........................................................................................................ 57
Determinants........................................................................................................................................61
Creating model query subjects based on existing objects..................................................................66
Modeling query subjects that represent descriptive data.................................................................. 66
Viewing related objects........................................................................................................................67
Creating query sets.............................................................................................................................. 67
Testing query subjects or query sets................................................................................................... 70
Validating query subjects..................................................................................................................... 73
Updating query subjects...................................................................................................................... 74
Converting query subjects into dimensions........................................................................................ 74
Converting model query subjects into data source query subjects....................................................75
Editing the SQL..................................................................................................................................... 75
Changing the type of SQL..................................................................................................................... 76
Changing how the SQL is generated.................................................................................................... 80
Dimensions................................................................................................................................................ 81
Normalized data sources..................................................................................................................... 82
Creating regular dimensions................................................................................................................ 83
Creating regular dimensions based on existing objects......................................................................89
Converting regular dimensions into query subjects............................................................................89
Sorting members of a level.................................................................................................................. 90
Creating measure dimensions............................................................................................................. 91
Converting measures into query items................................................................................................92
Defining scope relationships................................................................................................................92
Roles..................................................................................................................................................... 93
Viewing related objects........................................................................................................................95
Testing dimensions...............................................................................................................................95
Multilingual metadata................................................................................................................................ 98
Supporting multilingual metadata....................................................................................................... 98
Setting up a Multilingual Reporting Environment................................................................................99
Modeling with multilingual data sources...........................................................................................100
Using macros to model multilingual data..........................................................................................100
Adding a language to a project.......................................................................................................... 101
Exporting translation tables...............................................................................................................102
Importing translation tables.............................................................................................................. 102
Example - create multilingual projects for relational metadata....................................................... 103
Query items..............................................................................................................................................104
Modifying how query items are aggregated...................................................................................... 107
Formatting query items......................................................................................................................114
Defining prompt controls................................................................................................................... 115
Converting query items into measures..............................................................................................119
Business rules..........................................................................................................................................119
Creating calculations..........................................................................................................................120
Creating filters.................................................................................................................................... 121
Applying filters................................................................................................................................... 123
Example - showing the currency name for each country..................................................................124
Creating parameter maps ................................................................................................................. 125
iv
Example - Specifying language values for relational metadata........................................................126
Creating session parameters............................................................................................................. 127
Using parameters with relational data source query subjects......................................................... 128
Using scalar and aggregate functions................................................................................................129
Creating prompts with query macros................................................................................................ 130
Organizing models................................................................................................................................... 140
Creating star schema groups............................................................................................................. 140
Shortcuts............................................................................................................................................ 143
Creating folders or namespaces........................................................................................................ 146
Creating query item folders............................................................................................................... 147
Creating measure folders...................................................................................................................148
Durable models........................................................................................................................................148
Creating a durable model...................................................................................................................149
Testing a durable model.....................................................................................................................150
Analyzing models.....................................................................................................................................150
Running the Model Advisor .............................................................................................................. 154
v
Adding data security.......................................................................................................................... 210
Object security................................................................................................................................... 212
Modifying package security............................................................................................................... 214
Specifying languages............................................................................................................................... 214
Specifying languages for one package.............................................................................................. 214
Specifying languages for all packages...............................................................................................214
Setting suppression options....................................................................................................................215
Externalized query subjects and dimensions......................................................................................... 215
Publishing packages................................................................................................................................ 216
Publishing packages based on OLAP data sources...........................................................................218
Publishing packages by running scripts............................................................................................ 220
Updating reports to use the latest version of packages....................................................................220
vi
What is metadata caching?..................................................................................................................... 288
Query subjects versus dimensions......................................................................................................... 288
Model objects versus shortcuts.............................................................................................................. 289
Folders versus namespaces.................................................................................................................... 290
Order of operations for model calculations............................................................................................ 291
Impact of the model size.........................................................................................................................292
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer.... 327
Working with SAP BW Data Using a Package in Framework Manager................................................... 327
Creating a BW Query in SAP Business Explorer Query Designer...................................................... 328
Creating a Package in Framework Manager...................................................................................... 330
Creating a Model in Transformer....................................................................................................... 332
Working with SAP BW Data Using Externalized CSV Files in Framework Manager............................... 333
SAP BW Query Requirements............................................................................................................ 334
Framework Manager Considerations.................................................................................................335
Building PowerCubes from SAP BW Data..........................................................................................336
Notices..............................................................................................................345
Index................................................................................................................ 347
vii
viii
Introduction
IBM® Cognos® Framework Manager is a metadata modeling tool. A model is a business presentation of
the information in one or more data sources. When you add security and multilingual capabilities to this
business presentation, one model can serve the needs of many groups of users around the globe.
This document includes the procedures, examples, notes, tips, and other background information to help
you prepare a model for reporting and deploying a package.
Audience
This document is intended to help data modelers use IBM Cognos Framework Manager. Before using
Framework Manager, you should understand data modeling and how to write queries.
Finding information
To find product documentation on the web, including all translated documentation, access IBM
Knowledge Center (http://www.ibm.com/support/knowledgecenter).
Forward-looking statements
This documentation describes the current functionality of the product. References to items that are
not currently available may be included. No implication of any future availability should be inferred.
Any such references are not a commitment, promise, or legal obligation to deliver any material, code,
or functionality. The development, release, and timing of features or functionality remain at the sole
discretion of IBM.
Samples disclaimer
The Sample Outdoors Company, Great Outdoors Company, GO Sales, any variation of the Sample
Outdoors or Great Outdoors names, and Planning Sample depict fictitious business operations with
sample data used to develop sample applications for IBM and IBM customers. These fictitious records
include sample data for sales transactions, product distribution, finance, and human resources. Any
resemblance to actual names, addresses, contact numbers, or transaction values is coincidental. Other
sample files may contain fictional data manually or machine generated, factual data compiled from
academic or public sources, or data used with permission of the copyright holder, for use as sample data
to develop sample applications. Product names referenced may be the trademarks of their respective
owners. Unauthorized duplication is prohibited.
Accessibility Features
Accessibility features help users who have a physical disability, such as restricted mobility or limited
vision, to use information technology products. IBM Cognos Framework Manager has accessibility
features. For information, see Appendix B, “Accessibility features,” on page 325.
x IBM Cognos Framework Manager Version 11.1.0 : User Guide
Chapter 1. Getting started with Framework Manager
IBM Cognos Framework Manager is a metadata modeling tool that drives query generation for IBM
Cognos software. A model is a collection of metadata that includes physical information and business
information for one or more data sources. IBM Cognos software enables performance management on
normalized and denormalized relational data sources and a variety of OLAP data sources. When you add
security and multilingual capabilities, one model can serve the reporting, ad hoc querying, and analysis
needs of many groups of users around the globe.
Before doing anything in IBM Cognos Framework Manager, you should thoroughly understand the
reporting problem that you want to solve.
To get started, do the following:
Procedure
1. Analyze the reporting problem.
2. Learn about the objects you will use.
3. Create or open a project.
4. Explore the panes in Framework Manager.
5. Explore the sample models included with Framework Manager.
Procedure
1. Do you and your users agree on the reporting requirements?
Issues to resolve can include multilingualism, performance, security, and how to organize and combine
query items and filters.
2. Does the data source contain the data and metadata that you need?
Without metadata such as primary keys, indexes, and foreign keys, your reports may take too long to
run, or may produce incorrect results. If the data source does not contain the data and metadata that
you need, will it be changed, or will you work around it?
3. Does the same data exist in more than one source?
If so, choose the data source that most closely fits your reporting requirements. If a data warehouse is
available, it is typically a better choice than an operational database. A data warehouse based on a star
schema is ideal. If this does not exist, and you expect that your reporting application will be heavily
used, consider arranging for one to be created.
4. Which data source tables are the fact tables, which are the dimensions, and which are both fact table
and dimension?
5. What are the keys and attributes of each dimension?
6. Which relationships are required?
7. Are there multiple relationship paths between tables?
If so, what does each path represent? You must define the preferred path for each.
Results
Then you should review the names of data sources, tables, and columns in your data source to ensure
that you are not using names reserved by IBM Cognos. If you must use a reserved word, enclose the
word in quotes in the SQL specification. For example, select Orderdate, "Timezone". For more
information, see Appendix D, “Reserved words,” on page 339.
Procedure
1. Locate and prepare data sources and models.
IBM Cognos Analytics can report from a wide variety of data sources, both relational and dimensional.
Database connections are created in the Web administration interface, and are used for modeling, for
authoring, and for running the application.
To use data for authoring and viewing, the studios need a subset of a model of the metadata (called a
package). The metadata may need extensive modeling in Framework Manager.
2. Build and publish the content.
Reports, scorecards, analysis, workspaces and more are created in the studios of IBM Cognos
Analytics. Which studio you use depends on the content, life span, and audience of the report, and
whether the data is modeled dimensionally or relationally. For example, self-service reporting and
analysis are done through IBM Cognos Query Studio, and IBM Cognos Analysis Studio, and scheduled
reports are created in IBM Cognos Analytics - Reporting. Reporting reports and scorecards are usually
prepared for a wider audience, published, and scheduled for bursting, distribution, and so on. You can
also use Reporting to prepare templates for self-service reporting.
3. Deliver and view the information.
Projects
A project contains a model, namespaces, packages, data sources, and related information for maintaining
and sharing model information. A single project can span many data sources or tables.
An IBM Cognos Framework Manager project displays as a folder that contains a project file (.cpf) and
the specific .xml files that define the project. The files in a project folder are unique to each project. The
project and its associated files are contained in a project folder.
In general, do not add secondary files to the project folder because they may be affected by actions such
as move, rename, and delete commands on the Manage Projects menu. If you decide to add secondary
files to the project folders, the files are added with absolute paths. If they are moved from the original
location, they must be retargeted.
These are the contents of a project folder.
<project name>.cpf
The Framework Manager project file, which references the .xsd and .xml files that define a project.
archive-log.xml
This file contains the portion of the main log file that was archived.
customdata.xml
This file contains the layout information for the diagram.
If this file is deleted, layout information is lost. An automatic layout will be applied.
IDLog.xml
This file tracks objects for models that use branching and merging.
log.xml
A list of all modifications made to the model.
mda_metadata.xml
A Model Design Accelerator file, which contains the metadata imported from data sources.
mda_engine_project.xml
A Model Design Accelerator file, which contains the definition of the star schema.
model.xml
The actual model data created by Framework Manager users.
preferences.xml
The preferences for Framework Manager projects.
session-log.xml
A list of unsaved transactions in the model. When the project is saved, this list is deleted. View
contents of this file using View Transaction History.
When Framework Manager is started, the existing session-log.xml file is renamed to session-log-
backup.xml.
Models
A model is the set of related dimensions, query subjects, and other objects required for one or more
related reporting applications.
The Framework Manager model is a metadata layer that adds value to a data source in several ways. Most
importantly, it provides a business view of the information in the source data to simplify building reports,
analyses, and queries. The business view can:
• Organize items in folders that represent business areas for reporting
• Format items using numeric, currency, date, time, and other formats
• Present multilingual folder and item names, descriptions, tips, and data so that users can operate in
their language of choice
• Automate the generation of SQL queries sent to the relational data source
• Specify default prompting
This can include having IBM Cognos software prompt the user using a descriptive name while actually
filtering on a code or key value for improved query performance.
In particular, you can modify the Framework Manager model to ensure that queries sent to the data
source are efficient, well formed, and secure. You can specify the rules governing query generation,
restrict user access to specific rows or columns of data, and model data relationships to hide the
complexity of data from your users.
Namespaces
A namespace uniquely identifies query items, dimensions, query subjects, and other objects. You import
different databases into separate namespaces to avoid duplicate names.
Packages
A package is a subset of the dimensions, query subjects, and other objects defined in the project. A
package is what is actually published to the IBM Cognos Analytics server, and it is used to create reports,
analyses, and ad hoc queries.
Dimensions
A dimension is a broad grouping of data about a major aspect of a business, such as products, dates, or
markets.
Query subjects
Query items
A query item is the smallest piece of the model that can be placed in a report. It represents a single
characteristic of something, such as the date that a product was introduced.
Query items are contained in query subjects or dimensions. For example, a query subject that references
an entire table contains query items that represent each column in the table.
For your users, query items are the most important objects for creating reports. They use query item
properties of query items to build their reports.
Creating projects
In IBM Cognos Framework Manager, you work in the context of a project. The project contains objects that
you organize for your users according to the business model and business rules of your organization. You
view these objects in the project page.
Procedure
1. From the Welcome page, click Create a new project. If you are already in Framework Manager, click
File, New.
Tip: If you have authentication problems, add the Cognos Analytics domain to the list of trusted sites
in Microsoft Internet Explorer.
2. In the New Project page, specify a name and location for the project, and click OK.
Opening projects
You must open a project before you can import metadata or make changes to existing metadata.
If the project was created using a model schema that is older than the currently supported version, you
may be prompted to upgrade the model.
If your model is checked into a repository, you cannot upgrade it. Manually check the model out of the
source control system and then open it in the new version of IBM Cognos Framework Manager.
If you upgrade a segmented model, you must open and upgrade each segment individually. After
upgrading each segment, you can then upgrade the top level, or master, project.
Procedure
1. From the Welcome page, click Open a project.
Tip: If you are in Framework Manager, click File, Open.
2. Browse to locate the project folder and click the .cpf file.
Icon Object
Project
Data source
Parameter map
Package
Packages folder
Published package
Calculation
Embedded calculation
Filter
Hierarchy
Level in a hierarchy
Measure
Semi-additive measure
Query item
Relationship
Linked segment or project that was updated. This icon displays over
other icons.
Procedure
1. Click Project, Options.
2. On the Test Options tab, choose the options that you want.
Limit the number of rows Select the Restrict the This setting applies to all
retrieved maximum number of rows to dimensions, query subjects, and
be returned check box and type query sets in the model.
the required number of rows.
This setting is saved and used
This setting does not improve in your next session with any
performance for retrieving data project.
when testing dimensions, query
subjects, and query sets.
Specify the level of detail Drag the Level of Information This setting is saved and used
shown in Query Information in your next session with this
slider to the location that project.
represents the amount of detail
you require.
Apply relevant design mode Select the Apply all relevant This setting is saved and used
filters design mode filters when in your next session with any
testing check box. project.
This applies all relevant filters
whose usage is set to design
mode in another dimension,
query subject, or query set.
3. If you want projects saved automatically, on the Auto Save tab, select On and type the number that
represents the frequency, in minutes, that you want projects saved automatically.
4. Click OK.
Procedure
1. In the Project Viewer, select the root namespace objects you want to reorder.
Ensure that selected objects are at the same level.
You can also select objects in the Explorer tab, or Diagram tab.
2. Click Tools, Reorder.
3. Click whether to reorder objects by name in ascending order or descending order.
4. Select whether to reorder the selected objects only, or to reorder the selected objects and their
children.
If you choose to reorder children of selected objects, you can also include all descendants of the child
objects.
5. Click OK.
in the bottom right corner and drag the pointer over the diagram .
In the Diagram tab, you can do any of the following:
• View, create, and modify objects and relationships.
Procedure
1. Click Diagram, Diagram settings.
2. Set the level of detail.
You can select query items, relationships, scope relationships, cardinality, and descriptions.
3. Select the type of notation.
You can use Merise or Crowsfeet notation. By default, IBM Cognos Framework Manager uses Merise
notation. Merise notation marks each end of the relationship with the minimum and maximum
cardinality of that end. You can also use Crowsfeet notation, which provides a pictorial representation
of the relationship.
4. To align objects more easily, turn the Snap options on.
5. To have a network of evenly spaced lines in the background, select the Display grid check box.
6. Select the font and color for text.
7. Select whether you want these settings to be the default for all new projects.
8. Click OK.
Procedure
1. In the Project Viewer window, select multiple objects.
Tip: To reduce the set of properties to search for before performing the replace, filter the properties
first. On the Properties tab, right-click the column heading you want to filter on and click Set
Autofilter.
2. Choose one of the following:
• If your model contains multiple languages, click the Language tab.
• If your model contains only one language, click the Properties tab.
3. Right-click the column heading for the property whose values you want to replace, and click Bulk
Replace.
4. In the Search for and Replace with boxes, type the search and replace text strings.
Tip: To replace empty properties, leave the Search for box blank.
5. To perform a case-sensitive search, select the Match case check box.
6. To search for the complete property text, select the Match entire cell contents check box.
Tip: To replace all property fields, regardless of the text they contain, type one asterisk in the Search
for box and select the Match entire cell contents check box.
Procedure
1. Click Tools, Search.
Tips:
• If the Tools pane is not visible, click View, Tools. You can drag the Tools pane to the bottom of the
Framework Manager window and resize it to have a better view of the search results.
3. Click the double down arrow button to show the search criteria boxes.
4. In the Condition list, select a condition to apply to the search string.
The Condition box determines how the Search string value is matched with text in the model. It
contains a list of possible search conditions. If you want to search using wildcard characters, use the
equals condition.
A regular expression is a complex and powerful method for matching text strings. To search using
a regular expression, use the regular expression condition. A regular expression search is case
sensitive. For example, to find all objects that contain the word "Car" search for the string "\Car",
without the quotation marks.
The value for the Condition box is saved from session to session.
5. In the Search in list, select the part of the model hierarchy that you want to search.
The value for the Search in box is saved from session to session.
6. In the Class list, select the single class of objects that you want to search.
7. In the Property list, select the type of property that you want to search.
The (All Properties) property searches all properties. The Object Name property restricts the search
to the name of each object. The Text Properties property searches the set of properties that contain
text strings, such as Description or Screen Tip, but not including the object name.
The value for the Property box is saved from session to session.
8. Click Search.
The results are listed at the bottom of the Search tab. Search results can contain multiple values,
such as text properties, for a single object. When you click an object that has multiple values, all the
values that belong to that object are selected. If your model contains multiple languages, the search
results include properties for each language in the model.
After you do one search, the Subset check box becomes available. If you select the Subset check
box, the next search operates on the existing search results. The Subset check box is cleared after
each search. You can do successive subset searches by selecting the Subset check box.
9. To see an object in the Project Viewer, click an object in the Search tab.
10. To see an object in the diagram, right-click an object in the Search tab and click Locate in Diagram.
Results
The Bulk Replace button on the Search tab allows you to do a search and replace operation on the set
of objects in the search results. When you click the Bulk Replace button, the result set displays in the
Properties tab and the Bulk Replace dialog displays. From there, you can select the property to apply the
search and replace operation.
You can also initiate a bulk replace from the Properties pane. For more information, see “Replacing
multiple property values” on page 13.
One-part identifiers
Some objects in a project have a one-part identifier. The one-part identifier must be unique across
the entire project, even if the namespace contains other namespaces. These objects have a one-part
identifier:
• Namespaces
• Functions
• Shortcuts to namespaces
• Shortcuts to folders
Two-part identifiers
Some objects in a project have a two-part identifier consisting of the name of the containing namespace
and the name of the object. The object name must be unique in the containing namespace. These objects
have a two-part identifier:
• Regular dimensions
• Measure dimensions
• Query subjects
• Shortcuts to query subjects
For example, a go_sales namespace contains a query subject named Product. The Product query subject
has the following name, where the square brackets and periods are the syntax that Framework Manager
uses for object identifiers:
[go_sales].[Product]
Three-part identifiers
Some objects in a project have a three-part identifier based on the identifier of the containing query
subject. Each name must be unique in the containing query subject. These objects have a three-part
identifier:
• Hierarchies
• Measures
• Query items
For example, a go_sales namespace contains a query subject named Product, and a query item named
Product Code. The Product Code query item has the following name, where the square brackets and
periods are the syntax IBM Cognos Framework Manager uses for object identifiers:
[go_sales].[Product].[Product Code]
Four-part identifiers
Levels in a project have a four-part identifier consisting of the namespace name, the dimension name, the
hierarchy name, and the level name.
Five-part identifiers
Some objects in a project have a five-part identifier consisting of the namespace name, the dimension
name, the hierarchy name, the level name, and the query item name. Five-part identifiers are also used
for captions and business keys in member unique names. For more information, see “Member Unique
Names” on page 88.
For example, a go_data_warehouse namespace contains a dimension named Account. A hierarchy in
Account is Balance sheet, which contains a level named Account. The Account level contains a query item
named Account name. The Account name query item has the following name, where the square brackets
and periods are the syntax Framework Manager uses for object identifiers:
Sample models
Several sample models are included with IBM Cognos Framework Manager for you to explore. The sample
models have been created using the guidelines for modeling metadata.
In each sample model, the query items have default formatting defined. Names and descriptions were
translated into many different languages. By using the Language_lookup parameter map, each user
automatically sees folder and item names and descriptions in their preferred language.
For more information about sample reports and packages, see the Reporting User Guide.
Explorer tree
Use the Explorer Tree to view objects that you selected using the Metadata Wizard. The data source
objects are shown in a hierarchical view, similar to other file systems.
To see a graphical view of your data source, use the Explorer Diagram. If the data source contains a large
number of objects, it may be easier to locate an object using the Explorer Tree.
The Explorer Tree uses the following icons to represent objects.
Icon Object
Project
Data source
Explorer diagram
The Explorer Diagram shows a graphical view of your data source metadata. Use the Explorer Diagram
to explore your metadata and view the relationships between objects.
To access the Explorer Diagram, select one or more objects in the Explorer Tree. Then, click the
Explorer Diagram icon located above the Explorer Tree.
In the Explorer Diagram window, you can do the following:
• View objects and relationships.
• Change the layout of objects to either star layout or standard tree layout.
• Create a preliminary star schema based on any table containing facts.
• Zoom in or out
• Change the settings for the diagrams.
There are two ways of using the Explorer Diagram. From the Explorer Tree, you can select a subset of
objects that you are interested in and add them to the Explorer Diagram. From the Explorer Tree, you
can also add all the objects to the Explorer Diagram. You can then keep the objects you are interested in
and remove the rest. Use the Show Related Tables and Remove Tables menu items to create a view of
just the objects you want to explore. The diagram is a read-only view of your data source metadata. When
you add or remove tables, you are only modifying the diagram. You are not making changes to the data
source.
Use the diagram menu options to explore relationships to other objects. To access diagram menu options,
select an object in the Explorer Diagram and right-click or use the toolbar. Right-click a table to select
the option to view the diagram as a star or tree layout around that table. You can also access some of the
diagram menu options using the icons.
You can create a preliminary star schema by selecting any one table in the Explorer Diagram. Right-click
on it and select Generate a Star Schema from this Table to create a full star schema design.
You can dock the Explorer Diagram onto the workspace by clicking the docking button. From the docked
window, you have the option of splitting your screen horizontally or vertically.
Use the Options dialog box to customize the default diagram settings. For example, if your tables contain
many columns or use long names, the data in the diagrams may not be fully displayed. Adjust the
maximum table size options on the General tab to ensure that all your data is displayed. Use the Colors
tab to modify default colors used to identify diagram characteristics.
Procedure
1. Select two tables that you want to join.
If you cannot create a direct join between two tables, use intermediate tables. To add intermediate
tables, drag the tables from the Explorer Tree onto the Query Subject Diagram. Then, create the
required joins by linking the tables through the intermediate tables.
Tip: An intermediate table has a dashed outline.
2. Click the Create a Model Relationship icon .
The Modify the Relationship dialog box is displayed. A new join line is displayed.
3. Select a column from each table to create the new relationship.
4. Select the appropriate relationship cardinality.
5. Click OK twice to return to the Model Accelerator workspace.
If your action results in an invalid model, the Model Warning view displays.
Results
Alternatively, from Relationship Editing Mode, you can select the columns you wish to join and then click
the Create a Model Relationship icon . The Modify the Relationship dialog box displays with the join
displayed between the selected columns.
Procedure
1. From any of the diagram views, right-click to access the pop-up menu. Select Options and click the
General tab.
2. Select the type of notation to represent relationships.
You can use Simplified Crowsfeet, Standard Crowsfeet, or Numeric Cardinality notation. By default,
Model Design Accelerator uses Simplified Crowsfeet notation which provides a pictorial representation
of the relationship.
3. Set a maximum table size for the Explorer and Query Subject diagrams.
4. Set a maximum table size for the Model Accelerator workspace.
5. Select whether you want a text description displayed beside each tool icon.
6. Select whether you want the introductory screen displayed every time you start Model Design
Accelerator.
7. Click the Colors tab to change the colors of diagram objects.
Default colors are assigned to the different characteristics of diagram objects. Change the colors to
customize your display.
The View Background Color indicates that changes made in the active window will result in changes
to the star schema design. This allows you to easily identify windows used for editing and windows
used only for viewing.
8. Click OK.
Creating a project
In Model Design Accelerator, you work in the context of a project.
Use the Explorer Tree to explore the tables and columns in your data source. Select the measures that
you want to include in your reports and add them to the fact query subject in the Model Accelerator
workspace. Measures are numeric columns in a database table or view that can be grouped or
aggregated. Examples of measures are Production Cost or Quantity. Model Design Accelerator tracks
the required keys and automatically includes them in the model. There is no requirement to add keys.
Select only the measures you want report authors to see in your package.
Select measures in the Explorer Tree and drag them onto the fact query subject in the Model Accelerator
workspace. You can also make your selections from the Explorer Diagram.
All the measures being added must be from the same table in your data source. If you try to add
measures from multiple tables, or add query items that are not measures, the Model Warning dialog
box will display. This is because Model Design Accelerator supports only a single fact table star schema
model.
When your star schema is complete or ready for testing, click Generate Model to build the model and
enter IBM Cognos Framework Manager.
The Model Advisor tests are applied to the resulting model. In the Verify Model Results tab, review the
issues that are identified. There is a description of each issue and a list of objects that are impacted by the
issue. For more information on the Model Advisor, see “Analyzing models” on page 150.
The star schema model that you created will usually contain only a subset of query items from the data
source. When you generate a model, only the metadata that is required to support your star schema
model is imported into Framework Manager.
Each time you generate a model, new namespaces are created in the open Framework Manager project.
The Physical View contains only the tables that were imported to support the star schema model. The
Business View contains model query subjects with only the columns you selected when building the
query subjects. These are the objects you built in Model Design Accelerator. The Presentation View
contains a collection of shortcuts referencing the model query subjects in the Business View.
From Framework Manager, you can enhance the model by adding calculations, filters, additional
languages, and dimensional structures. However, each time you generate a new model, new namespaces
are created and your enhancements are not applied to the new namespaces.
You can return to Model Design Accelerator at any time to edit your star schema. You must publish the
model in Framework Manager to use it in the IBM Cognos studios.
Data sources
Before you can create models and import metadata, you must define data sources.
IBM Cognos software supports many different types of data sources. The data source connection
information may vary for each type of data source you use.
In a Framework Manager model, catalogs and schemas are properties that are associated with a data
source object. If present, these properties qualify any object that is generated in an SQL statement at run
time.
When switching the data source against which a model is mapped, qualification levels are often removed.
The Relational Database Management System (RDBMS) applies appropriate name space searches as it
prepares the SQL statements it receives. Depending on the vendor, the RDBMS may look in up to two
places to resolve a reference to an object. An error results if a reference cannot be resolved.
IBM Cognos Framework Manager preserves the names of tables and columns as presented by the
RDBMS. These names display in generated Cognos SQL statements. Cognos SQL uses quotes for the
names to preserve case and to avoid conflicts with special characters or keywords.
You can secure data sources using IBM Cognos authentication. IBM Cognos authentication respects any
security that is also defined within the data source. You can create data source signons to isolate the
database logon process from the end users. The signon stores the user ID and password required to
access the database. You can also deploy data sources.
For more information about data source connections, see the IBM Cognos Analytics Administration and
Security Guide.
Native metadata
IBM Cognos supports OLAP data sources as well as relational data sources. The term native metadata
refers to objects such as models, packages, and queries that are based on an OLAP data source.
A namespace that contains native metadata uses this icon to indicate that it is different from
namespaces containing other types of metadata.
OLAP data sources are metadata rich data sources. Explicit modeling for these data sources is not
enabled in Framework Manager and the package is published directly to the portal. For more information,
see “Publishing packages based on OLAP data sources” on page 218.
Levels are created using the generation names in the labels. If you want to alter the way levels are named,
you can do this by changing the dimension build settings in the application that generated the cube. For
more information, see the vendor documentation.
Relational data sources require dimensional modeling to enable them to work in IBM Cognos Analysis
Studio and to work with drill capabilities in the other studios. For more information about dimensional
modeling, see “Dimensions” on page 81.
If you installed IBM Cognos components on UNIX servers, locate the file-based data source on a UNIX
server. You should then use a UNIX path, such as /servername/cubes/Great Outdoors Company.mdc to
access the file.
Compound packages contain both OLAP and relational metadata.
Each data source can have one or more physical connections to the database.
If you have access to more than one data source connection in a data source, you are prompted to
select a data source connection when you open an IBM Cognos Framework Manager project. You can use
multiple data source connections in a single data source to facilitate the migration from one environment
to another and maintain the integrity of a project.
For example, you can use multiple data source connections to work with metadata from a test data
source. Create a new project, using the GoSales data source connection. Create and modify the objects
you want in the project, and test to ensure that the project is modeled the way you want. After you
close the session, and reopen the Framework Manager project, you can select the production data source
connection. When you publish the package to the IBM Cognos Analytics server, your users choose which
data source connection they want to use in their report.
Isolation levels
The isolation level specifies how transactions that modify the database are handled. By default, the
default object gateway is used. Not all types of databases support each isolation level. Some database
vendors use different names for the isolation levels.
Queries that are executed by reports and analysis are intended to be read-only operations. The queries
execute with a unit of work at the data source known as a transaction with either a default or
administrator-defined isolation level. Report authors should not assume that queries that execute stored
procedures commit any data written by the procedure. In some environments, changes made by a
procedure may be committed due to features of the database. A stored procedure that is marked for-write
in Framework Manager commits changes but can only be used by Event Studio.
If you need specific queries to run with different isolation levels, you must define different database
connections.
For OLAP data sources, including SAP BW, the transaction unit of work is read-only.
The following isolation levels are in increasing order of isolation:
• Read Uncommitted
Changes made by other transactions are immediately available to a transaction.
• Read Committed
A transaction can access only rows committed by other transactions.
• Cursor Stability
Other transactions cannot update the row in which a transaction is positioned.
• Reproducible Read
Rows selected or updated by a transaction cannot be changed by another transaction until the
transaction is complete.
• Phantom Protection
A transaction cannot access rows inserted or deleted since the start of the transaction.
• Serializable
A set of transactions executed concurrently produces the same result as if they were performed
sequentially.
Oracle Serializable
Procedure
1. Click the namespace, folder, or segment you want to import into.
Results
The data source connection that you create in Framework Manager, is also available in IBMDB2® Cognos
Administration, and in the new administration interface in Manage > Data server connections.
What to do next
You can test the data source connection from the Data Sources folder in the Project Viewer. Right-click
the data source, and click Test.
Importing metadata
You can import metadata into a new project or an existing project. Importing metadata is an operation
that can be performed many times to extend the project.
IBM Cognos Framework Manager can use the metadata and data from external data sources to build a
project.
To import metadata, you must indicate which sources you want and where they are located. You can
import from only one data source at a time. If you want to import from more than one data source, you
must perform multiple imports.
You can import metadata from
• Relational databases, such as Oracle, IBM Db2, and Microsoft SQL Server
• SAP BW data sources
• IBM Cognos models
• Architect models and Impromptu catalogs
• IBM Cognos DecisionStream or Data Manager models
For information about working with data source connections, see “Data source connections” on page 30.
When you import metadata, you can select how you want the import to handle duplicate object names.
You have the option of not importing the object, or importing and creating a unique name. The advantage
of importing everything except these duplicate objects is that you can add new database objects to
the project without specifying them individually, and without going through synchronization. To import
metadata that has the same table names, you must create two namespaces and import each table into a
different namespace.
When you import SAP BW metadata, IBM Cognos Framework Manager assigns a unique name to each
object. Therefore, if you rename an object in the model and then reimport it, Framework Manager
recognizes that it already exists. To reimport an object with a different unique name, you can create a
new namespace and reimport the object into this namespace.
You can also import objects that have the same name.
All objects shown in the table above that are imported appear in the Project Viewer as metadata, except
for functions. The functions appear in the Explorer tab in the middle pane, under the namespace that you
imported the functions to. The functions also appear in the expression editor where you can use them to
create expressions. You can import each function only once, unless you select the Import and create a
unique name option to avoid duplicate name conflicts.
Named sets imported from Microsoft SQL Server and Microsoft Analysis Server are stored as read-only
calculations in the Framework Manager model. The calculation has a flag that identifies it as a named set,
and a property that contains the dimension name.
IBM Cognos Analytics (BI) does not support Oracle packages, which are essentially groups of procedures
and functions. As a result, the synonyms for the Oracle packages do not appear in Framework Manager.
Oracle stored procedures, functions, and synonyms are supported in Cognos Analytics and can be
imported by using the Framework Manager Metadata Wizard as long as they do not reference an Oracle
package.
Procedure
1. Click the namespace, folder, or segment that you want to import into.
What to do next
After importing metadata, you must check the imported metadata for the following areas:
• Relationships and cardinality. For more information, see “Cardinality” on page 46.
• Determinants. For more information, see “Determinants” on page 61.
• The Usage property for query items. For more information, see “Formatting query items” on page 114.
• The Regular Aggregate property for query items. For more information, see “Formatting query items”
on page 114.
Values can be passed to each parameter by using prompt macros specified in the value definition. The
prompt can be assigned a name that is not the same as the parameter name. The data type of the prompt
can be defined as shown in the following table:
SAP HANA parameters can be defined as mandatory or optional. If the prompt macro is defined with a
default value, the parameter is treated as optional. At run time, if a report does not pass a value to the
prompt, the parameter is not included in the set of placeholders in the SQL statement that is passed to
SAP HANA. If a promptmany macro is used, multiple values provided to the prompt are combined into a
delimited list of values that are passed to the SAP HANA placeholder.
Parameters can be defined with constants or macro expressions that do not include prompts. The
constant value must be supported by the associated logic in the SAP HANA view that references the
SAP HANA input parameter.
When a data source query subject is created by an import, it is assigned a logical SQL query. This query
should not be edited. Predicates can be defined by using detail filters. Additional calculated fields can
be defined by using calculated fields that are associated with the data source query subject or with the
model query subjects that refer to the data source query subject.
Framework Manager does not import SAP variables. Detail filters can be defined in a query subject that
include predicates in the SQL statement that is passed to SAP HANA.
The data source query subject can be updated by using the Update Object action. This action recreates
the set of parameters associated to the data source query subject. Alternatively, the data source
query subject parameters can be maintained by adding, deleting, renaming, or updating the parameters
properties to align them with the SAP HANA view parameters.
Important:
The following parameter value is defined to accept a single input value, and is not optional.
#prompt('mandatory_prompt', 'integer')#
The following parameter value is defined to accept one or more input values.
#promptmany('multi_value_prompt', 'date')#
The following parameter value is defined as a macro. Please note that there is a space inside the
quotation mark.
#’ ‘#
123
Procedure
1. Click the namespace, folder, or segment you want to import into.
2. Click Actions, Run Metadata Wizard.
3. Click IBM Cognos Model, Next.
4. Locate the model (.cpf file) that you want, and click Open, Next.
5. Follow the instructions in the Import wizard:
• Select the check boxes for the objects that you want to import.
• Specify how the import should handle duplicate object names.
Choose either to import and create a unique name, or not to import. If you choose to create a
unique name, the imported object displays with a number. For example, you see QuerySubject and
QuerySubject1 in your project.
Procedure
1. Ensure that you exported the Architect model or Impromptu catalog.
2. Click the namespace, folder, or segment you want to import into.
3. Click Actions, Run Metadata Wizard.
4. Click either IBM Cognos Architect (.xml) or IBM Cognos Impromptu (.xml), and click Next.
5. Locate the Architect or Impromptu XML file that contains the metadata to import.
A message in the XML Preview window confirms that you chose a valid XML file.
6. Click Open.
7. Select the namespace containing your Series 7 security information.
8. Click Import.
A list of created objects displays.
9. If you want to verify the imported metadata, click the Verify after import check box.
10. Click Finish.
Physical metadata
Relationship namespace
Star (Fact)
Regular dimension
Scope relationship
Star Schema
Groupings
Star namespace:
shortcut to regular
dimension
Business view
Star namespace: namespace
shortcut to measure
dimension
Facts
A star maps to a Framework Manager query subject in the Physical Metadata namespace or as a measure
dimension in the Dimensions namespace. The following fact attributes are included in the model.
Connections
A connection maps to a Framework Manager data source.
Note: A data source connection is not automatically created in IBM Cognos Administration. You must
manually create the connection in IBM Cognos Administration as explained in the import procedure steps.
For more information, see “Importing metadata from IBM Cognos DecisionStream or IBM Cognos Data
Manager” on page 39.
The following data source attributes are included in the model.
Dimension builds
A dimension build maps to Framework Manager as a top-level namespace.
Hierarchies
A dimension containing hierarchies, levels, and columns maps to a Framework Manager regular
dimension containing hierarchies, levels, and query items.
Conformed stars
Conformed stars map to a Framework Manager namespace that resides in the Business View namespace.
It contains shortcuts referencing the dimensions.
The following conformed star attributes are included in the model.
Star short name The name of the namespace representing the star
Model properties
The export file contains the following model properties.
Model short name The name of the namespace representing the top-
level model object
Procedure
1. Click the namespace, folder, or segment that you want to import into.
2. Click Actions, Run Metadata Wizard.
3. Click IBM Cognos DecisionStream (.xml) or IBM Cognos Data Manager (.xml), and click Next.
4. Locate the XML file that contains the metadata to import.
A message in the XML Preview window confirms that you chose a valid XML file.
5. Click Open, Import.
A list of created objects displays.
6. If you want to verify the imported metadata, click the Verify after import check box.
7. Click Finish.
8. Create the data source connection in IBM Cognos Administration. The name you define in IBM Cognos
Administration must be the same as the data source name shown in the Data Sources folder in
Framework Manager.
Procedure
1. Click the model or root namespace, and click Actions, Create, Namespace.
2. Right-click the namespace, click Rename, and type a descriptive name.
After importing metadata, you must ensure that it is set up to meet your users' reporting requirements,
and provide any additional information that they require. Enhancements you make in IBM Cognos
Framework Manager do not affect the original data source.
Tip: To verify that the model meets the reporting requirements, you can select objects that will display in
a report and test them. The test results show you the report that your users will see as well as the SQL
and messages from the IBM Cognos software, if any. Or you can publish a package at any time and then
use the package to create reports.
You can check the project at any time to ensure that the references between the objects it contains are
valid. See “Verifying models or packages” on page 205.
Create at least two views: the import view and the business view. Using two, or more, views makes it
easier to remap items to a new data source.
Procedure
1. Ensure that the relationships reflect the reporting requirements.
2. Optimize and customize the data retrieved by query subjects.
3. Optimize and customize the data retrieved by dimensions. You may want to store dimensions in a
separate dimensional view.
4. Handle support for multilingual metadata.
5. Control how data is used and formatted by checking query item properties.
Procedure
1. Add business rules, such as calculations and filters, that define the information users can retrieve.
2. Organize the model by creating separate views for each user group that reflect the business concepts
familiar to your users.
3. Create a durable model that can withstand later changes to query item names with no impact on
existing reports, and report authors.
Results
You can analyze the metadata to ensure that the model is following current modeling guidelines by using
the Model Advisor.
Relationships
A relationship describes how to create a relational query for multiple objects in the model. Without
relationships, these objects are isolated sets of data.
Relationships work in both directions. You often must examine both directions to fully understand the
relationship.
The different types of relationships are
• One-to-one
One-to-one relationships occur when one instance of data in a query subject relates to exactly one
instance of another. For example, each student has one student number.
• One-to-many or zero-to-many
One-to-many or zero-to-many relationships occur when one instance of data in a query subject relates
to many instances of another. For example, each teacher has many students.
• Many-to-many
Many-to-many relationships occur when many instances of data in a query subject relate to many
instances of another. For example, many students have many teachers.
When importing metadata, IBM Cognos Framework Manager can create relationships between objects
in the model based on the primary and foreign keys in the data source. You can create or remove
relationships in the model so that the model better represents the logical structure of your business.
After you import metadata, verify that the relationships you require exist in the project and that the
cardinality is set correctly. The data source may have been designed without using referential integrity.
Often, many primary and unique key constraints are not specified. Without these constraints, Framework
Manager cannot generate the necessary relationships between fact tables and dimension tables.
Framework Manager stores relationships in the nearest common parent of the objects that participate in
the relationship. The parent can be either a folder or a namespace. If you move one of the participating
objects outside the common parent, the relationship moves to the next namespace that is common
to both ends of the relationship. If you move a relationship to a different folder or namespace, the
participating objects also move to the same folder or namespace.
Tip: Use the Search tab (Tools pane) to find an object of class Relationship whose name matches a
specified pattern. For example, if you search for a relationship whose name contains Order Header,
Framework Manager finds all relationships that have Order Header as one end. If you renamed a
relationship, a search of this type may not find it.
Cardinality
Relationships exist between two query subjects. The cardinality of a relationship is the number of related
rows for each of the two query subjects.
The rows are related by the expression of the relationship; this expression usually refers to the primary
and foreign keys of the underlying tables.
IBM Cognos software uses the cardinality of a relationship in the following ways:
• to avoid double-counting fact data
• to support loop joins that are common in star schema models
• to optimize access to the underlying data source system
• to identify query subjects that behave as facts or dimensions
The cardinality of a relationship defines the number of rows of one table that is related to the rows of
another table based on a particular set (or join) of keys. Cardinality is used by IBM Cognos software to
infer which query subjects behave as facts or dimensions. The result is that IBM Cognos software can
automatically resolve a common form of loop join that is caused by star schema data when you have
multiple fact tables joined to a common set of dimension tables.
It is important to ensure that the cardinality is correctly captured in the model because it determines the
detection of fact query subjects and it is used to avoid double-counting factual data.
When generating queries, IBM Cognos software follows these basic rules to apply cardinality:
• Cardinality is applied in the context of a query.
• 1 to n cardinality implies fact data on the n side and implies dimension data on the 1 side.
• A query subject may behave as a fact query subject or as a dimensional query subject, depending on the
relationships that are required to answer a particular query.
Use the Model Advisor to see an assessment of the behavior implied by cardinality in your model.
For more information, see “Single Fact Query” on page 293 and “Multiple-fact, Multiple-grain Query on
Conformed Dimensions ” on page 294.
Notation
By default, Framework Manager uses Merise notation. Merise notation marks each end of the relationship
with the minimum and maximum cardinality of that end. You can also use Crowsfeet notation, which
provides a pictorial representation of the relationship.
For information about how to change the notation, see “Changing the settings for diagrams” on page 12.
When you interpret cardinality, you must consider the notation that displays at both ends of the
relationship.
Possible end labels are
• 0..1 (zero or one match)
• 1..1 (exactly one match)
• 0..n (zero or more matches)
• 1..n (one or more matches)
The first part of the notation specifies the type of join for this relationship:
• An inner join (1)
An inner join shows all matching rows from both objects.
• An outer join (0)
An outer join shows everything from both objects, including the items that do not match. An outer join
can be qualified as full, left, or right. Left and right outer joins take everything from the left or right side
of the relationship respectively and only what matches from the other side.
Your users see a different report depending on whether you use an inner or outer join. For example, your
users want a report that lists salespeople and orders. If you use an outer join to connect salespeople and
orders, the report shows all salespeople, regardless of whether they have any orders. If you use an inner
join, the report shows only the salespeople who have placed orders.
Data in one object might have no match in the other object. However, if the relationship has a minimum
cardinality of 1, an inner join is always used and these records are ignored. Conversely, if all the items
match but the relationship in the model has a minimum cardinality of 0, an outer join is always used,
although the results are the same with an inner join. For example, the underlying table for one object
Sparse data
When modeling for analysis or reporting, it is important to consider the nature of the business questions
versus the nature of the data source.
A common scenario is that a relationship between a dimension and a fact table in a star schema
is optional. This means that not every dimensional member is mandatory in the fact table. OLAP
engines compensate for this by inserting an appropriate value when creating the OLAP structure for
any dimensional intersection points that do not have data.
For example, an Analysis Studio user wants to create this report:
Canada 1,000,000
When modeling, it is common to override optional relationships between dimensions and facts for
improved performance. However, when performing analysis or reporting on sparse data where you require
information about dimensional members that have no facts, outer joins must be enabled to ensure that
data is returned for valid dimensional intersection points.
To enable outer joins, do the following:
• Check with your database administrator to ensure that the data source can support full outer joins.
• Import metadata with outer joins enabled.
Modifying a relationship
After you import data or create a relationship in IBM Cognos Framework Manager, you can rename the
relationship and redefine cardinality.
You can create custom relationship expressions by selecting an operator from the list or by manually
changing the expression in the expression editor.
You can also create a complex expression for the relationship.
You can view the relationships that already exist for an object by selecting the object and clicking Launch
Context Explorer from the Tools menu.
Procedure
1. Click a relationship and, click Actions, Edit Definition.
2. To modify existing elements, on the Relationship Expression tab, select the query items, cardinalities,
and operator you want.
The query items must have the same data type.
3. To create an additional join, on the Relationship Expression tab, click New Link, and define the new
relationship.
4. To test the relationship, on the Relationship SQL tab, identify the number of rows you want returned
and click Test.
5. Click OK.
If your metadata is from an OLAP data source, click Close.
Procedure
1. Click a relationship and, click Actions, Edit Definition.
2. On the Relationship Expression tab, click the ellipses(...) button next to the Expression box.
3. Define the expression.
If you insert session parameters or prompts and you want to specify the values that they represent
Creating relationships
You create a relationship to join logically related objects that your users want to combine in a single
report. This is useful for relationships between objects that were not selected during metadata import,
were not joined in the data source, or are from multiple sources.
You can directly create a relationship between the query items.
You can also create a complex expression for the relationship.
You can also use IBM Cognos Framework Manager to automatically generate relationships between
objects based on selected criteria.
You can view the relationships that already exist for an object by selecting the object and clicking Launch
Context Explorer from the Tools menu.
Procedure
1. Ctrl+click one or two dimensions, query subjects, or query items.
2. Click Actions, Create, Relationship.
If this relationship is a valid target for a relationship shortcut, Framework Manager asks if you want to
create a shortcut to that relationship. For more information, see “Creating a relationship shortcut ” on
page 50.
3. Click OK.
The Relationship Definition dialog box displays. You can use this dialog box to modify the
relationship.
Procedure
1. Ctrl+click the objects that you want to participate in the relationship shortcut.
Procedure
1. Ctrl+click two or more objects.
2. Click Tools, Detect Relationships.
3. Select the rules you want to apply to each pair of tables.
Rule Result
Use primary and foreign keys Creates joins that are based on primary key and
foreign key relationships. The query item names
do not have to match.
Use matching query item names that represent Creates joins between query items whose names
uniquely indexed columns and data types match, if one or both of the
underlying columns are uniquely indexed.
Use matching query item names Creates joins between query items whose names
and data types match. This generates as many
relationships as possible.
4. Indicate whether you want Framework Manager to detect and generate relationships between
• The selected objects
• Each selected object and every object in the project that is not selected
• The selected objects and every other object in the project
5. Identify whether you want Framework Manager to create outer joins or inner joins based on outer joins
that exist in the data source.
6. If you want to disable the automatic prevention of double-counting, convert all n cardinalities to 1 by
clearing the Fact detection enabled check box.
7. Click OK.
When a query is executed, dynamic query mode determines which tables must be joined together. Query
subjects which are on the many side of a one-to-many relationship are treated as facts. In the previous
figure, OWNER_PROPERTY_BRIDGE is assumed to be a fact due to the one-to-many relationships. This
may cause queries to not return the expected result set.
A query subject has a usage property which can be set to the value of Bridge. This property enables
dynamic query mode to generate queries knowing that the query subject is not a fact due to the one-to-
many relationships. A model may include several bridges:
• An owner may own several properties.
Restrictions
Bridge tables are subject to the following restrictions.
• Dynamic query mode assumes that a bridge table has been used to resolve a many-to-many
relationship between dimensions. Design techniques which introduce a bridge table between a
dimension and fact table are not supported.
• Dynamic query mode requires non-ambiguous join paths between two query subjects. In the following
figure, a model defines two join paths between OWNER and PROPERTY.
If a query only references items from OWNER, PROPERTY, and CONTRACTOR, dynamic query mode is
unable to determine which bridge table it should use and will return the following error.
– Query 'Query1' has implicit and explicit references to multiple parallel bridge query subjects:
[VIEW].[OWNER_PROPERTY_BRIDGE], [VIEW].[OWNER_PROPERTY_BROKER_BRIDGE].
• Reports may include summaries if grouped headers or footers are automatically calculated by dynamic
query mode. Queries may also include expressions used to filter data or compute new attributes and
measures. Dynamic query mode may return an error for some scenarios when bridge query subjects are
present.
Query subjects
A query subject is a set of query items that have an inherent relationship.
Framework Manager generates query subjects that represent tabular data from the data source. For
example, a query subject that references an entire table contains query items that represent each column
in the table. If the SQL selects only specific columns, only those columns are represented as query items.
Each data source query subject can reference data from only one data source at a time. However, the
advantage of data source query subjects is that you can directly edit the SQL that defines the data to be
retrieved. This means that you can insert parameters that control the data that the query retrieves and
create query subjects based on arbitrary SQL.
You may have created SQL statements for query subjects without enclosing references to columns and
tables in quotes. This works in relational data source environments that do not use a case-sensitive
lookup against the metadata tables they parse. The SQL statement for the query subject may be Cognos
SQL, native SQL, or pass-through SQL. Native and pass-through SQL statements must be completely
self-contained and must not reference anything outside that SQL, such as database prompts, variables,
or native formatting that would normally be supplied by the calling application. Cognos SQL statements,
however, are analyzed using metadata from either the model or the relational data source. By default,
Cognos SQL is case-sensitive, so it looks up metadata using the names as they display in the SQL
statement.
To use multiple data sources for a query subject, use a model query subject that accesses the data source
query subjects or other model query subjects.
Goal Action
Provide control over granularity Click the Determinants tab. See “Specifying
determinants” on page 64.
Test the query subject Click the Test tab. See “Testing query subjects or
query sets” on page 70.
View the SQL Click the Query Information tab. See“Editing the
SQL” on page 75.
View the system tables from the data source Select the Show System Objects check box.
9. Click OK.
A warning displays if any modifications invalidated relationships, other query subjects, calculations,
or filters.
10. Ensure that the Usage and Regular Aggregate properties are set correctly. See “Modifying how query
items are aggregated” on page 107.
Model query subjects are not generated directly from a data source but are based on query items in other
query subjects or dimensions, including other model query subjects. By using model query subjects, you
can create a more abstract, business-oriented view of a data source.
Usually, model query subjects are created in the business view, not the import view. For information about
the business view, see “Organizing models” on page 140.
Because model query subjects are based on the metadata in your model, they let you
• Reuse complex SQL statements that exist in the model
• Reference objects from different data sources in the same query subject
If you import a model query subject from another model, the model query subject will not work unless
you also import the data source query subjects that the model query subject references.
If you want to edit the SQL, you must convert the model query subject into a data source query subject.
Procedure
1. Select the namespace folder, and click Actions, Create, Query Subject.
2. In the Name box, type a name for the new query subject.
3. Click Model, OK.
4. Click the Query Subject Definition tab.
5. To add items to the model query subject, drag items from the Available Model Objects box to the
Query Items and Calculations box.
You can change the order of items and calculations. However, if the query subject contains a query
item folder, you can change the order only in the Project Viewer.
6. You can also embed a filter.
If you add calculations or filters to a model query subject, Framework Manager must go to the data
source instead of simply accessing the model.
7. If you want to test the query subject, click the Test tab.
8. Click OK.
A warning displays if any modifications invalidated relationships, other query subjects, calculations, or
filters.
9. Ensure that the Usage and Regular Aggregate properties are set correctly.
Results
You may be interested in the following related topics:
• Embedded calculations “Create a calculation (SAP BW)” on page 192
• Embedded filters “Creating a filter (SAP BW)” on page 194
• Testing and setting test options “Testing a dimension or other object (SAP BW)” on page 171
• Modifying the properties for multiple query subjects at the same time “Replacing multiple property
values” on page 13
If you have stored procedures from Informix Dynamic or Parallel Server data sources, you must edit
the parameters. Refer to the original source of the stored procedures to ensure that they are mapped
correctly.
Informix 7.x and 8.x provide only the name of the stored procedure to Framework Manager. You must
provide all parameters, such as the parameter name, data type, mode, size, precision, scale, and value so
that a result set can be obtained. Informix 9.x provides metadata for stored procedures and user defined
functions with default parameter values. Check all parameters before using them, especially the mode
attribute.
Informix functions are imported as stored procedures. After you import them, you must change them to
functions by clicking the f(x) button in the Edit Definition dialog box. This button is enabled only for these
functions. Then select the argument that represents the results or use the values obtained from the test
results.
If you have stored procedures from Composite Information server, refer to the original source of the
stored procedures to ensure that they are mapped correctly.
Composite functions are imported as stored procedures. After you import them, you must change them to
functions by clicking the f(x) button in the Edit Definition dialog box. This button is enabled only for these
functions. Then select the argument that represents the results or use the values obtained from the test
results.
Data Modification Writes a record to the data source. Use this type
when you want to use the stored procedure in
Event Studio.
If you want Event Studio users to be able to select
a parameter in a task, you must put quotation
marks around the parameter.
Warning: Testing a data modification stored
procedure in the Edit Definition dialog box results
in data being written to the data source. You
cannot roll back transactions to the data source
in Framework Manager. If undesired data is written
to the data source as a result of testing the stored
procedure, a rollback can be done by the database
administrator if the data source is configured to
support it. To test the stored procedure without
data being written to the data source, click Test
from the Tools menu.
You can also create data source query subjects, which directly reference data in a single data source
“Data source query subjects” on page 55, and model query subjects, which are based on metadata that
exists in your model “Model query subjects” on page 56.
Procedure
1. Do the following:
Goal Action
Create a stored procedure query subject Select the namespace folder and, from the
Actions menu, click Create, Query Subject.
In the Name box, type a name for the new query
subject.
Click Stored Procedure, and click OK.
Complete all the steps in the New Query Subject
wizard.
Modify a stored procedure query subject Select the stored procedure query subject that
you want to modify.
From the Actions menu, click Edit Definition.
2. Click the Definition tab and choose the action that you want.
Goal Action
Use a different stored procedure In the Stored Procedure Name box, type the
name of the stored procedure.
Change the type of the stored procedure From the Type box, select Data Query or Data
Modification.
Change which data source the stored procedure Click the ellipsis (...) button next to the Data
is in Source box.
When you import a stored procedure, a new data
source is created. You can point to the original
data source and delete the new one.
Edit an argument Click the argument and click the ellipsis (...)
button.
The Syntax box in the Query Subject Definition
dialog box shows the correct syntax to use.
Generate the projected query items Click the Test tab. See “Testing query subjects or
query sets” on page 70.
3. Click OK.
Framework Manager runs the stored procedure and, if the query subject returns a result set, validates
the query subject.
If the stored procedure does not return a result set, the query subject becomes an invalid query
subject if saved in the model. If the invalid query subject is included in the published package, the
invalid query subject cannot be used in a report.
4. Ensure that the Usage and Regular Aggregate properties are set correctly for each newly created
query item.
For example, a query item may be set as a fact when it is an identifier.
Results
You can update the stored procedure query subject if the data source changes. See “Updating query
subjects” on page 74.
Procedure
1. Create a stored procedure query subject that uses the sp_FIND_ORDER_DATE stored procedure.
The Query Subject Definition dialog box displays.
2. On the Definition tab, select the @order_number argument, and click the ellipsis (...) button.
Determinants
Determinants reflect granularity by representing subsets or groups of data in a query subject and are used
to ensure correct aggregation of this repeated data.
Determinants are most closely related to the concept of keys and indexes in the data source and are
imported based on unique key and index information in the data source. We recommend that you always
review the determinants that are imported and, if necessary, modify them or create additional ones. By
modifying determinants, you can override the index and key information in your data source, replacing it
with information that is better aligned with your reporting and analysis needs. By adding determinants,
you can represent groups of repeated data that are relevant for your application.
An example of a unique determinant is Day in the Time example below. An example of a non-unique
determinant is Month; the key in Month is repeated for the number of days in a particular month.
When you define a non-unique determinant, you should specify Group By. This indicates to IBM Cognos
software that when the keys or attributes associated with that determinant are repeated in the data, it
should apply aggregate functions and grouping to avoid double-counting. It is not recommended that you
specify determinants that have both Uniquely Identified and Group By selected or have neither selected.
Year Key Month Key Month Name Day Key Day Name
2006 200601 January 06 20060101 Sunday, January 1,
2006
2006 200601 January 06 20060102 Monday, January 2,
2006
You can define three determinants for this data set as follows - two Group By determinants (Year and
Month) and one unique determinant (Day). The concept is similar but not identical to the concept of levels
and hierarchies.
In this case, we use only one key for each determinant because each key contains enough information to
identify a group within the data. Often Month is a challenge if the key does not contain enough information
to clarify which year the month belongs to. If the Month key cannot uniquely identify the month to a
specific year, then include the Year key in the key definition for the Month determinant.
Note: While you can create a determinant that groups months without the context of years, this is a less
common choice for reporting because all data for February of all years would be grouped together instead
of all data for February 2006 being grouped together.
Similar to the example about Time, you can define three determinants for this data set as follows - two
Group By determinants (Region and State/Province) and one unique determinant (City).
State/Province Key
City Key
In this case, we used Region Key, State/Province Key, and City Key to ensure uniqueness for City. We did
this because in the data we were given, some city names were repeated across states or provinces, which
in turn were repeated for regions.
Specifying determinants
Determinants provide control over granularity for query subjects.
If a query subject has determinants, each query item of the query subject must be included in one of the
determinants.
Determinants are processed in the order in which they are specified in the model. You can change the
order of the determinants. If a query subject has more than one determinant, the first one that covers all
the requested items is used. Determinants are evaluated in the context of each required join as well as
the context of requested items.
Data source query subjects are imported with determinants defined for them. These default determinants
are generated based on keys and indexes in the data source.
Procedure
1. Click the query subject you want, and click Actions, Edit Definition.
2. Click the Determinants tab.
3. Click Add under the Determinants box.
The entry New Determinant displays in the box. To give this entry a meaningful name, right-click it,
and click Rename.
4. To define a key, right-click a query item in the Available items box and click Add as Key.
Tip: You can also drag query items to the Key box.
5. To identify which query items should be associated with this determinant, right-click query items in the
Available items box, and click Add as Attributes.
Tip: You can also drag query items to the Attributes box.
You can have a determinant with no attributes defined for it. Framework Manager uses this type of
determinant to indicate which query items are indexed.
6. To specify that the selected determinant should be used as the unique identifier, select the Uniquely
Identified check box.
Do this only if the data in this item is unique for every row in the underlying data source.
You can specify more than one unique determinant if they are truly unique. At query time, the
relationship being used will determine which unique determinant to use.
7. Select the Group By check box to indicate that when keys or attributes associated with that
determinant are repeated in the data, IBM Cognos Analytics should apply aggregate functions and
grouping to avoid double-counting.
8. If you want to change the order of the determinants, use the arrow buttons.
Determinants are processed in the order in which they are specified in the model.
9. Click OK.
Results
For more information, see “Determinants” on page 61 and Chapter 10, “The SQL Generated by IBM
Cognos Software,” on page 293.
Procedure
1. Ctrl+click the objects that you want to merge into a single query subject.
2. Click Actions, Merge in New Query Subject.
Procedure
1. Select one or more objects that you want to explore.
2. From the Tools menu, click Launch Context Explorer.
3. To see the connected objects, click one or more objects and click the appropriate button.
Goal Button
4. If you want to see details about an object, such as its relationships and query items, right-click the
object, click Navigate Diagram, Diagram Settings, and then select the details you want.
Row Value
1 Jane
2 John
3 John
4 Michael
5 Michael
Row Value
1 Jane
2 John
3 John
4 Patrick
You create a query set. You see different results depending on the operator you use.
Union Jane, John, Michael, Patrick All items are shown. Values are
not duplicated.
Union All Jane, Jane, John, John, John, All items are shown. Values are
John, Michael, Michael, Patrick duplicated.
Except All Michael, Michael Items that are not common are
shown. Values are duplicated.
If the second query subject were
listed first in the query set, the
result would be Patrick.
Procedure
1. Select two query subjects that meet these requirements:
• Each query subject must have the same number of columns.
• Columns must be in the same order.
• Columns must have the same or similar data types.
The data types do not need to be exactly the same if those in the second result set can be
automatically converted by the data source to data types compatible with those in the first result set.
For example, one query subject contains country data and uses int as the data type. Another query
subject contains country data and uses smallint as the data type. Framework Manager imports
these query subjects as int16 and int32 and performs a set operation.
2. Click Actions, Define Query Set.
3. Click the Definition tab.
4. In the Name box, give the query set a name.
Option Description
7. To create a Union All, Intersect All, or Except All operation, clear the Remove Duplicate Row check
box.
8. Choose the action that that you want.
Goal Action
Work with the calculations that are embedded in Click the Calculations tab.
the query subjects
You can add or edit the calculations and change
the order of the calculations.
Work with the filters that are embedded in the Click the Filters tab.
query subjects
You can add or edit the filters, change the order
of the filters, and change the usage of filters.
9. Click OK.
Results
You may be interested in the following related topics:
• Embedded calculations “Creating calculations” on page 120
• Embedded filters “Creating filters” on page 121
• Determinants “Specifying determinants” on page 64
• Testing the query set or changing the test settings “Testing query subjects or query sets” on page 70
Testing Objects
You can see the results that an object returns by testing it. You can test when creating an object or later
on. The objects you can test are dimensions, query subjects, query sets, hierarchies, levels, calculations,
and query items.
If you test a child segment of a segmented model, you may see an error if an object you are testing refers
to an object in another child segment and the referenced object is not available to the project you are in.
Check that the parent model contains all the objects and that this error message does not display when
you test the parent model.
Governor settings may affect the testing results. For more information, see “Governors” on page 247.
You can change existing test settings to customize the results that the test shows. For example, in
addition to other settings, you can control the number of rows returned.
Procedure
1. Select the object you want to test.
2. Click Actions, Edit Definition, and then click the Test or Query Information tab.
The Test Results box is initially empty until you run the query.
Any result sets that contain binary large objects are shown as [blob].
3. To run the query and bring back all the test results, click Test Sample.
4. If you want to add a count of the rows, click Total Rows.
5. If you want to apply the Regular Aggregate property of the query item or the Aggregate Rules
property of a semi-additive measure that is referenced in the expression, select the Auto Sum check
box.
If you clear this check box, a row is returned for each row in the result set of the query.
6. If you want to obtain more information about the query results, click the Query Information tab.
7. Click OK.
Procedure
1. Select the objects that will display in the report.
2. Click Tools, Test.
3. To run the query and bring back all the test results, click Test Sample.
4. To view details about any problem that is found, click the Query Information tab.
Procedure
1. Select the object that you want.
2. Click Actions, Edit Definition, and then click the Test tab or the Query Information tab.
3. Click Options, Test Settings .
4. Choose the options that you want.
Retrieve all data and show a Select the Restrict the This setting applies to all
specified number of rows maximum number of rows to dimensions, query subjects, and
be returned check box and type query sets in the model.
the required number of rows.
This setting is saved and used
This setting does not improve in your next session with any
performance for retrieving data model.
when testing dimensions, query
subjects, and query sets.
Specify the level of detail Drag the Level of Information This setting is saved and used
shown in Results Information in your next session with this
slider to the location that model.
represents the amount of detail
you require.
Temporarily override session In the Session Parameters box, The override values are not
parameters click Set. saved with the model. This
setting is for your current
The Session Parameters dialog
session only.
box displays.
Apply relevant design mode Select the Apply all relevant This setting is saved and used
filters design mode filters when in your next session with any
testing check box. model.
This applies all relevant filters
whose usage is set to design
mode in another dimension,
query subject, or query set.
Apply a security filter In the Security Filters box, click This setting is saved and used
Edit. in your next session with this
model.
Change the prompt values In The Current Prompt Values The prompt values are not saved
box, click Prompts. with the model.
The Model Prompts Manager This setting is for your current
dialog box displays, which session only.
shows all prompts, and their
values, that are in the model.
Results
You may be interested in the following related topics:
• Setting governors
• Security filters
• Temporarily overriding session parameters
• Changing prompt values
• Working with dimensions
• Working with query subjects
Information about validating SAP BW query subjects displays in a different topic “Validating model query
subjects (SAP BW)” on page 175.
The Validate Object command completes an exhaustive check of all query subjects and ensures that they
can run.
What happens in the evaluation process depends on the type of query subject selected.
Relational data source query subject A request based on the derived items is sent to the
relational data source.
The list of data source references is updated.
The physical attributes, such as data type, are
updated as needed.
Model query subject based on relational metadata A request based on the derived items is sent to the
data source.
The cached SQL, if available, is updated.
The physical attributes, such as data type, are
updated as needed.
Stored procedure query subject A request based on the latest parameters of the
stored procedure is sent to the data source.
The list of derived query items is updated.
You can also update the query subject “Updating query subjects” on page 74 if it is from a relational data
source, or synchronize the entire project “Synchronizing projects” on page 245.
Procedure
1. Select the query subject that you want to evaluate.
2. Click Tools, Validate Object.
Results
If you changed the Regular Aggregate property to unsupported, the property is reset when you evaluate
the query subject. If the property is set to any other value, the property is not changed.
Procedure
1. Select one or more query subjects.
2. Click Tools, Update Object.
Tip: If you modify the SQL statement in the Query Subject Definition dialog box, an Update Object
operation is initiated when you click OK.
Procedure
1. Select the query subjects that you want to convert.
2. ClickActions, Convert to Regular Dimension, or Convert to Measure Dimension.
Procedure
1. Select the model query subject that you want to convert.
2. Click Actions, Convert to Data Source Query Subject.
This command is available only if you have run the query and the Query Information tab in the Edit
Definition dialog box contains SQL.
Procedure
1. Click the data source query subject that you want to change.
2. Click Actions, Edit Definition.
3. Click the SQL tab, and drag objects into the SQL box or type in the SQL you want.
4. Click OK.
Cognos SQL Cognos SQL improves query You cannot enter non-standard
subject performance; for SQL.
example, by removing unused
elements at query time.
SQL works on any supported
database.
Native SQL Performance is optimized across You cannot use SQL that the
all related query subjects. data source does not support for
subqueries.
You can use SQL that is specific
to your database. The SQL may not work on a
different database type.
Pass- Through SQL You can enter any SQL supported There is no opportunity
by the database. for Framework Manager
to automatically optimize
performance.
The SQL may not work on a
different data source.
If you change it to native SQL, Framework Manager generates the following statement:
Select
oracle_plain.ProductName as Productname,
oracle_plain.Margin as Margin
From
(GOSALES1_OR_92_WE...
Select
P.PRODUCTNAME, P.MARGIN
From
PRODUCT P})oracle_plain
Therefore, you must ensure that the query subject adheres to additional database restrictions that
are imposed on subqueries, such as not using the With clause. Pass-through SQL does not have the
same restrictions. However, the fact that native SQL is processed as part of a larger query improves its
performance.
To test native SQL using a query tool, such as Oracle's SQL*Plus, you must place the SQL in the From
clause of a Select statement. For example, you can use the following syntax in a query tool:
SELECT
Length(Country) as LGTH
FROM
Country
Select
COUNTRY as "test"
From
COUNTRY
• If a data source query subject contains a macro in the projection list (Select clause) of the SQL
statement, specify an alias in the SQL that matches the Column Name property of the query item.
An error could occur because the macro evaluates to a column name that is different from the Column
Name property of the corresponding query item. The result is that the system is unable to locate the
item in the projection list. Projection lists are static.
Assigning an alias ensures that the name of the item in the projection list remains constant, as the
results of evaluating the macro change.
For example, the following query contains a session parameter, runLocale, whose value specifies which
column the query retrieves:
Select
#$ColumnMap{$runLocale}# as CountryNameAlias
From
[GoSales].Country
Procedure
1. Click the query subject that you want to change.
2. Click Actions, Edit Definition, and then click the Query Information tab.
The Test Results box is initially empty until you run the query.
3. Click Options, SQL Settings.
4. Use the SQL Type list to change the type of SQL.
If you are changing the type to native SQL, see the checklist above to ensure that the SQL reflects the
rules that apply to the native data source.
5. Click OK.
6. If you want to see the SQL, click Test Sample.
7. If you want to see the actual query, click Query.
8. If you want to see the xml that IBM Cognos Analytics uses, click Response.
9. Click OK.
Cognos SQL
By default, IBM Cognos Framework Manager uses Cognos SQL to create and edit query subjects. Cognos
SQL adheres to SQL standards and works with all relational and tabular data sources. Framework Manager
generates the most optimized SQL possible. In this way, Cognos SQL is preferable.
Because query subjects in Framework Manager are similar to views in databases, the SQL for each query
subject must conform to the SQL standards that apply to views. For example, you must assign aliases to
any column that is empty or whose name is not unique. This level of conformance means that Cognos SQL
behaves more consistently than vendor-specific SQL, which does not adhere to SQL standards.
In general, using Cognos SQL is preferable because you can create query subjects that
• Can contain metadata from multiple data sources.
• Have fewer database restrictions.
• Interact more effectively with IBM Cognos applications.
SELECT *
FROM
(SELECT SNO C1, AVG(QTY) C2, COUNT(*) C3 FROM SUPPLY GROUP BY SNO) T1,
(SELECT MAX(QTY) C1 FROM SUPPLY) T2
WITH T1 AS
(SELECT SNO C1, AVG(QTY) C2, COUNT(*)C3 FROM SUPPLY GROUP BY SNO), T2 AS
(SELECT MAX(QTY) C1 FROM SUPPLY) SELECT *FROM T1, T2
Native SQL
Native SQL is the SQL that the data source uses, such as Oracle SQL. Use Native SQL to pass the SQL
statement that you enter to the database. IBM Cognos Analytics may add statements to what you enter.
You can not use native SQL in a query subject that references more than one data source in the project.
SQL specified in IBM Cognos Framework Manager and processed by the database, whether native or
pass-through, must be completely self-contained. It must not reference anything outside that SQL, such
as database prompts, variables, or native formatting that would normally be supplied by the calling
application.
If you are comfortable working with a native SQL version, you may want to use it for query subjects that
are based on a single data source. By doing so, you can use keywords that are not available in Cognos
SQL, and copy and paste SQL from another application into Framework Manager.
When the query is generated, Framework Manager combines the SQL of each query subject that uses
a given data source connection into a single query. This helps improve the performance of the query.
However, because the SQL is being generated as a series of subqueries, native SQL queries must adhere
to any restrictions that their database vendor places on derived tables.
Here is an example of native SQL that returns a list of employees and managers:
Pass-through SQL
Use pass-through SQL when the SQL statement that you enter is not valid inside a derived table. Pass-
through SQL lets you use native SQL without any of the restrictions that the data source imposes on
subqueries. This is because pass-through SQL query subjects are not processed as subqueries. Instead,
the SQL for each query subject is sent directly to the data source where the query results are generated.
Because each query subject is sent to the data source as a separate statement rather than being
optimized by IBM Cognos Framework Manager, performance is slower. Therefore, in choosing between
native SQL and pass-through SQL, you must decide which is more important: performance or using SQL
that is not permitted in a subquery.
Generally, you should use pass-through SQL only if you must create a query subject that contains
constructs that are specific to a data source and that cannot be used inside a derived table, such as
in a With or OrderBy clause.
SQL specified in Framework Manager and processed by the database, whether native or pass-through,
must be completely self-contained. It must not reference anything outside of that SQL, such as database
prompts, variables, or native formatting that would normally be supplied by the calling application.
Note that the number sign (#) is reserved for macros and that column names must be unique. Framework
Manager removes anything that is outside the number signs when running the macro.
select
New_Query_Subject.COUNTRYCODE as COUNTRYCODE,
New_Query_Subject.EUROINUSESINCE as EUROINUSESINCE
from
(select
CONVERSIONRATE.COUNTRYCODE as COUNTRYCODE, COUNTRY.EUROINUSESINCE as EUROINUSESINCE
from
"2 - GOSales1 - OLE-DB".GOSALES1.dbo.CONVERSIONRATE CONVERSIONRATE,
"2 - GOSales1 - OLE-DB".GOSALES1.dbo.COUNTRY COUNTRY
where
(COUNTRY.SALESCOUNTRYCODE = CONVERSIONRATE.COUNTRYCODE)
) New_Query_Subject
If you change the SQL Generation Type to Minimized, Framework Manager generates the following
simplified SQL:
select
CONVERSIONRATE.COUNTRYCODE as COUNTRYCODE,
COUNTRY.EUROINUSESINCE as EUROINUSESINCE
from
"2 - GOSales1 - OLE-DB".GOSALES1.dbo.CONVERSIONRATE CONVERSIONRATE,
"2 - GOSales1 - OLE-DB".GOSALES1.dbo.COUNTRY COUNTRY
where
(COUNTRY.SALESCOUNTRYCODE = CONVERSIONRATE.COUNTRYCODE)
Minimized SQL works best when the returned result sets of each query item are equivalent. If there are
records in one column that do not correspond to records in another column, the result of the minimized
query produces additional rows. You can avoid this by setting the SQL Generation Type to As View.
For example, if there are Product Types that are not used by any of the Products and these Product Types
all have a common Product Line, a Product Line is reported for which there are Product Types, but for
which there are no related Products.
Dimensions
A dimension is a broad grouping of data about a major aspect of a business, such as products, dates, or
markets.
The types of dimensions that you can work with in IBM Cognos Framework Manager are regular
dimensions and measure dimensions. In SAP BW, measure dimensions are called key figures.
For example, in a project for sales analysis, you include these dimensions:
Normalized or snowflaked data sources often have several tables that describe a single business
concept. For example, a normalized representation of Product may include four tables related by 1..n
relationships. Each Product Line has one or more Product Types. Each Product Type has one or more
Products. Products have names and descriptions in multiple languages so they exist in the Product
Multilingual lookup table.
Procedure
1. Select a namespace or folder where you want to place the dimension.
2. Click Actions, Create, Regular Dimension, and then click the Dimension tab.
3. Click Add Hierarchy and then drag one or more objects from the Available items box to the
Hierarchies box.
You can define multiple hierarchies for a dimension. The first hierarchy is used as the default, or
primary, hierarchy.
You can also create an alternate hierarchy by copying a level. Click a level and drag it to the right
border of the dimension. You can only copy a level within the same dimension.
4. Click Add Level and then drag one or more objects from the Available items box into the new level.
Results
You can also use the Dimension Map tab to create a regular dimension. Click the regular dimension
button .
To change the default hierarchy for a dimension with multiple hierarchies, in the Properties pane, click
the ellipsis (...) button in the Default Hierarchy box, and select a different hierarchy.
If a hierarchy in a dimension contains a large number of members, running a query in one of the IBM
Cognos studios may be slow because the IBM Cognos engine is generating one large query for a locally-
built cube. To resolve this issue, set the Wide Member Tree property in the Properties pane to true. The
engine will then generate multiple smaller queries for the locally-built cube.
Balanced hierarchy
An unbalanced hierarchy can also be ragged. In a ragged-unbalanced hierarchy, there are gaps in the
levels and the levels descend to different depths.
You can specify multiple hierarchies on regular dimensions in Framework Manager. Multiple hierarchies
for a regular dimension behave as views of the same query. However, you can use only one hierarchy at a
time in a query. For example, you cannot use one hierarchy in the rows of a crosstab report and another
hierarchy from the same dimension in the columns. If you need both hierarchies in the same report, you
Use this approach if dramatically different sets of columns are relevant for each hierarchy and it is
more intuitive for your users to model the hierarchies as separate dimensions with separate and simpler
queries.
The first level of the hierarchy is automatically defined as the All level. It contains a single root member,
which represents the top level of the hierarchy. For example, the All level for the Time dimension is named
Time (All). You cannot delete or move the All level. You can change its name, description, and screen tip.
If you do not specify the levels of the hierarchy correctly, incorrect aggregation could occur.
The member unique name (MUN) is how the member is found in the data source, much like using
business keys to find records in a table.
The member unique name is used in the expression for a member data item that is used in a report, a
reference to members in filters and expressions, and used in drill-through between OLAP data sources.
The member keys in the MUN for the different OLAP data sources must match.
If a member unique name changes, members that are directly referenced in expressions, filters, or
reports are no longer found because the MUN is contained in the report specification. Member unique
names can change for a variety of reasons:
• Changes to the hierarchy and level structures may change the level unique name.
• The business key values have changed and this changed the member key path.
Procedure
1. Select the objects that you want in a dimension.
2. Click Actions, Merge in New Regular Dimension.
Procedure
1. Click the regular dimension.
2. Click Actions, Convert to Query Subject.
Procedure
1. In the Project Viewer pane, select a dimension or level.
2. Click Actions, Edit Definition.
3. Click the Member Sort tab.
4. Select the sorting option to apply.
Metadata (as shown in the member tree) Used only to specify how members are sorted
when displayed in the metadata tree.
The sort of the metadata tree cannot be changed
by report authors.
Data - Only as Default Report Sort Used as the default data sort for members in a
report.
If no data sort is specified, data is retrieved in the
order that it was entered in the database.
Report authors can override this value and apply
a different sort to the members displayed in a
report.
Tips
• To apply the default sort order to all child levels within the levels in the dimension that do not have a
sort option defined, click Detect.
• To remove sort options from all child levels within the levels in the dimension, click Clear All.
Procedure
1. Click a namespace where you want to place the measure dimension.
2. Click Actions, Create, Measure Dimension.
3. Click the Measure Dimension tab.
4. Drag measures from the Model Objects box to the Measures box.
5. Perform the actions that you want.
Test the measure dimension Click the Test tab or the Query Information tab.
Convert a measure into a query item Right-click the measure and click Convert to
Query Item.
If you test the measure dimension by using the Query Information tab, IBM Cognos Analytics
validates the measure dimension. If you test the measure dimension by using the Test tab, IBM
Cognos Analytics executes the measure dimension. The SQL for validate is slightly different than the
SQL for execute. To generate definitive SQL for the measure dimension, use the Test tab.
6. Click OK.
Results
You can also use the Dimension Map tab to create a measure dimension. Click the measure dimension
button .
You may be interested in the following related topics:
• “What are multi-fact, multi-grain queries?” on page 285
• “Creating calculations” on page 120
• “Creating filters” on page 121
• “Testing dimensions” on page 95
• “Modifying how query items are aggregated” on page 107
Procedure
1. Double-click the measure dimension that contains the measure.
2. Click the Measure Dimension tab.
3. Right-click the measure, and click Convert to Query Item, OK.
A scope relationship is automatically generated when you drag a dimension into the dimension map or
when you move a query subject into the dimension namespace and convert it to a regular dimension.
Shortcuts to scope relationships are not supported.
Procedure
1. Click the Dimension Map tab.
Tip: To view scope relationships highlighted with a background color, click the show scope button .
2. Click one or more measure dimensions.
3. Click the level of the dimension that you want to set the scope to.
Tip: If you want Framework Manager to define the scope relationship, select the measure dimension
and the regular dimension, and click the determine scope button .
Results
If you want to remove the scope, select the hierarchy or dimension and click the remove scope button
.
If you select a hierarchy, you can remove the scope from a specific hierarchy without affecting the scope
set in other hierarchies of the dimension.
If you select the dimension, all scope from all hierarchies is removed. The scope relationship between the
measure dimension and the regular dimension is also removed.
Roles
Roles define what displays in the member tree in the IBM Cognos studios. Use roles to organize and
manage metadata and to determine how to present data to your users.
You can also create expressions that refer to roles instead of query items. You must use the roleValue
function to refer to a particular role. For example, you want to query against a specific role in a hierarchy
but the query item playing that role is different at each level of the hierarchy. A single query can span the
Default roles
The default roles include the following:
• _businessKey
Represents the key for the level. The level can be defined as unique if the business key of the level is
sufficient to identify each set of data for a level.
The _businessKey role can be assigned to only one attribute in a level.
The Root Business Key property shows the value of the business key for the root member. The
root member is an artificial level created for dimensionally modeled relational models. To enable
drill-through on conforming dimensions, you must set the Root Business Key property.
• _memberCaption
Presents the caption for a member that will be shown in the IBM Cognos studios.
The _memberCaption role is necessary to leverage member functions and to enable dragging and
dropping levels in the IBM Cognos studios.
Ensure that the data type is set to string for the item that will be assigned the _memberCaption role.
• _memberDescription
Returns the description for a member within a dimension.
Custom roles
By default, attributes are included with no role. You can assign attributes to existing roles or you can
create custom roles. Each role that you create must have a unique name.
You can translate the custom roles in the model.
Specifying roles
Roles define what displays in the member tree in the IBM Cognos studios. Use roles to organize and
manage metadata and to determine how to present data to your users.
Procedure
1. Click the dimension whose roles you want to define.
2. From the Actions menu, click Edit Definition.
3. Click the Dimension tab.
4. In the Hierarchies box, click the level you want.
5. In the Select a level in the hierarchy control to see the query items box, click a query item.
6. Under Role, click the ellipsis (...) button.
7. Do one of the following:
• To use a role defined by Framework Manager, click the Default Roles tab, and select a role.
• To create a role, click the Custom Roles tab, and click Add.
Results
You can also use the Dimension Map tab to define roles. Click Attributes, right-click the query item, and
click Edit Roles.
Procedure
1. Select one or more objects that you want to explore.
2. From the Tools menu, click Launch Context Explorer.
3. To see the connected objects, click one or more objects and click the appropriate button.
Goal Button
4. If you want to see details about an object, such as its relationships and query items, right-click the
object, click Navigate Diagram, Diagram Settings, and then select the details you want.
Testing dimensions
Testing a regular dimension returns the attributes associated with the hierarchy defined as the default.
Testing Objects
You can see the results that an object returns by testing it. You can test when creating an object or later
on. The objects you can test are dimensions, query subjects, query sets, hierarchies, levels, calculations,
and query items.
You can view the data that will display in a specific report before publishing a package by selecting and
testing the objects that will display in the report. This makes it easier to debug a model and to verify that
If you test a child segment of a segmented model, you may see an error if an object you are testing refers
to an object in another child segment and the referenced object is not available to the project you are in.
Check that the parent model contains all the objects and that this error message does not display when
you test the parent model.
Governor settings may affect the testing results. For more information, see “Governors” on page 247.
You can change existing test settings to customize the results that the test shows. For example, in
addition to other settings, you can control the number of rows returned.
Procedure
1. Select the object you want to test.
2. Click Actions, Edit Definition, and then click the Test or Query Information tab.
The Test Results box is initially empty until you run the query.
Any result sets that contain binary large objects are shown as [blob].
3. To run the query and bring back all the test results, click Test Sample.
4. If you want to add a count of the rows, click Total Rows.
5. If you want to apply the Regular Aggregate property of the query item or the Aggregate Rules
property of a semi-additive measure that is referenced in the expression, select the Auto Sum check
box.
If you clear this check box, a row is returned for each row in the result set of the query.
6. If you want to obtain more information about the query results, click the Query Information tab.
7. Click OK.
Procedure
1. Select the objects that will display in the report.
2. Click Tools, Test.
3. To run the query and bring back all the test results, click Test Sample.
4. To view details about any problem that is found, click the Query Information tab.
Procedure
1. Select the object that you want.
2. Click Actions, Edit Definition, and then click the Test tab or the Query Information tab.
3. Click Options, Test Settings .
4. Choose the options that you want.
Retrieve all data and show a Select the Restrict the This setting applies to all
specified number of rows maximum number of rows to dimensions, query subjects, and
be returned check box and type query sets in the model.
the required number of rows.
This setting is saved and used
This setting does not improve in your next session with any
performance for retrieving data model.
when testing dimensions, query
subjects, and query sets.
Specify the level of detail Drag the Level of Information This setting is saved and used
shown in Results Information in your next session with this
slider to the location that model.
represents the amount of detail
you require.
Temporarily override session In the Session Parameters box, The override values are not
parameters click Set. saved with the model. This
setting is for your current
The Session Parameters dialog
session only.
box displays.
Apply relevant design mode Select the Apply all relevant This setting is saved and used
filters design mode filters when in your next session with any
testing check box. model.
This applies all relevant filters
whose usage is set to design
mode in another dimension,
query subject, or query set.
Apply a security filter In the Security Filters box, click This setting is saved and used
Edit. in your next session with this
model.
Change the prompt values In The Current Prompt Values The prompt values are not saved
box, click Prompts. with the model.
The Model Prompts Manager This setting is for your current
dialog box displays, which session only.
shows all prompts, and their
values, that are in the model.
Results
You may be interested in the following related topics:
• Working with dimensions “Dimensions” on page 81
• Working with query subjects “Query subjects” on page 54
Multilingual metadata
For models that are published in multiple languages, you can view and modify model objects in the
different languages.
You must handle multilingual support in the import view for a variety of reasons. You can reduce the
number of query items contained in each dimension and query subject. With fewer dimensions, query
subjects, and query items, the model is more manageable. You can simplify maintenance by doing all
multilingual work in one place instead of in different business views. This ensures consistency because
the languages are set up correctly for all modelers to use. This is particularly important for segmented
models.
Procedure
1. Import metadata from multilingual data sources. See “Modeling with multilingual data sources” on
page 100.
2. Define the languages the model supports. See “Adding a language to a project” on page 101.
3. Define one or more parameter maps that translate the locale used when the report is run into the
language values in the data source. See “Creating parameter maps ” on page 125.
4. Use a macro to dynamically substitute language values from the language lookup table using the
runLocale session parameter as the key See “Creating prompts with query macros” on page 130.
5. Export multilingual properties in translation tables, which translators use to enter the correct text for
each language. See “Exporting translation tables” on page 102.
6. Import the table that contains the translated property values. See “Importing translation tables” on
page 102.
7. Publish the metadata in the languages you specify. See Chapter 6, “Publishing packages,” on page
205.
Results
For information about how to enable multilingual modeling, see “Example - create multilingual projects
for relational metadata” on page 103.
The samples databases provided with IBM Cognos store a selection of text fields, such as names
and descriptions, in more than 25 languages to demonstrate a multilingual reporting environment. For
information about how data is stored in the samples databases and how the samples databases are set
up to use multilingual data, see the IBM Cognos Analytics Administration and Security Guide.
Here is the process for creating a multilingual reporting environment:
• Use multilingual metadata.
The data source administrator can store multilingual data in either individual tables, rows, or columns.
For more information about configuring your database for multilingual reporting, see the IBM Cognos
Analytics Administration and Security Guide.
• Create a multilingual model.
Modelers use Framework Manager to add multilingual metadata to the model from any data source
type except OLAP. They add multilingual metadata by defining which languages the model supports,
translating text strings in the model for things such as object names and descriptions, and defining
which languages are exported in each package. If the data source contains multilingual data, modelers
can define queries that retrieve data in the default language for the report user.
For more information, see the IBM Cognos Framework Manager User Guide.
• Create multilingual maps.
Administrators and modelers use a Microsoft Windows operating system utility named Map Manager to
import maps and update labels for maps in IBM Cognos Analytics - Reporting. For map features such as
country or region and city names, administrators and modelers can define alternative names to provide
multilingual versions of text that appears on the map.
For more information, see the IBM Cognos Map Manager Installation and User Guide.
• Create a multilingual report.
The report author uses Reporting to create a report that can be viewed in different languages. For
example, you can specify that text, such as the title, appears in German when the report is opened by
a German user. You can also add translations for text objects, and create other language-dependent
objects.
For more information, see the IBM Cognos Analytics - Reporting User Guide.
• Specify the language in which a report is viewed.
You can use IBM Cognos Analytics portal to do the following:
– Define multilingual properties, such as a name, screen tip, and description, for each entry in the
portal.
– Specify the default language to be used when a report is run.
Tip: You can specify the default language on the run options page, in the report properties, or in your
preferences.
– Specify a language, other than the default, to be used when a report is run.
For more information, see the IBM Cognos Analytics Getting Started guide.
The data then appears in the language and with the regional settings specified in
• the user's Web browser options
• the run options
• the IBM Cognos Analytics portal preferences
A column with a language key in another column The parameter location is in the Select list.
Select
PRODUCT_TYPE.PRODUCT_TYPE_CODE,
PRODUCT_TYPE.PRODUCT_LINE_CODE,
PRODUCT_TYPE.PRODUCT_TYPE_
#$Language_lookup
{$runLocale}# as Product_type
from
[gosales].PRODUCT_TYPE
PRODUCT_TYPE
Rows whose language is identified by a special The parameter location is in the filter.
column, such as LANG
Select
PRODUCT.PRODUCT_NAME,
PRODUCT_MULTILINGUAL.
PRODUCT_NUMBER
from
[gosales].PRODUCT,
[gosales].PRODUCT_MULTILINGUAL
Where
PRODUCT.PRODUCT_NUMBER =
PRODUCT_MULTILINGUAL.
PRODUCT_NUMBER
and
(PRODUCT_MULTILINGUAL."LANGUAGE" =
#sq($Language_lookup{$runLocale})#
Procedure
1. Click Project, Languages, Define Languages.
2. In the Available languages box, select each language you want to add and click the arrow button to
move it to the Project languages box.
Tip: To remove a language, select it in the Project languages box and click the arrow button to move it
to the Available languages box.
You can generate and export a translation table to simplify the task of translating model objects. The
translation table contains a list of all the text strings defined for multilingual properties, such as Name,
Description, and Screen Tip. Translators can then use an external application, such as Microsoft Excel, to
type the required information in the table.
You can export a translation table as either a comma-separated value file (.csv) or Unicode text file (.txt).
You must export the translation table as a Unicode text file if it either contains a non-Latin language or will
be imported by a computer with a language setting that is different from your own computer.
Procedure
1. Select the objects you want to export.
2. Click Project, Languages, Export Translation File.
3. In the Project Languages box, click the languages you want to export, and click the arrow button to
move them into the Languages to be exported box.
You must export the design language of the model that will use the translation table. For example, if
the translation table will be used in a model that uses French as the design language, you must export
French.
IBM Cognos Framework Manager exports the appropriate locale code for each language you select. If
you do not select all the languages to be translated, you must manually enter the language codes in
the first row of each new language column in the translation table.
4. In the Model objects to be exported box, select whether you want to export all model objects, or
export only preselected objects and their children.
5. Enter the location and name of the translation table.
6. Click OK.
You can add text property values for each language defined in your model by importing translated data
from a file. The imported file must be a translation table that was used by translators to enter the required
translated values.
The translation table must contain the design language of the model that will use the translation table.
The translation table can contain a subset of the languages defined for the project.
Procedure
1. Click Project, Languages, Import Translation File.
Procedure
1. Open the go_data_warehouse project.
2. Ensure that English, French, and German are supported languages:
• Click Project, Languages, Define Languages.
• Ensure that the Project languages pane contains English, French, and German.
• In the Project Viewer pane, click a query item and, in the Properties pane, click the Languages
tab.
For the name, description, and tool tip text, you see one entry for each language.
3. Export all the languages and objects in the project to a comma-separated value file (.csv) named
GOSLDW-ML.csv.
• Click Project, Languages, Export Translation File.
• In the Project Languages box, Ctrl+click English, French, and German, and click the top arrow to
move them to the Languages to be exported box.
• In the Export languages to this file box, enter the location of GOSLDW-ML.csv.
4. Open the GOSLDW-ML.csv file in Microsoft Excel, and translate the strings.
Note that each column represents a given language, and the file contains only the text strings that
exist in the model.
5. In Framework Manager, import the translated file:
• Click Project, Languages, Import Translation File.
• In the Project Languages box, move French and German into the Translate into box.
• In the Import translation table from this file box, enter the location of GOSLDW-ML.csv.
6. In the Project Viewer, double-click the Language_lookup parameter map.
Note that the keys match the possible values for the runLocale session parameter, which identifies
the language of the current user. These keys are mapped to the language values that are defined in
the go_data_warehouse database.
7. Ensure that the parameter map contains the following information.
de DE
en EN
fr FR
8. Select an object that contains multilingual columns, such as the Order method dimension, and, click
Actions, Edit Definition.
The language identifier that was appended to the query item name is replaced by a parameter map
and the runLocale session parameter:
Select
ORDER_METHOD_DIMENSION.ORDER_METHOD_KEY,
ORDER_METHOD_DIMENSION.ORDER_METHOD_CODE,
ORDER_METHOD_DIMENSION.ORDER_METHOD_#$Language_lookup{$runLocale}
# AS ORDER_METHOD
from
[go_data_warehouse].ORDER_METHOD_DIMENSION
Query items
A query item is the smallest object in the model that can be placed in a report. It represents a single
instance of something, such as the date that a product was introduced.
For relational metadata, you can modify the properties of query items by
• Setting Usage and Regular Aggregate properties to reflect the intended use of the query item
• Formatting query items to control how data displays in a report
• Identifying a column as a prompt, and controlling how your users see the prompt information
You can also modify the properties for multiple query items at the same time. For more information, see
“Replacing multiple property values” on page 13.
You can rename a query item in the Calculation Definition dialog box. Renaming the query item updates
references to this query item.
Because reports can contain different query items from one or more objects in the model, query item
properties control many aspects of the final report. When you create a model dimension or model query
subject, the query items inherit the properties of the data source query items on which they are based.
The properties for query items or measures include the following.
Last Changed The date that the query item or measure was last
changed. The property is automatically updated
with the current date time.
Last Changed By The user who last changed the query item or
measure. This property is automatically updated
when the item is changed.
The value is the current logon username.
Data Type The data type that was set in the data source.
Because this property is set in the data source, it is
read-only in Framework Manager.
IBM Cognos Framework Manager uses the following rules to set the Usage and Regular Aggregate
properties.
If the measure is semi-additive, use the Aggregate Rules property to define rules for semi-additive
aggregation. See“Defining aggregate rules for semi-additive measures” on page 111.
Select
customer, debt, credit, debt/credit as
percent_debt from x
• If the query item in the calculation is a fact and the aggregation type for the query item is average,
count, maximum, minimum, or sum, the aggregation type of the query item is used.
• If the query item in the calculation has no aggregation type set, the aggregation type minimum is
applied in the query. It is not possible in SQL to have an aggregation setting of none.
• Aggregate functions are interpreted as if they are applied to a value in a single row when these functions
are used in the detail context. For example, a Reporting report has the Auto Group and Summarize
property that is set to false.
• Aggregation of a query item is based on the aggregated expression derived from the item definition.
For example, you want to total this stand-alone calculation:
[namespace].[Company].[debt]
/ [namespace].[Company].[credit]
Total([namespace].[Company].[debt]) / Total([namespace].[Company].[credit])
• Scalar aggregates, also known as running, ranking, and moving aggregates, are calculated for report
granularity unless the For clause is explicitly specified.
• Granularity of aggregate functions is set by grouping for determinants or by keys of corresponding levels
in the cube.
For example, Rank([namespace].[Company].[debt] is interpreted as Rank([namespace].
[Company].[debt] for Report).
Is a fact containing of only a reference to a query Uses the aggregation type of the query item
item whose aggregation type is average, count,
maximum, minimum, or sum
You want to define an aggregate rule for Closing inventory that generates the last closing inventory
recorded for any given period of time:
For IBM Cognos to apply the aggregate rule of last on Closing inventory based on the Time dimension,
there must be a direct relationship between the underlying query subjects used to construct the Time
dimension and the Closing inventory measure. This is in addition to the scope relationship defined
between the Inventory measure dimension and the Time dimension:
Procedure
1. Click the measure you want to work with.
2. In the Properties pane, click the ellipsis (...) button in the Aggregate Rules property.
3. To add a dimension for this measure, click Add and select the dimension.
You can include a shortcut to a dimension if there is a scope relationship between the measure
dimension and the regular dimension.
4. To specify the aggregate operation, click the ellipsis (...) button in the Aggregation Rules box.
The following operations are supported:
• Sum
• Minimum
• Maximum
• Average
• First
• Last
5. If you want to change the order of the aggregate rules, use the arrow buttons.
6. Click OK.
Results
After you set an aggregate rule, the icon for the measure changes.
If the value is set to unsupported in IBM Cognos Framework Manager, the semi-aggregate behavior is
ignored in the IBM Cognos studios.
The Semi-Aggregate property will not be supported in future releases. Instead, use the Aggregate Rules
property for semi-additive measures.
Identifier Count
Attribute Unsupported
Fact Sum
Procedure
1. In the Project Viewer pane, click one or more dimensions or query subjects.
2. In the Properties pane, click the Properties tab.
3. Change the Usage property to unknown.
4. Change the Regular Aggregate property to unsupported.
5. Click Tools, Determine Usage.
6. Click Tools, Determine Aggregation Rules.
Procedure
1. In the Project Viewer pane, click the query item you want to format.
2. In the Properties tab of the Properties pane, click the Format property.
3. Select the appropriate Format type.
4. In the Properties box, select or type the appropriate property value.
5. Click OK.
?<PromptName>?
Goal Property
Specifies which query item is passed from the Use Item Reference
prompt to the filter.
Each value is associated with a value in the query
item specified in the Display Item Reference
property.
Specifies which query item is used in the filter Filter Item Reference
expression to retrieve data.
Edit Box A simple text box. If the data type of the column
is date or dateTime, this value generates a date or
date-time control as well as the text box.
Select with Search A list control so that users can search for values.
For SAP BW metadata, this value is not relevant.
Select with Tree A tree prompt control for prompts that are based
on a hierarchy node.
Using the filter item reference and use item reference properties
The values of the Filter Item Reference and Use Item Reference properties must be compatible. The
value of the Use Item Reference property must be a type that is expected by the Filter Item Reference
property. Otherwise, the report user may receive unexpected results. This may occur when a report user
creates a filter without creating a prompt page.
In an example model, the Use Item Reference property is set to Employee Number and the Filter Item
Reference property is Employee Name. In Reporting, a report author creates the following filter without
creating a prompt page:
Reference.EmployeeName in ?parm1?
Reporting automatically generates prompts when you create a filter without creating a prompt page.
Because the prompt is generated, Reporting uses the Prompt Info properties from the Employee Name
query item in the Framework Manager model.
The Use Item Reference indicates that the values being passed to the filter are employee numbers. The
Filter Item Reference is filtering data based on Employee Name. The filter is as follows: Reference].
[Employee Name] in ("1", "2"). Since there are no Employee Name values of "1" or "2", the report
will be blank.
Testing prompts
When you test a model object that references a prompt, IBM Cognos Framework Manager asks you to
enter the prompt value. Framework Manager uses this value for either the duration of the session, or until
you clear the prompt value.
You can change the session value of prompt values through the Options dialog box. This dialog box is
available when you modify a dimension or query subject, or define a calculation, filter, query set, or
complex relationship. You can change the prompt value at the time that you are testing the expression
that references that value.
If you select the Always prompt for values when testing check box in the Prompt dialog box, Framework
Manager prompts you for a value every time you test the object. When updating the object or performing a
count, Framework Manager uses the existing prompt value, if one exists.
A prompt on a query item in a model query subject is associated only with that query item. A prompt on
a query item in a data source query subject is associated with the entire query subject and therefore, the
prompt displays when you test any query item in the query subject.
Procedure
1. Double-click the measure dimension that contains the query item.
2. Click the Measure Dimension tab.
3. Right-click the query item, and click Convert to Measure.
4. Click OK.
Business rules
You can add business rules to the dimensions and query subjects in your model to refine the data
retrieved and ensure that the correct information is available for your users.
Creating business rules and storing them in the model instead of in reports has many advantages. You
save time because you and your users do not have to re-create the business rules every time they
are needed. The business rules ensure consistency because your users all use the same definitions.
For example, Low Margin means the same thing throughout the organization. They are easy to update
because you maintain the business rules centrally so that all reports are updated automatically as the
rules evolve. For example, if the definition for Low Margin changes, all reports that use the Low Margin
calculation are updated automatically. The business rules enhance security.
For example, you can
• Add calculations so that your users can include calculated data in their reports. See “Creating
calculations” on page 120.
• Create and apply filters so that you limit the data that a query subject retrieves. See “Creating filters” on
page 121.
• Add prompts that will automatically display whenever a dimension or query subject is used in a report;
report consumers are then prompted to filter data. See “Defining prompt controls” on page 115.
Creating calculations
You can create calculations to provide your users with calculated values that they regularly use.
Calculations can use query items, parameters, variables, calculated members, expressions, and
expression components, such as functions.
Punctuation characters, such as the question mark (?), must be in 7-bit ASCII character code. If you
type a punctuation character from a multi-byte enabled keyboard, ensure that you type the 7-bit ASCII
representation of the character. For example, type Alt+063 for the question mark.
Avoid using characters that are used for expression operators in the name of the calculation. Syntax
errors may occur when the expression is evaluated. For example, a calculation named Margin * 10 causes
errors when used in an expression such as [Margin * 10]< 20.
In expressions, an operator or function may require operands to be of a particular dimensional type. When
an operand is not of the required type, one or more coercion rules may be applied to coerce the operand
to the appropriate type. Because coercion rules are not applied to expressions in model query subjects,
ensure that those expressions are valid without relying on coercion rules. For more information about
coercion rules, see the IBM Cognos Analytics - Reporting User Guide.
If you insert an imported user-defined function in the calculation, ensure that the function name does
not repeat vendor-specific names. For example, if the user-defined function name is CHAR you will
receive and error when testing the function in the Calculation Definition dialog box because this name is
considered identical as char in Microsoft SQL Server. For information about function names used in your
database, see the database product documentation.
At query time, IBM Cognos Framework Manager returns a null value for any calculation that contains a
divisor whose value is zero. Framework Manager cannot detect zero-division errors in functions such as
average and mod, because the division operator is not explicit.
Framework Manager supports stand-alone calculations and embedded calculations.
• Use a stand-alone calculation when you want to reuse the expression or control the order of operations
using the Calculated setting in the Regular Aggregate property. For more information, see “Order of
operations for model calculations” on page 291.
You can apply a stand-alone calculation to one or more dimensions or query subjects to provide
calculated data to a report, or include it in a package to make it available to your users. By moving a
stand-alone calculation or a shortcut to it into a folder, you can better organize the model objects.
You cannot use stand-alone calculations in Analysis Studio. Instead, use an embedded calculation in
the measure dimension.
• Use an embedded calculation when you want to use a calculation with only one dimension or query
subject.
You can create an embedded calculation when modifying a relational data source query subject, model
query subject, or dimension.
If you start with an embedded calculation, you can later convert it into a stand-alone expression that
you can apply to other dimensions or query subjects. Tip: Right-click the calculation expression in the
Calculations tab and click Convert to Stand-Alone Calculation.
When you embed a calculation, the data source query subject must have a relationship to any query
subject referenced by the expression. This relationship is necessary even if the expression references
a model query subject based on the same table as the data source query subject in which you are
embedding the expression.
Use the following steps to create a calculation:
The options setting does not improve performance for retrieving data when testing
dimensions, query subjects, and query sets.
Override session parameters
Click the options button, click Set, enter a value in the Override Value field, and click OK.
Override prompt values
Click the options button, and then click Prompts.
The Model Prompts Manager dialog box displays all prompts, and their values, in the model.
Creating filters
A filter is an expression that specifies the conditions that rows or instances must meet to be retrieved for
the dimension, query subject, calculation, or report to which the filter is applied. A filter returns a boolean
value so that you can limit the rows returned by a dimension or query subject.
For example, you can use the in_range function to create a filter that retrieves data for products
introduced in a specific time frame. The syntax for this example looks like this:
[gosales_goretailers].[Products].[Introduction
date]
in_range {Feb 14, 1999 : July 14, 2007}
Note: When using a date or time function, you must use a 24-hour clock. IBM Cognos Framework
Manager does not support "a.m." or "p.m." in expressions. For example, use 20:00 to signify 8 p.m.
Goal Action
Add query items and filters On the Model tab, drag the objects you want to the
Expression Definition box.
Retrieve all data and show a specified number of Click the options button, select the Restrict the
rows maximum number of rows to be returned check
box, and type the required number of rows to be
returned.
Override session parameters Click the options button, click Set, enter a value in
the Override Value field, and click OK.
Override prompt values Click the options button, and then click Prompts.
The Model Prompts Manager dialog box displays,
which shows all prompts, and their values, that are
in the model.
You can also apply governors to restrict the data that the queries in a package retrieve. For more
information, see “Governors” on page 247.
Applying filters
To apply a filter, you must modify the dimension, data source query subject, or model query subject. The
query subject must either contain the query items that the filter references, or have a relationship path to
the query subjects that contain the query items.
You can embed a stand-alone filter in dimensions or query subjects, but if you want a different usage for
each embedded filter, you must create different versions of the stand-alone filter. Otherwise, your users
could be required to fill in a prompt that you thought was optional if there is any instance where the usage
is set to mandatory. For information about mandatory and optional prompts, see “Mandatory and optional
prompts” on page 133.
For example, in query subject A, you embed a stand-alone filter and define it as optional. In query subject
B, you define it as mandatory. When your users create a report that uses both query subjects, they are
required to choose values in both filters, even the one defined as optional. All instances of the filter are
considered to be mandatory when used in the same query. The solution is to create different versions of
the filter, each with its own name.
To apply a filter after it was created, do the following steps:
• Select the filter, and click Actions, Edit Definition.
• Click the Filters tab, and drag the filter that you created to the Filters box.
• Select the Usage value for the filter.
Always
Use this usage value to ensure specified data is filtered out of all reports. For example, your
company may have obsolete information that it stores but does not want to report on. This is the
default usage value.
Design Mode Only
Retrieves a small subset of the data for the sample report. Use this usage value when you do not
need to see all the data, for example when testing a query subject.
To apply design mode filters in Framework Manager, select the Apply all relevant design mode
filters when testing option. This option is available on the Test Settings tab.
([GeoNamespace].[Countries].[CountryName]?WhichCountry?)
=
If you want to view the SQL, click the Query Information tab.
Procedure
1. Open the go_sales sample model. It is located in c10_location/webcontent/samples/Models/go_sales/
go_sales.cpf
2. Create a filter to limit the retrieval of data to only those country codes in the conversion rate table
whose value is 2:
• Click the Filters folder, and then click Actions, Create, Filter and name the new filter
ConversionRateCountryCode.
• Click the Model tab.
• In the Available Components box, open the Database view folder and then open the GoSales folder.
• Add the Country Code query item from Conversion Rate query subject to the Expression definition
box, and type ='2' at the end of the expression.
• Click OK.
3. Create a model query subject named ISO Code.
• In the Available Model Objects box, open the Database view folder.
• Add Country query item and the ISO 3-letter code query item from the Country query subject to the
Query Items and Calculations box.
4. Apply the ConversionRateCountryCode filter:
• Click the Filters tab.
• Open the Filters folder and drag ConversionRateCountryCode to the Filters box.
5. Click the Query Information tab.
The generated SQL contains the filter even though it does not affect the result set.
6. Change the usage of the ConversionRateCountryCode filter to Optional:
• Click the Filters tab.
• Click the ellipsis (...) button under Usage for the ConversionRateCountryCode filter, and click
Optional.
7. If you want to view the SQL, click the Query Information tab.
Procedure
1. Click the Parameter Maps folder, and click Actions, Create, Parameter Map.
2. In the Name box, type a name for the new parameter map.
3. Click Manually enter the parameter keys, and/or import them from a file and click Next.
4. Do one of the following:
• To manually enter values, click New Key, type a key, and press Tab to enter a value for that key.
• To import keys and values, click Import File and identify the location of the appropriate .csv or .txt
file. For a .txt file to be used for import, the values must be separated by tabs and the file must be
saved as UTF8 or Unicode format. ANSI text files are not supported.
Note: If you are going to use a parameter in a data source query subject, the value must use English-
specific punctuation. This means that you must use a period (.) to represent a decimal and a comma (,)
to separate lists of values.
5. Modify existing parameters as required.
Modify a parameter Select the row you want to modify, click the Edit
button, and type a value.
6. Click Finish.
Procedure
1. Click the Parameter Maps folder, and click Actions, Create, Parameter Map.
2. In the Name box, type a name for the new parameter map.
3. Click Base the parameter map on existing Query Items, Next.
4. Click the query item to use as the key, and then click the query item to use as the value.
Both query items must be from the same query subject.
5. Click Next.
6. In the Default Value box, type a value.
If the key used in an expression is not mapped, the default value is used.
Setting a default value is optional. However, if no default is provided, an unmapped key could produce
an error.
7. Click Finish.
en EN
fr FR
When you examine the SQL for the Product Line query subject, you see the following:
Select
PRODUCT_LINE.PRODUCT_LINE_CODE,
#'PRODUCT_LINE.PRODUCT_LINE_' + $Language_lookup{$runLocale}#
as Product_Line
from
[gosales].PRODUCT_LINE PRODUCT_LINE
The runLocale macro returns a locale setting that is used by the Language_lookup macro to specify a
language value.
Procedure
1. Click Project, Session Parameters.
2. Click New Key and type a session parameter key and value.
3. Choose how to handle the override value.
• To avoid having to set the override value every time you edit the project, set the session parameter
as a value.
• To avoid having to remove the project setting each time before you publish it, set the session
parameter as a session override.
4. Modify existing parameters as required.
Goal Action
Change the parameter value Click the row that contains the value you want to
change, click Edit, and type a value.
Remove a parameter Click a row and click the Delete button. You
cannot delete an environment session parameter.
5. Click OK.
Select
#$ColumnMap{$runLocale}# as
CountryNameAlias
From
[GoSales].Country
Element Example
Syntax
Use the following syntax to reference session parameter and parameter values.
You can add the following elements to further define the macro expression.
Symbol Purpose
Single quotation marks ' Delineates a literal string that has a single
quotation mark as part of the string.
If the single quotation mark displays in a string,
such as a query item, the string must be enclosed
in a single quotation mark on both sides of the
string and the single quotation mark must be
doubled. For example, ab'c is written as 'ab''c'
If the single quotation mark displays in a macro,
the string must be enclosed in square brackets. For
example, ab'c is written as [ab'c]
If the single quotation mark displays in a prompt,
there is no need to enclose the string.
To escape a single quotation mark in an
expression, use '
Curly brackets, also known as braces { } Calls a function that is unknown to the parser, such
as dateadd in IBM Db2, and whose first argument
is a keyword.
Example:
dateadd
({month},2,<date
expression>)
Single quote function (sq) Surrounds the result of a string expression with
single quotation marks. If the single quotation
mark displays in a string, such as a query item, the
string must be enclosed in a single quotation mark
on both sides of the string and the single quotation
mark must be doubled. You can use this function
to build clauses to test against literal parameter-
driven values.
Here is an example:
#sq($my_sp)#
'ab"cc'
Double quote function (dq) Surrounds the result of a string expression with
double quotation marks. You can use this function
to refer to table and column names with non-
identifier characters, such as a blank space or a
percent sign (%).
Here is an example:
#dq
('Column' + $runLocale)#
"Column en-us"
Square bracket function (sb) Inserts a set of square brackets into the argument
to build object references in a model query and
model expressions, such as filters and calculations.
Here is an example:
#sb
('my item in ' + $runLocale)#
Procedure
1. Select the data source query subject you want to modify.
2. Click Actions, Edit Definition.
3. On the SQL tab, click Insert Macro to start the Macro Editor.
4. In the Available components box, click the parameter maps, session parameters, or functions you
want to use, and drag them to the Macro definition box.
Ensure that you type the macro expression between the number signs. If you enter text before or after
the number signs, when you click OK, Framework Manager deletes this text.
5. Insert single or double quotation mark functions.
Tip: Click the arrow next to these buttons for a menu of choices for placing the quotation
marks.
6. If you want to edit a parameter map or session parameter, click it in the Macro definition box.
The Parameter Map or Session Parameters dialog box displays. You can set override values for
session parameters, add new items, or change values.
7. Check the macro in the Information box.
If a macro is incorrect, an error message displays.
'[MS_gosales].[PROD1].[PRODUCTLINE].[PRODUCTLINE]
->[all].[1]')# ) )
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY = #prompt('CountryName')#
When default values are specified in the syntax of macro prompts, you may see an error. Use prompt
syntax such as where Country = ?Enter Country?.
The prompt and promptmany functions have the following parameters. All argument values must be
specified as strings.
Name
This mandatory parameter is the name of the prompt. Name can also refer to the name of a parameter on
a user-created prompt page, in which case the user-created prompt page appears when the report is run
instead of the default prompt page that the macro would generate.
Datatype
This optional parameter is the prompt value data type. The default value is string. Prompt values are
validated. In the case of strings, the provided value is enclosed in single quotation marks and embedded
single quotation marks are doubled.
Values include the following:
• boolean
• date
• datetime
• decimal
• double
• float
• int
• integer
• interval
• long
• memberuniquename
Memberuniquename is not an actual data type. This value must be used when the data type of the
parameter is member unique name (MUN).
• numeric
• real
• short
• string
• time
DefaultText
This optional parameter is the text to be used by default. If a value is specified, the prompt is optional.
If you use a space and no values are provided in the Prompt Value dialog box, a Where clause is usually
not generated.
If you use text and no values are provided in the Prompt Value dialog box, a Where clause is usually
generated using the default value.
Ensure that the text you provide results in a valid SQL statement.
Note: If the data type is memberuniquename, a value for the DefaultText parameter must be
provided. For example:
(#prompt('WhichLevel', 'memberuniquename', '[goSalesAgain].[PRODUCT1].
[PRODUCT].[PRODUCT(All)]->[all]')#)
Text
This optional parameter is text that precedes any user-provided values, such as 'and column1 = '.
QueryItem
This parameter is optional. The prompt engine can take advantage of the Prompt Info properties of the
query item. Descriptive information can be shown, although the prompt value is a code.
TextFollowing
This optional parameter is the closing parenthesis that is used most often for the promptmany function.
This parameter is also useful when the prompt is optional and is followed by hardcoded filters in the SQL
statement.
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY = #prompt('CountryName')#
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY_CODE >
#prompt('Starting CountryCode',
'integer',
'',
'',
'[gosales].[COUNTRY_MULTILINGUAL].[COUNTRY_CODE]')#
Optional prompt and mandatory filter with the data type and default value specified
Note the following:
• This prompt allows the user to supply a valid integer response.
• The DefaultText argument is specified. Therefore, the user may omit entering a value, in which case
the value 10 is used. This makes it an optional prompt, but not an optional filter.
Example 1:
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY_CODE >
#prompt('Starting CountryCode',
'integer',
'10'
)#
Example 2:
[gosales].[COUNTRY].[COUNTRY] = #prompt('countryPrompt','string','''Canada''')#
Result 2:
[gosales].[COUNTRY].[COUNTRY] = ‘Canada'
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
#prompt('Starting CountryCode',
'integer',
' ', // < = = this is a space
'where COUNTRY_MULTILINGUAL.COUNTRY_CODE >'
)#
Syntax substitution
Note the following:
• The Datatype argument is set to token, which means that the user-provided value is entered without
any checking on the provided value.
Because checking is not performed on the value, the expression editor may indicate that the expression
is not valid. When a valid user-provided value is supplied or if you provide a valid default value,
expression editor will interpret the expression as valid.
• Token should be used only if there is a list of pick-values for the user.
• The DefaultText argument is specified. Therefore, this is an optional prompt and group by
COUNTRY is used in the generated SQL.
Select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
#prompt('Sort column',
'token',
'group by COUNTRY',
'group by '
)#
select
ORDER_METHOD.ORDER_METHOD_CODE as ORDER_METHOD_CODE,
ORDER_METHOD.ORDER_METHOD_#$language#
as ORDER_METHOD_EN
select
ORDER_METHOD.ORDER_METHOD_CODE as ORDER_METHOD_CODE,
ORDER_METHOD.ORDER_METHOD_#$language#
as ORDER_METHOD_EN
from
gosales.gosales.dbo.ORDER_METHOD ORDER_METHOD
#prompt($DynPromptLabels{'ex9'},
'',
' ',
'where ORDER_METHOD.ORDER_METHOD_' + $language + '
>'
)#
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY IN (#promptmany('CountryName')#)
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY_CODE IN (
Optional prompt with the data type and default value specified
The In clause and both parentheses are part of the SQL statement.
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
where COUNTRY_MULTILINGUAL.COUNTRY_CODE IN (
#promptmany('Selected CountryCodes',
'integer',
'10'
)#
)
select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
#promptmany('Selected CountryCodes',
'integer',
' ', // < = = this
is a space
'where COUNTRY_MULTILINGUAL.COUNTRY_CODE IN
( ',
'',
')'
)#
Select
COUNTRY_MULTILINGUAL.COUNTRY_CODE as COUNTRY_CODE,
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
COUNTRY_MULTILINGUAL."LANGUAGE" as LANGUAGE1,
COUNTRY_MULTILINGUAL.CURRENCY_NAME as CURRENCY_NAME
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL,
gosales.gosales.dbo.COUNTRY XX
where COUNTRY_MULTILINGUAL.COUNTRY_CODE = XX.COUNTRY_CODE
#promptmany('Selected CountryCodes',
'integer',
' ',
' and COUNTRY_MULTILINGUAL.COUNTRY_CODE IN (',
'',
')'
)#
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,
Procedure
1. Select one or more dimensions or query subjects.
2. Click Tools, 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:
• To add shortcuts to the group, click Create a shortcut for all selected objects.
• To move the objects to the group, click Create shortcuts only for objects that are used outside the
star schema.
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 “Creating a relationship shortcut ” on page 50, or create individual dimensions
or query subjects if you must rename them.
Procedure
1. Select the query subjects that are required to access the data, and put them in a new namespace
“Creating folders or namespaces” on page 146.
2. Ensure that all relationships are correct “Relationships” on page 46.
3. Handle multilingual metadata “Multilingual metadata” on page 98.
4. Create a model dimension for each snowflaked dimension:
• Select the query subjects you need.
• Click Actions, Merge in New Regular Dimension.
• Rename the new model dimension. By default, its name is composed of the concatenated names of
the original objects.
5. If you require multiple levels, do one of the following:
• Use the dimension map to define hierarchies and levels for the dimension. See “Creating regular
dimensions” on page 83.
• Specify determinants if the levels are stored in a single query subject. See “Determinants” on page
61.
Shortcuts
A shortcut is a pointer to an object, such as a relationship, a dimension, a query subject, or a folder. 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.
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.
Procedure
1. Right-click the query subjects, dimensions, or folders that you want to create shortcuts to, and do one
of the following:
• Click Create, Alias Shortcut.
• Click Create, Shortcut.
• Click Create Star Schema Grouping. This command is also available from the Tools menu.
2. For shortcuts to query subjects or dimensions, in the Properties pane, set the Treat As property to
Alias or Reference.
Procedure
1. Click Actions, 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:
• To move selected objects to the folder, click Move the selected items to the new folder. When you
move an object that participates in a relationship, the relationships to this object also move.
• To create shortcuts that reference selected objects, click Create a shortcut for the selected
items. Do not select all the objects in the namespace to avoid creating a recursive structure in
the published package.
5. Select the objects you want to add to the folder.
6. Click Finish.
Procedure
1. Click Actions,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.
Procedure
1. In the Project Viewer pane, click a query subject or dimension.
2. Click Actions, Create, Query Item Folder.
Procedure
1. In the Project Viewer pane, click a measure dimension.
2. Click Actions, Create, Measure Folder.
A new folder displays 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.
Durable models
When building a model, you should consider the possibility of later changes to user requirements that you
might need to reflect in the model. Your goal is to build a flexible model that can withstand necessary
changes without impacting existing reports, report authors, and users.
Renaming query items is one of the most frequent changes that modelers need to implement in their
models. If your models are durable, you can make these types of changes quickly, with no impact on
existing reports. The calculations and filters that reference the renamed query items also remain valid.
Durable models are useful in both single-language and multilingual environments when renaming query
items as a result of changing business requirements. In a multilingual environment, durable models
also simplify the translation process by allowing you to specify language-specific labels for query items
without the risk of breaking existing report references for other languages.
When working with durable models, remember the following conditions:
• Specify a design language for your project.
Choose the locale version of the language that is not included in your business requirements. This could
be a less-frequently used locale, such as English (Zimbabwe). For example , when you create a project
with a design language of English (Zimbabwe), the active language is also English (Zimbabwe). You
cannot change the design language of a project after you create a model.
• When you are designing the model, the design language and active language must be the same.
Designing includes creating new items such as Namespaces, Query Subjects, including calculations, or
changing the model structure. For example, for design activities, both your design language and active
language should be English (Zimbabwe)
• When you are renaming the model items for your business users, the active language should not be the
same as the design language.
Procedure
1. From the Welcome page, click Create a new project.
Tip: If you are in IBM Cognos Framework Manager, click New from the File menu.
2. In the New Project page, specify a name and location for the project, and click OK.
3. In the Select Language page, click the design language for the project, and then click OK.
Ensure that you choose the proper design language, as documented earlier in this section. You cannot
change the language that you select after you click OK, but you can add other project languages later.
4. In the Metadata Wizard, click Next to import your metadata.
5. Follow the instructions in the Metadata Wizard:
• Select a data source connection, and click Next.
• Select the check boxes for the objects that you want to import.
• Specify how the import should handle duplicate object names. Choose whether to import and
create a unique name. If you choose to create a unique name, the imported object displays with a
number. For example, you see QuerySubject and QuerySubject1 in your project.
• If you want to import system objects, select the Show System Objects check box, and then select
the system objects that you want to import.
• Specify the criteria to use to create relationships, and click Import.
For more information, see “Relationships” on page 46.
You see a list of objects that could not be imported, and a count of objects that were imported.
6. Click Finish.
Save the project file (.cpf) and all related files in one folder. When you save a project with a different
name or format, ensure that you save the project in a separate folder.
7. Click the project name in Project Viewer, and set the project property Use Design Locale for
Reference ID to true.
Note: Changing this property back to false later, after renaming query items in the model, would
result in breaking reports based on this model.
8. Click Project, Languages, Define languages, and add the required languages to the project choosing
one of them as Active language.
When you specify the active language, ensure that it is not the same as the design language. For more
information, see “Adding a language to a project” on page 101.
9. Save the project.
10. Create the required packages, and publish them to the IBM Cognos Analytics server.
Results
You can now test the model to ensure that it works as expected.
Procedure
1. Launch Reporting using the package published in Creating a durable model, and create and save a
report.
2. In Framework Manager, open the project created in Creating a durable model, and ensure that the
project active language is different than the design language.
3. In the active language, rename some of the query items included in the package published in step 1.
4. Re-publish the package to the IBM Cognos Analytics server overriding the original package.
5. Launch Reporting again using the re-published package, and open the report created in step 1.
The report shows the changed query item names in the Insertable Objects pane. However, the report
specification shows the query item names in the design language, not in the active language, in which
you made the changes.
6. Run the report.
The columns representing the renamed query items show the new names.
Results
The model is durable because renaming its query items did not break existing reports.
Analyzing models
You can analyze the metadata in a model by using the Model Advisor, an automated tool that applies
rules based on current modeling guidelines, and identifies areas of the model that you need to examine.
To assist you in understanding the nature of the highlighted issue as well as some possible actions, you
are provided with links to the appropriate sections of the documentation. The Model Advisor is not a
replacement for a knowledgeable modeler; it provides new modelers with an assistive tool and more
experienced modelers with a diagnostic tool.
You can select one or more tests to run against the selected model or subset of a model. Verify the model
and fix errors before analyzing the model. For more information, see “Verifying models or packages” on
page 205.
If you are analyzing a new model, use the following workflow:
• Analyze newly-imported objects, especially their relationships and determinants.
• Use the issues that are identified to resolve potential query generation issues.
• As you build additional views, use the Model Advisor to analyze each one for potential issues.
• Before publishing the model, use the Model Advisor on objects that will be published.
If you are analyzing an older, established model or a model that is not yet complete, use the Model
Advisor to validate modeling practices. The workflow is similar to that used for new models: start at the
database view and work up.
select
PRODUCT_LINE.PRODUCT_LINE_CODE as Product_Line_Code,
PRODUCT_LINE.PRODUCT_LINE_EN as Product_Line,
PRODUCT_TYPE.PRODUCT_TYPE_CODE as Product_Type_Code,
PRODUCT_TYPE.PRODUCT_TYPE_EN as Product_Type,
PRODUCT.PRODUCT_NUMBER as Product_Number,
PRODUCT_MULTILINGUAL.PRODUCT_NAME as Product_Name
PRODUCT_MULTILINGUAL.DESCRIPTION as Product_Description,
PRODUCT.INTRODUCTION_DATE as Introduction_Date,
PRODUCT.PRODUCT_IMAGE as Product_Image,
PRODUCT.PRODUCTION_COST as Production_Cost,
PRODUCT.MARGIN as Margin
from
gosl_82..gosl.PRODUCT_LINE PRODUCT_LINE,
gosl_82..gosl.PRODUCT_TYPE PRODUCT_TYPE,
gosl_82..gosl.PRODUCT PRODUCT,
gosl_82..gosl.PRODUCT_MULTILINGUAL PRODUCT_MULTILINGUAL
where
(PRODUCT_MULTILINGUAL."LANGUAGE" - N'EN')
and
(PRODUCT_LINE.PRODUCT_LINE_CODE = PRODUCT_TYPE.PRODUCT_LINE_CODE)
and
(PRODUCT_TYPE.PRODUCT_TYPE_CODE = PRODUCT.PRODUCT_TYPE_CODE)
and
(PRODUCT.PRODUCT_NUMBER = PRODUCT_MULTILINGUAL.PRODUCT_NUMBER
If you test only Product Name, you see that the resulting query uses only Product Multilingual, which is
the table that was required. This is the effect of minimized SQL.
select
PRODUCT_MULTILINGUAL.PRODUCT_NAME as Product_Name
from
gosl_82..gosl.PRODUCT_MULTILINGUAL PRODUCT_MULTILINGUAL
where
(PRODUCT_MULTILINGUAL."LANGUAGE" - N'EN")
Procedure
1. In Project Viewer, select one or more objects to analyze.
2. Click Tools, Run Model Advisor.
Tip: You can also right-click one or more objects, and then click Run Model Advisor.
3. In the Options tab, select the criteria that you want to use in the analysis.
4. Click Analyze.
5. In the Model Advisor tab, review the issues that are identified.
6. To understand whether there is a problem with an object, click the Context explorer icon in the
Action column of the report.
The Context Explorer shows the objects that the selected object is connected to. You can selected a
related object and see which objects it is connected to.
After importing metadata, you must ensure that it is set up to meet your users' reporting requirements,
and provide any additional information that they require. Enhancements you make in IBM Cognos
Framework Manager do not affect the original data source.
Tip: To verify that the model meets the reporting requirements, you can select objects that will display in
a report and test them. The test results show you the report that your users will see as well as the SQL
and messages from the IBM Cognos software, if any. Or you can publish a package at any time and then
use the package to create reports.
You can check the project at any time to ensure that the references between the objects it contains are
valid. See “Verifying models or packages” on page 205.
You can do the following when working with SAP BW metadata in IBM Cognos Framework Manager:
• Import the metadata .
• Work with dimensions .
• Control how data is used and formatted by checking query item properties .
• If required, add more business rules, such as calculations and filters, to refine the retrieved data and to
ensure that the right information is available for your users .
• Organize the model by creating separate views for each user group that reflect the business concepts
familiar to your users .
• If required, adjust settings in Framework Manager and the IBM Cognos studios to optimize
performance.
After working with the model, you can create a package and publish it for your users. For more
information, see “Publishing packages” on page 216.
Note: You can also create packages for SAP BW cubes and queries directly in IBM Cognos Administration.
For more information, see the section about packages in the Administration and Security Guide.
SAP BW structures
Many existing SAP BW queries contain structures that you can use in IBM Cognos queries to control the
amount and order of information that your users see. For example, with dual structures, you can create a
crosstab report with one structure on each axis.
The structures are:
• Key figure structure
The SAP BW Query Designer automatically creates a key figure structure when you add key figures to a
query. You must have at least one key figure to import the query metadata into IBM Cognos Framework
Manager. This is true even when you do not use the key figure in reports. Therefore, you will always have
a key figure structure.
• Characteristic structure
A characteristic structure is a collection of characteristic values (members) from one or more
dimensions. You create a characteristic structure in SAP by adding a structure to the query, and then
adding the required members to the structure. In IBM Cognos software, the structure displays as an
additional dimension that has only one multiple-root level.
When you import the SAP BW query into Framework Manager, the key figure structure displays in
the measure dimension called Key Figures and the characteristic structure displays as an additional
dimension.
If you re-import the same SAP BW query into Framework Manager, you must use the same setting for
the SAP BW Dual Structures Support check box. Framework Manager does not allow you to select a
different setting for the same query because different objects are then generated in the model and this
leads to errors. You can use different settings for different queries.
SAP BW hierarchies
When importing metadata, Framework Manager generates a dimension in each SAP BW characteristic.
Only one hierarchy associated with a given characteristic can be used in a report. Therefore, you should
group dimensions that represent the hierarchies of a single characteristic into a folder or model query
subject to make reporting easier for your users.
If there are multiple hierarchies in an SAP BW data source, the first hierarchy that is imported becomes
the default hierarchy.
Framework Manager supports the following types of hierarchies:
• Characteristic
This is a list of all the characteristic values.
• Text node
Non-leaf nodes contain only text and do not reference any other data source object.
• Characteristic value
The nodes of each level of a presentation hierarchy are values from another characteristic.
• Recursive
The nodes of the entire presentation hierarchy are from the characteristic itself.
If a characteristic is not in a time dimension but it is a date and is treated as a date in SAP BW, the
characteristic is imported with the date data type.
Versioned hierarchies
You can import the following types of versioned hierarchies from an SAP BW data source:
Procedure
Results
After importing, verify the usage and aggregation property values. Fact tables may contain numeric
columns that should not be aggregated, such as exchange rates.
When you want to recreate a query on another SAP BW system, use the SAP BW migration mechanism
to transport the query. This ensures that the technical name of each measure remains the same so that
any project that references the query can be directed to either system without any modifications to the
project.
For information about setting access privileges to retrieve metadata from SAP BW, see “Access to SAP BW
metadata and data” on page 157.
The types of dimensions that you can work with in IBM Cognos Framework Manager are regular
dimensions and measure dimensions. In SAP BW, measure dimensions are called key figures.
For example, in a project for sales analysis, you include these dimensions:
A regular dimension contains descriptive and business key information and organizes the information in a
hierarchy, from the highest level of granularity to the lowest. It usually has multiple levels and each level
requires a key and a caption. If you do not have a single key for your level, it is recommended that you
create one in a calculation.
Model regular dimensions are based on data source or model query subjects that are already defined in
the model. You must define a business key and a string type caption for each level. When you verify the
model, the absence of business keys and caption information is detected. Instead of joining model regular
dimensions to measure dimensions, create joins on the underlying query subjects and create a scope
relationship between the regular dimension and the measure dimension.
When dimensions are based on SAP BW metadata, you cannot edit the underlying query.
Procedure
1. Click the regular dimension you want to modify.
2. From the Actions menu, click Edit Definition.
3. Choose the action that you want:
• Embed calculations by selecting the level, clicking Add, and then defining the expression “Create a
calculation (SAP BW)” on page 192.
• Embed filters “Creating a filter (SAP BW)” on page 194.
• Test the dimension “Testing a dimension or other object (SAP BW)” on page 171.
4. Click OK.
You can specify multiple hierarchies on regular dimensions in IBM Cognos Framework Manager. Multiple
hierarchies for a regular dimension behave as views of the same query. The first hierarchy is the primary
or default hierarchy.
You can use only one hierarchy at a time in a query. For example, you cannot use one hierarchy in the
rows of a crosstab report and another hierarchy from the same dimension in the columns. If you need
both hierarchies in the same report, you must create two dimensions, one for each hierarchy. For more
information, see “Modeling dimensions with multiple hierarchies” on page 86.
For example, sales staff can be viewed either by manager or by geography and you can model it as a
single dimension with two hierarchies.
IBM Cognos software uses default settings that will not fail for the hierarchy type.
• For dimensions that represent SAP BW characteristics, the Balanced property is set to true and the
Ragged property is set to false.
• For dimensions that represent presentation hierarchies, the Balanced property is set to false and the
Ragged property is set to true.
These settings may not reflect the appropriate values as IBM Cognos software does not determine the
actual hierarchy structure. You can improve performance of SAP BW models and queries by adjusting
Balanced hierarchy
In SAP BW, all leaf nodes of a hierarchy are values of the characteristic, but each path does not need to
descend to the lowest level of the hierarchy.
You can define whether a dimension represents a balanced hierarchy by modifying the Balanced property
of a dimension. The value that you set depends on the type of object that the dimension represents, and
whether the hierarchy is balanced.
characteristic true
For a dimension that represents a characteristic without a presentation hierarchy, this property is read-
only and is assigned a value of true.
If a presentation hierarchy is balanced, then set the Balanced property of its associated dimension to
true. By default, it has a value of false for all presentation hierarchies. A hierarchy is balanced if all leaf
characteristic values occur at the lowest level of the hierarchy. By setting the Balanced property to true
as appropriate, the IBM Cognos Analytics server can generate more efficient MDX.
When all paths are of the same depth, set the Balanced property to true, otherwise set it to false.
Unbalanced hierarchy
An unbalanced hierarchy can also be ragged. In a ragged-unbalanced hierarchy, there are gaps in the
levels and the levels descend to different depths.
In SAP BW, this occurs only when there are "not assigned" (or "#") nodes in a presentation hierarchy.
However, the presence of such a node does not ensure that the hierarchy is unbalanced. You must study
the layout of a hierarchy to be certain.
An unbalanced hierarchy can also be ragged. In a ragged-unbalanced hierarchy, there are gaps in the
levels and the levels descend to different depths.
Ragged hierarchy
At least one path in the hierarchy skips at least one level.
For example, the highest level is Company (Level 1); Level 2 is Branch; Level 3 is Building; Level 4
is Department. Some branches may only have one building location, with the same departments as
multi-building locations.
characteristic false
Network hierarchy
A member of the hierarchy has more than one parent.
For example, an employee may report through different organizations and have multiple managers. For
SAP BW, this employee will be included in the count of all employees only once, and not be included in
every organization.
You can also create expressions that refer to roles instead of query items. You must use the roleValue
function to refer to a particular role. For example, you want to query against a specific role in a hierarchy
but the query item playing that role is different at each level of the hierarchy. A single query can span the
different query items at each level. You can also use the roleValue function when you know the role but
not the underlying query item.
You can assign multiple roles to one query item, but the same role cannot be assigned to different query
items in the same level.
Default roles are pre-defined for all parent-child hierarchies and for all levels in level-based hierarchies.
Most of these roles are not visible in the IBM Cognos studios.
The roles that are reserved by IBM Cognos Analytics start with an underscore. The name for a custom role
cannot start with an underscore.
Default roles
The default roles include the following:
• _businessKey
Represents the key for the level. This role is also used to drill through from one data source to another
because the business key should be consistent across your organization.
The _businessKey role can be assigned to only one attribute in a level.
• _dimensionUniqueName
Returns the name of the dimension as defined in the Framework Manager model.
• _hierarchyUniqueName
Returns the name of the hierarchy as defined in the Framework Manager model.
• _levelLabel
Returns the label that is assigned to the level.
• _levelNumber
Returns the number for the level.
• _levelUniqueName
Returns the name that is assigned to the level.
• _longName
Is assigned to the query item that represents the long name for a level.
• _memberCaption
Presents the caption for a member that will be shown in the IBM Cognos studios.
• _memberDescription
Returns the description for a member within a dimension.
• _memberUniqueName
Returns the IBM Cognos member unique name.
• _parentUniqueName
Defines the name that is assigned to the parent of the selected query item.
• _planningDefault
Specifies which query item to use when measures are selected. This role is applicable only for IBM
Cognos Planning and SAP BW.
Custom roles
You can create custom roles. Each role that you create must have a unique name. The roles that are
reserved by IBM Cognos start with an underscore. The name for a custom role cannot start with an
underscore. You can translate the custom roles in the model.
User-defined properties in OLAP data sources are assigned roles with the same name as the query item.
Procedure
1. Click the dimension whose roles you want to define.
2. From the Actions menu, click Edit Definition.
3. Click the Dimension tab.
4. In the Hierarchies box, click the level you want.
5. In the Select a level in the hierarchy control to see the query items box, click a query item.
6. Under Role, click the ellipsis (...) button.
7. Click the Custom Roles tab, and click Add.
8. Click Close.
9. Click OK.
Results
You can also use the Dimension Map tab to define roles. Click Attributes, right-click the query item, and
click Edit Roles.
Procedure
1. Click the key figures dimension you want to modify.
Procedure
1. Select one or more objects that you want to explore.
2. From the Tools menu, click Launch Context Explorer.
3. To see the connected objects, click one or more objects and click the appropriate button.
Goal Button
4. If you want to see details about an object, such as its relationships and query items, right-click the
object, click Navigate Diagram, Diagram Settings, and then select the details you want.
Testing Objects
You can see the results that an object returns by testing it. You can test when creating an object or later
on. The objects you can test are dimensions, query subjects, query sets, hierarchies, levels, calculations,
and query items.
You can view the data that will display in a specific report before publishing a package by selecting and
testing the objects that will display in the report. This makes it easier to debug a model and to verify that
If you test a child segment of a segmented model, you may see an error if an object you are testing refers
to an object in another child segment and the referenced object is not available to the project you are in.
Check that the parent model contains all the objects and that this error message does not display when
you test the parent model.
Governor settings may affect the testing results. For more information, see “Governors” on page 247.
You can change existing test settings to customize the results that the test shows. For example, in
addition to other settings, you can control the number of rows returned.
Steps for testing when creating or modifying the object (SAP BW)
Procedure
1. Select the object you want to test.
2. From the Actions menu, click Edit Definition, and click the Test or Query Information tab.
The Test Results box is initially empty until you run the query.
Any result sets that contain binary large objects are shown as [blob].
3. To run the query and bring back all the test results, click Test Sample.
4. If you are testing an expression and you want to apply the Regular Aggregate property of the query
item or measure that is referenced in the expression, select the Auto Sum check box.
If you clear this check box, a row is returned for each row in the result set of the query.
5. If you want to obtain more information about the query results, click the Query Information tab.
6. Click OK.
Procedure
1. Select the objects that will display in the report.
2. Click Tools, Test.
3. To run the query and bring back all the test results, click Test Sample.
4. To view details about any problem that is found, click the Query Information tab.
If you do not see the results of the query in the test window, the data from your data source may
exceed the value of one of the governors. The query stops at the specified limit, but the test result
window does not contain any data. Tip: Set each governor to zero.
Procedure
1. Select the object that you want.
2. Click Actions, Edit Definition, and then click the Test tab or the Query Information tab.
3. Click Options, Test Settings .
4. Choose the options that you want.
Retrieve all data and show a Select the Restrict the This setting applies to all
specified number of rows maximum number of rows to dimensions, query subjects, and
be returned check box and type query sets in the model.
the required number of rows.
This setting is saved and used
This setting does not improve in your next session with any
performance for retrieving data model.
when testing dimensions, query
subjects, and query sets.
Specify the level of detail Drag the Level of Information This setting is saved and used
shown in Results Information in your next session with this
slider to the location that model.
represents the amount of detail
you require.
Temporarily override session In the Session Parameters box, The override values are not
parameters click Set. saved with the model. This
setting is for your current
The Session Parameters dialog
session only.
box displays.
Apply relevant design mode Select the Apply all relevant This setting is saved and used
filters design mode filters when in your next session with any
testing check box. model.
This applies all relevant filters
whose usage is set to design
mode in another dimension,
query subject, or query set.
Apply a security filter In the Security Filters box, click This setting is saved and used
Edit. in your next session with this
model.
Change the prompt values In The Current Prompt Values The prompt values are not saved
box, click Prompts. with the model.
The Model Prompts Manager This setting is for your current
dialog box displays, which session only.
shows all prompts, and their
values, that are in the model.
Procedure
1. Select the namespace folder and, from the Actions menu, click Create, Query Subject.
2. In the Name box, type a name for the new query subject.
3. Click Model and click OK.
Note: For SAP BW metadata, you can only create model query subjects.
4. Click the Query Subject Definition tab.
5. To add items to the model query subject, drag items from the Available Model Objects box to the
Query Items and Calculations box.
You can change the order of items and calculations. However, if the query subject contains a query
item folder, you can change the order only in the Project Viewer.
6. To embed calculations in the model query subject, click Add and define the calculation.
7. To embed filters in the model query subject, click the Filters tab.
8. To test the model query subject, click the Test tab.
9. Click OK.
A warning displays if any modifications invalidated relationships, other query subjects, calculations, or
filters.
Results
You may be interested in the following related topics:
• embedded calculations “Create a calculation (SAP BW)” on page 192
• embedded filters “Creating a filter (SAP BW)” on page 194
Procedure
1. Ctrl+click the objects that you want to merge into a single query subject.
2. Click Actions, Merge in New Query Subject.
Procedure
1. Select the query subject you want to evaluate.
2. From the Tools menu, click Validate Object.
Results
If you changed the Regular Aggregate property to unsupported, the property is reset when you evaluate
the query subject. If the property is set to any other value, the property is not changed.
Note: An error message is displayed for each invalid query subject. The object will also have a status of
Invalid.
Last Changed The date that the query item or measure was last
changed. The property is automatically updated
with the current date time.
Last Changed By The user who last changed the query item or
measure. This property is automatically updated
when the item is changed.
The value is the current logon username.
Data Type The data type that was set in the data source.
Because this property is set in the data source, it is
read-only in Framework Manager.
IBM Cognos Framework Manager uses the following rules to set the Usage and Regular Aggregate
properties.
If the measure is semi-additive, use the Aggregate Rules property to define rules for semi-additive
aggregation. See“Defining aggregate rules for semi-additive measures” on page 111.
For SAP BW metadata, you cannot change these properties for dimensions.
Rules for setting properties for model query subjects (SAP BW)
For model query subjects, Framework Manager uses the settings for the object that the model query
subject is based on.
Note: If you change an aggregation value for SAP BW metadata, the aggregation cannot perform time-
based queries because the aggregation rules are not applied.
Usage property
You need to verify that this property is set correctly. For example, if you import a numeric column that
participates in a relationship, the Usage property is set to identifier. You can change the property.
For SAP BW query items, the value of the Usage property depends on the type of dimensional item the
query item is based on.
Semi-aggregate property
For SAP BW metadata, the Semi-Aggregate property shows the value that is set in the data source, and
the property is read-only.
If the value is set to unsupported in IBM Cognos Framework Manager, the semi-aggregate behavior is
ignored in the IBM Cognos studios.
The Semi-Aggregate property will not be supported in future releases. Instead, use the Aggregate Rules
property for semi-additive measures.
Procedure
1. In the Project Viewer pane, click the query item you want to format.
2. In the Properties tab of the Properties pane, click the Format property.
3. Set the format type to currency to ensure that currency formatting is applied to all types of reports.
4. In the Currency scope box, specify the type of currency. If you do not see the currency you want to
use, click the Add button.
5. In the Properties box, select or type the appropriate property value.
6. Click OK.
?<PromptName>?
?<PromptName>?
Procedure
1. Click the query item.
2. In the Properties pane, click the Properties tab.
3. Click the plus sign (+) next to the Prompt Info property.
This is a compound query item property.
4. Modify the following properties to reflect the behavior you require.
Specifies which query item is passed from the Use Item Reference
prompt to the filter.
Each value is associated with a value in the query
item specified in the Display Item Reference
property.
Specifies which query item is used in the filter Filter Item Reference
expression to retrieve data.
Edit Box A simple text box. If the data type of the column
is date or dateTime, this value generates a date or
date-time control as well as the text box.
Select with Search A list control so that users can search for values.
For SAP BW metadata, this value is not relevant.
Select with Tree A tree prompt control for prompts that are based
on a hierarchy node.
Using the filter item reference and use item reference properties
The values of the Filter Item Reference and Use Item Reference properties must be compatible. The
value of the Use Item Reference property must be a type that is expected by the Filter Item Reference
property. Otherwise, the report user may receive unexpected results. This may occur when a report user
creates a filter without creating a prompt page.
In an example model, the Use Item Reference property is set to Employee Number and the Filter Item
Reference property is Employee Name. In Reporting, a report author creates the following filter without
creating a prompt page:
Reference.EmployeeName in ?parm1?
Reporting automatically generates prompts when you create a filter without creating a prompt page.
Because the prompt is generated, Reporting uses the Prompt Info properties from the Employee Name
query item in the Framework Manager model.
The Use Item Reference indicates that the values being passed to the filter are employee numbers. The
Filter Item Reference is filtering data based on Employee Name. The filter is as follows: Reference].
[Employee Name] in ("1", "2"). Since there are no Employee Name values of "1" or "2", the report
will be blank.
SAP BW variables
SAP BW variables are parameters of an SAP BW Query that are set up during query definition. When you
run the query, the SAP BW variables are filled with values. They function as placeholders and can be
processed in different ways. They are automatically exposed as prompts at run time.
SAP BW variable information is included in a composite custom property named SAP BW Variables
that exists only if a data source has one or more variables associated with it. The SAP BW Variables
property contains one or more composite properties, each of which must be assigned a unique name.
Each property represents a description of a single SAP BW variable. Because the variable information is
specified in a custom property, Framework Manager does not validate these properties.
The SAP BW variable information is obtained using the SAP BW BAPI MDDataProviderBW::GetVariables.
Framework Manager supports these types of SAP BW variables:
• Characteristic
There are two kinds of characteristic variables: characteristic value and hierarchy node. Characteristic
values variables select characteristic values. Hierarchy node variables select values from any position in
a presentation hierarchy.
• Hierarchy
The user is not prompted for a value because IBM Cognos software automatically populates it at run
time, based on the selected hierarchy. Variables for hierarchies function act as placeholders for the
hierarchy of a characteristic. All the values for hierarchy variables are read-only.
• Formula
The user types a numeric value at run time. Use formula variables if a formula component should be
entered only when a query is run. For example, you can use a formula variable for a value-added tax rate
to process the current rate at run time.
• Authorization
Authorization variables are like other variables, but IBM Cognos software automatically populates the
variable values with the user's credentials. SAP BW uses these credentials to supply the information
needed by an SAP BW Query that has security applied to it.
Variables for hierarchies function as placeholders for the hierarchy of a characteristic. All the values for
hierarchy variables are read-only.
Name property
This property is a string value.
Caption property
The string value for this property is a composite and is locale-dependent. Represent each locale in the
model by a custom property whose value is the locale name. For example, if the locales en-ca and fr-fr
exist in the model, define two custom properties named en-ca and fr-fr.
The default value is obtained from SAP BW.
value SAP_VAR_SEL_TYPE_VALUE
interval SAP_VAR_SEL_TYPE_INTERVAL
complex SAP_VAR_SEL_TYPE_COMPLEX
multiValued SAP_VAR_SEL_TYPE_COMPLEX
Restrictions: Read-only.
optional SAP_VAR_INPUT_TYPE_OPTIONAL
mandatory SAP_VAR_INPUT_TYPE_MANDATORY
mandatoryNotInitial SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL
Restrictions: Read-only.
Description property
This property is a string value.
Value Restrictions
typeIn Required for numeric variables and optional for characteristic values
Type numeric
Caption
You can change the default values for a numeric variable except for the Prompt Type property, which is
read-only.
Type characteristic
Caption
Default Low Value If the entry type is value or complex, the default
property is shown.
If the entry type is interval, the default low
property is shown. This value is obtained from SAP
BW.
Default High Value If the entry type is value or complex, the default
property is shown.
If the entry type is interval, the default high
property is shown. This value is obtained from SAP
BW.
A characteristic value variable for the 0CALDAY dimension is shown in the model as a date. The Data Type
property is set to xsdDate and the Prompt Type property is set to calendar. The Prompt Type property is
read-only for the 0CALDAY dimension.
Type characteristic
Caption
Default LowValue
Default HighValue
Procedure
1. Add calculations so that your users can include calculated data in their reports “Create a calculation
(SAP BW)” on page 192.
2. Create and apply filters so that you can limit the data that a query subject retrieves “Creating a filter
(SAP BW)” on page 194.
3. Add prompts that will automatically display whenever a dimension or query subject is used in a report;
report consumers are then prompted to filter data “Defining a prompt control (SAP BW)” on page 182.
4. Use session parameters “Create a session parameter (SAP BW)” on page 199 and parameter maps
“Creating a parameter map (SAP BW)” on page 198 to dynamically resolve expressions.
5. Create a security filter to control the data that is shown to your users when they set up their reports
“Adding data security” on page 210.
Procedure
1. Click the namespace or folder and, from the Actions menu, click Create, Calculation.
2. In the Name box, type a name for the calculation.
3. Define the expression.
Goal Action
Retrieve all data and show a specified number of Click the options button, select the Restrict the
rows maximum number of rows to be returned check
box, and type the required number of rows to be
returned.
Override session parameters Click the options button, click Set, enter a value
in the Override Value field, and click OK.
Override prompt values Click the options button, and then click Prompts.
The Model Prompts Manager dialog box
displays, which shows all prompts, and their
values, that are in the model.
For example, you can use the in_range function to create a filter that retrieves data for products
introduced in a specific time frame. The syntax for this example looks like this:
[gosales_goretailers].[Products].[Introduction
date]
in_range {Feb 14, 1999 : July 14, 2007}
Note: When using a date or time function, you must use a 24-hour clock. IBM Cognos Framework
Manager does not support "a.m." or "p.m." in expressions. For example, use 20:00 to signify 8 p.m.
You can restrict the data represented by dimensions or query subjects in a project by creating a security
filter. The security filter controls the data that your users can see when they set up their reports.
You can also apply governors to restrict the data that the queries in a package retrieve.
Framework Manager supports stand-alone filters and embedded filters.
• Use a stand-alone filter when you want to reuse the expression.
You can add a stand-alone filter to one or more dimensions or query subjects to limit the data that the
query retrieves when the filtered dimension or query subject is used in a report, or you can include it
in a package to make it available to your users. By moving a stand-alone filter or a shortcut to it into a
folder, you can better organize the model objects.
• Use an embedded filter when you want to use a filter with only one dimension or query subject.
You can create an embedded filter when modifying a dimension, relational data source query subject, or
model query subject.
If you start with an embedded filter, you can later convert it into a stand-alone expression that you can
apply to other dimensions or query subjects.
Tip: Right-click the filter expression in the Filters tab and click Convert to Stand-alone Filter.
When you embed a filter, the data source query subject must have a relationship to any query subject
referenced by the expression. This relationship is necessary even if the expression references a model
query subject based on the same table as the data source query subject in which you are embedding
the expression.
To create a filter on an unrelated query subject, do one of the following:
Goal Action
Add query items and filters On the Model tab, drag the objects you want to the
Expression Definition box.
Retrieve all data and show a specified number of Click the options button, select the Restrict the
rows maximum number of rows to be returned check
box, and type the required number of rows to be
returned.
Override session parameters Click the options button, click Set, enter a value in
the Override Value field, and click OK.
Override prompt values Click the options button, and then click Prompts.
The Model Prompts Manager dialog box displays,
which shows all prompts, and their values, that are
in the model.
You can also apply governors to restrict the data that the queries in a package retrieve. For more
information, see “Governors” on page 247.
You may be interested in the following related topics:
• Security filters “Adding data security” on page 210
• Parameters “Creating a parameter map (SAP BW)” on page 198
• Session parameters “Create a session parameter (SAP BW)” on page 199
You can also apply governors to restrict the data that the queries in a package retrieve.
Procedure
1. Do one of the following:
• To create a stand-alone filter, click the namespace or folder, and click Actions, Create, Filter.
• If you want to create an embedded filter, double-click the dimension or query subject that will
contain the filter, click the Filters tab, and then click Add.
2. In the Name box, type a name for the filter.
3. Define the expression.
Tip: If there is an invalid expression in the filter, review the Tips box in the expression editor for more
information.
Goal Action
Add query items and filters On the Model tab, drag the objects you want to
the Expression Definition box.
Retrieve all data and show a specified number of Click the options button, select the Restrict the
rows maximum number of rows to be returned check
box, and type the required number of rows to be
returned.
Override session parameters Click the options button, click Set, enter a value
in the Override Value field, and click OK.
Override prompt values Click the options button, and then click Prompts.
The Model Prompts Manager dialog box
displays, which shows all prompts, and their
values, that are in the model.
4. Click OK.
Results
You can also apply governors to restrict the data that the queries in a package retrieve. For more
information, see “Governors” on page 247.
You may be interested in the following related topics:
• “Adding data security” on page 210
• “Creating parameter maps ” on page 125
You can embed a stand-alone filter in dimensions or query subjects, but if you want a different usage for
each embedded filter, you must create different versions of the stand-alone filter. Otherwise, your users
could be required to fill in a prompt that you thought was optional if there is any instance where the usage
is set to mandatory. For information about mandatory and optional prompts, see “Mandatory and optional
prompts” on page 133.
For example, in query subject A, you embed a stand-alone filter and define it as optional. In query subject
B, you define it as mandatory. When your users create a report that uses both query subjects, they are
required to choose values in both filters, even the one defined as optional. All instances of the filter are
considered to be mandatory when used in the same query. The solution is to create different versions of
the filter, each with its own name.
Procedure
1. Create a filter.
2. Select the filter, and click Actions, Edit Definition.
3. Click the Filters tab, and drag the filter you created to the Filters box.
4. Select a usage value for the filter.
Design Mode Only Retrieves a small subset of the data for the
sample report. Use this usage value when you do
not need to see all the data, for example when
testing a query subject.
To apply design mode filters in Framework
Manager, select the Apply all relevant design
mode filters when testing option. This option is
available on the Test Settings tab.
Your users may need the design mode filter
in Query Studio when they want to focus on
designing the layout and format of a report and
not retrieve all the data as they work. To access
the design mode filter in Query Studio, run the
report with limited data.
.[CountryName]
=
?WhichCountry?)
5. If you want to view the SQL, click the Query Information tab.
6. Click OK.
Parameter maps are similar to data source look-up tables. Each parameter map has two columns, one for
the key and one for the value that the key represents. You can manually enter the keys and values, import
them from a file, or base them on existing query items in the model.
You can also export parameter maps to a file. To modify the parameter map, you can export the map
values to a file, do additions or modifications and then import it back into IBM Cognos Framework
Manager. This is especially useful for manipulating large, complex parameter maps.
All parameter map keys must be unique so that Framework Manager can consistently retrieve the correct
value. Do not place quotation marks around a parameter value. You can use quotation marks in the
expression in which you use the parameter.
The value of a parameter can be another parameter. However, you must enclose the entire value in
number signs (#). The limit when nesting parameters as values is five levels.
When you use a parameter map as an argument to a function, you must use a percentage sign (%) instead
of a dollar sign ($).
Assign an alias to a query item that uses a parameter map as part of its name and to add the multilingual
names to the object in the Language tab (Properties pane).
Note: If you are using SAP BW metadata, you cannot use a query item to generate the keys and values of
a parameter map.
Procedure
1. Click the Parameter Maps folder, and click Actions, Create, Parameter Map.
2. In the Name box, type a name for the new parameter map.
Goal Action
Modify a parameter Select the row you want to modify, click the Edit
button, and type a value.
6. Click Finish.
#$Currency_Map[runLocale}#
This parameter map is used when the SAP BW variable Target Currency is used in a report.
These are the only properties related to SAP BW variables that can use parameter maps.
For example, user ID and preferred language are both session parameters. Because session parameters
are key and value pairs, you can think of each session parameter as an entry in a parameter map named
Procedure
1. Click Project, Session Parameters.
2. Click New Key and type a session parameter key and value.
3. Choose how to handle the override value.
Goal Action
Change the parameter value Click the row that contains the value you want to
change, click Edit, and type a value.
Remove a parameter Click a row and click the Delete button. You
cannot delete an environment session parameter.
5. Click OK.
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.
Shortcuts result in fewer dimensions to maintain. You can keep dimensions in the import view and keep
shortcuts in the business view.
When you create a shortcut to a dimension, you cannot customize which query items are in the shortcut.
The entire dimension is included in the shortcut.
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.
Right-click the query subjects, dimensions, or folders that you want to create shortcuts to, and click
Create, Shortcut.
Procedure
1. Click Actions, 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:
• To move selected objects to the folder, click Move the selected items to the new folder. When you
move an object that participates in a relationship, the relationships to this object also move.
• To create shortcuts that reference selected objects, click Create a shortcut for the selected
items. Do not select all the objects in the namespace to avoid creating a recursive structure in
the published package.
5. Select the objects you want to add to the folder.
6. Click Finish.
Procedure
1. Click Actions,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.
Category Description
Internal Model Inconsistencies Verifies that objects are properly defined and that
duplicate names are not used. Always run this
group of tests.
Invalid or Incomplete Object References Checks for dangling references or references to
missing objects.
Determinant Completeness Verifies that determinants are completely defined
with keys and attributes, and that all query items
are accounted for in a determinant.
Dimension Completeness Verifies that dimensions are fully defined with level
member captions and business keys.
Category Description
Query Status Verifies that the evaluation status for query
subjects and dimensions is valid and is not set to
"needs reevaluation" or "invalid".
Query status does not verify shortcut objects. For
example, you create a shortcut to an object. The
object becomes invalid for some reason. If you
verify the object, a message is shown because it is
invalid. When you verify the shortcut, no message
is shown.
Each category can generate multiple messages for an object. For each message, the severity, object icon,
object ID, description of the message, explanation of how to correct the problem, and possible actions
that can be performed on the object are provided. You may be able to correct a problem immediately by
modifying the object that caused the problem or by asking Framework Manager to repair the problem.
Procedure
Goal Action
Verify a model From the Project menu, click Verify Model.
Verify a package In the Project Viewer, right-click a package, and
click Verify Selected Objects.
Verify selected objects In the Project Viewer, select one or more
objects, right-click, and click Verify Selected
Objects.
2. On the Options tab, select the message severity levels that you want to see in the results.
By default, all message severity level check boxes are selected. Clear the ones that you do not want.
3. Select the categories that you want to verify.
By default, all category check boxes are selected. Clear the ones that you do not want.
4. Click Verify Model.
The Verify Model Results tab shows the results.
5. To sort the messages, click Sort in the severity, object type, or name column heading.
6. To see the object that is related to the message, under the Actions heading, click Find in Project
Viewer.
7. To repair problems for a group, select a grouping criteria from the list.
8. Select the check box beside each message for the problem that you want to repair.
Tips:
• To select all messages, select the check box at the top of the check box column. To clear all selected
messages, clear the check box at the top of the check box column.
Results
When the repair process is finished, a summary of the repair results displays. The model or package is
verified again and the results are shown in the Verify Model Results tab.
Tip: Problems that cannot be repaired during the verification of a package may be repaired using verify
model.
For stand-alone filters, if the underlying objects might not be valid, a "needs reevaluation" message
displays. The Repair option does not work for stand-alone filters. To ensure that the stand-alone filters are
valid, open each filter and save it.
Option Description
Note: IBM Cognos Framework Manager supports Ctrl+shift and Alt+shift functionality. Use these
keystrokes to select multiple objects that you wish to include or hide. For example, if you wish to
only include two items in a large branch, select the entire branch, then use Ctrl+shift to deselect the
items you wish to include, and hide the remaining selected items.
• Including a model query subject in a package
If a model query subject references other query subjects in a macro or a prompt, ensure that you
include the referenced query subjects in the package.
This can occur in the following situations:
– A macro for the model query subject references query items in another query subject.
– Another query subject is referenced in the Prompt Info properties.
After a package is published to the server, it is available to your users.
Creating a package
Procedure
1. Click the Packages folder, and from the Actions menu, click Create, Package.
2. In the Provide Name page, type the name for the package and, if you want, a description and screen
tip. Click Next.
3. Specify whether you are including objects from existing packages or from the project and then specify
which objects you want to include.
If you created other packages, we suggest that you add package references by clicking Using existing
packages.
4. Choose whether to use the default access permissions for the package:
• To accept the default access permissions, click Finish.
• To set the access permissions, click Next.
5. Specify who has access to the package, and click Next.
You can add users, groups, or roles.
6. Move the language to be included in the package to the Selected Languages box, and click Next.
7. Move the sets of data source functions you want available in the package to the Selected function
sets box.
Modifying a package
Procedure
1. Click the package that you want to modify.
2. Click Actions, Edit Definition.
3. Click the objects you want to add to or remove from the package.
Tip: To toggle through the options for an object, click the object icon, or select an option from the list.
4. Click OK.
5. If you want to add or remove package references to the package you are modifying, click Edit.
Security
In IBM Cognos Framework Manager, security is a way of restricting access to metadata and data across
IBM Cognos products.
There are different types of security in Framework Manager:
• Data security
You create a security filter and apply it to a specific query subject. The filter controls the data that is
shown to your users when they set up their reports.
• Object security
You secure an object directly by allowing users access to the object, denying users access to the object,
or keeping it hidden from all users.
• Package security
You apply security to a package and identify who has access to that package.
Each type of security uses users, groups, and roles to define access.
There are business reasons for restricting access to data. For example, you may have confidential data
that only specific users are allowed to see. You may have a variety of data, and your users only need to
retrieve data from specific tables or columns. Or, you may have a table that contains many records, and
your users only need to retrieve a subset of records from that table.
If you are using SAP BW metadata, there can be underlying SAP BW security that affects your users'
access to level members. You cannot override SAP BW security in Framework Manager. For more
information, see “Import from an SAP BW data source” on page 157.
Before you add security in Framework Manager, ensure that security was set up correctly in IBM Cognos
Analytics. For more information, see the Administration and Security Guide.
Procedure
1. Click the required query subject.
2. Click Actions, Specify Data Security.
3. To add new users, groups, or roles, do the following:
• Click Add Groups.
Everyone Group1
Authors Group2
NTLM Group2
When you add a filter to the query subject, the filter uses a macro to look up a list of values, for example:
Security_column in (#CSVIdentityName(%Roles_Groups)#)
For users in the Everyone, Authors, and System Administrators roles, testing shows this as:
Security_column in ('Group1','Group2','Group3')
Security_column in (#CSVIdentityNameList()#)
Security_column in ('Everyone','Authors','System
Administrators')
Object security
Metadata security can be applied directly to objects in a project.
If you do not set object-based security, all objects in your project are visible to everyone who has access
to the package. Users, groups, or roles that do not have allow or deny settings for an object are considered
to be undefined. The object then inherits the security that was defined for its parent object. When you
explicitly allow or deny access to an object, you override the inherited settings. The parent and child
objects then have different settings. When you apply security to a parent object, all its child objects in the
model will also have security applied to them. After you set security for one object, you must set it for all
objects. You can do this by setting security on the root namespace.
You may want an object to be visible to only selected users, groups, or roles. For example, in your project,
you may have a Salary query subject. You can make the Salary query subject visible to the Managers
group, and keep it hidden from everyone else.
If a user is a member of multiple user groups and an object is visible to one user group and denied to
the other, the user will not have access to the object. For example, Jane belongs to two user groups:
Sales and Marketing. The Sales group has access to the Products and Sales query subjects, and is denied
access to the Sales Forecast query subject. The Marketing group has access to Products, Sales, and Sales
Forecast query subjects. Jane does not have access to Sales Forecast.
When you secure an object, a package is automatically created in IBM Cognos Framework Manager. The
package name consists of an underscore (_) and the name of the secured object. These object-based
packages are visible in the Explorer. You can use this package to see which objects in the project are
included, hidden, or excluded from a specific user group.
Every time you include that object in a package, and publish it for your users, the same security rules
apply for that object. When you publish a package that contains secured objects, the visible objects
for users are the intersection of the package definition and the object security settings. If object-based
security is not used, security applied to a package remains unchanged.
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 are able to see the
shortcut in the published package.
If a model query subject, calculation, or filter references a secured object, the object's security is not
passed to the model query subject, calculation, or filter.
When you create a package containing the shortcut, the secured object does not need to be included in
the package.
For example, only sales managers are allowed to see the Sales Target query subject. You create a shortcut
to Sales Target. When you package the model, you include the shortcut but not the Sales Target query
subject. Sales managers are the only ones able to see the shortcut in the published package.
Procedure
1. Click the object you want to secure, and from the Actions menu, click Specify Object Security.
Tip: You can select more than one object at a time.
2. Select the users, groups, or roles you want to change. Or, click Add to add new users, groups, or roles.
For more information, see the Administration and Security Guide.
3. Specify security rights for each user, group, or role by doing one of the following:
• To deny access to a user, group, or role, select the Deny check box next to the name for the user,
group, or role. Deny takes precedence over Allow.
• To grant access to a user, group, or role, select the Allow check box.
Tip: To allow everyone to see all objects unless specifically denied access, select the Allow check box
for the Everyone role.
4. Click OK.
A list of new and updated object-based packages displays.
Procedure
1. Click the required object.
2. Click Actions , Specify Object Security.
3. Remove security rights by clearing both the Allow and Deny check boxes for all users, groups, or roles.
4. Click OK.
A list of packages that are affected by these changes displays.
Procedure
1. Log on to the IBM Cognos Analytics portal.
2. In Team content, find the package for which you want to change security settings.
3. From the package context menu, click Properties.
4. On the Permissions tab, select the Override parent permissions check box.
5. Add or remove users, groups, or roles, and specify the type of access for them.
For more information about access permissions, see the IBM Cognos Analytics Administration and
Security Guide or the IBM Cognos Analytics Getting Started Guide.
6. On the General tab, in the Advanced section, you can specify more settings, such as hide or disable
the package.
7. After you finish modifying the settings, click OK.
Specifying languages
You can specify which languages are published with each package. You can create several packages
based on the same model, each using a different language.
For example, the package for the Mexican sales office includes Spanish and English. The package for the
Canadian sales office includes French and English.
You can also specify the languages for all packages at one time.
You must add languages to the project “Multilingual metadata” on page 98 before you can specify the
languages that your users require in packages.
Procedure
1. In the Project Viewer, click the package that you want to modify.
2. In the Properties tab, find the Language property, and click Click to edit.
3. Click a language (or Ctrl+click multiple languages) in the Available Project Languages box, and use
the arrow icon to move it to the Selected Languages box.
Procedure
1. In the Project Viewer, click the package that you want to modify.
2. On the Properties tab, find the suppression property, and select one of the following values.
• Allow Null Suppression - When true, this property makes suppression available to IBM Cognos
studio users. When false, suppression is not available in the published package.
• Allow Multi-Edge Suppression -When true, users can select multi-edge or single edge suppression
options. When false, users will only have access to single edge suppression. The Allow Null
Suppression property must also be true.
• Allow Access to Suppression Options - When true, users can choose the types of values that will
be suppressed, such as zero or missing values. By default, all the types of values are suppressed.
The Allow Null Suppression property must also be true.
Shortcuts
If a shortcut is included in a package and it points to a query subject that has been externalized, the
shortcut will also be externalized. The name of the data file is the name of the query subject to which
the shortcut points. If more than one shortcut points to the same query subject, then the query subject is
externalized each time the shortcut is encountered.
Query processing
Some queries cause more than one query to be issued, or local processing to be performed to retrieve
data, or both. To prevent this, ensure that the Query Processing property for all data source objects
in the model is set to Database Only. For more information about query processing, see “Improving
performance by setting the query processing type” on page 254.
Publishing packages
In IBM Cognos Framework Manager, you can publish a package to any folder in Content Manager so your
users can access it.
You can also publish a package to a network location. A package on a network location cannot be used by
your users. Publishing to a network location is useful for backing up a package. When you publish to a LAN
location, be careful that you do not over-write any existing files, particularly Framework Manager models
and the model that is currently open.
Procedure
1. Select the package that you want to publish.
2. From the Actions menu, click Package, Publish Packages.
3. Choose where to publish the package:
• To publish the package to the report server, click IBM Cognos Content Store, open, and select an
existing folder or create a new folder in the Content Store.
• To publish the package to a network location, click Location on the network. Ensure that you select
a different location than the directory where the project files are stored. In general, avoid saving to
the same location as a model as the model could be overwritten.
4. To enable model versioning when publishing to the IBM Cognos Content Store, select the Enable
model versioning check box, and type the number of model versions of the package to retain.
Tip: To delete all but the most recently published version on the server, select the Delete all
previous model versions check box.
5. Click Next.
6. In the Add Security window, define security for the package (optional):
Goal Actions
Create, add, or remove a user, group, or role. On the User Access tab, click Add.
In the Select Users and Groups window, define
user security. For information about how to
use the Select Users and Groups window, see
the Administration and Security Guide. Users,
groups, or roles defined in the user Access
Tab have Read, Write, Execute, and Traverse
permissions.
Grant administrative access to a user, group, or On the Administrator Access tab, click Add.
role.
In the Select Users and Groups window, define
administrator security. For information about
how to use the Select Users and Groups
window, see the Administration and Security
Guide. Users, groups, or roles defined in the
Administrator Access Tab have Read, Write, Set
Policy, and Traverse permissions.
Note: The Add Security window in the Publish Wizard is only available the first time you publish
a package. If you re-publish the package to the same location, you cannot override the existing
security. To change security for published packages, see “Modifying package security” on page 214.
7. Click Next.
8. If you want to externalize query subjects, select the Generate the files for externalized query
subjects check box.
9. By default, the package is verified before it is published. If you do not want to verify your model prior
to publishing, clear the Verify the package before publishing check box.
10. If the package contains data sources supported by dynamic query mode, you have the option to
enable dynamic query mode for the package. Select the Use Dynamic Query Mode check box. You
will be asked to confirm this selection when you click Publish. This step applies when the Query
Mode property of the project is set to Compatible.
Note: If a package containing both supported and unsupported data sources is published with
dynamic query mode, users will get an error when opening the package in the Studios.
For information on data sources supported by dynamic query mode, see the IBM Cognos
Administration and Security Guide.
11. Click Publish.
If you chose to externalize query subjects, Framework Manager lists which files were created.
12. Click Finish.
Procedure
1. In the Welcome page, click Create a new project.
Tip: If you are already in Framework Manager, click File, New Project.
2. In the New Project page, specify a name and location for the project, and click OK.
You may be prompted to provide authentication information.
3. In the Select Language page, click the design language for the project.
The language that you select cannot be changed after you click OK, but you can add other languages.
For more information, see “Adding a language to a project” on page 101.
4. In the Metadata Wizard dialog box, click Data source, Next.
5. Select your data source from the list of available data source connections, and click Next.
If the data source connection is not available in the list, you can click New to create the data source
connection.
6. Specify a name for the package, and click Next.
Optionally, you can specify a description and screen tip for the package.
7. Specify who has access to the package.
You can add users, groups, or roles. For more information, see “Users, groups, and roles” on page 209.
8. Click Finish to import the metadata and create the package.
9. When prompted, click Yes to publish the package, or click No to return to the Project Viewer.
Results
The namespace displays in the Project Viewer. You cannot see objects in the native metadata model
from within Framework Manager. The native metadata objects are visible from within the IBM Cognos
studios when the native metadata package is used.
Procedure
1. In the Project Viewer, right-click the model that you want to use, and click Run Metadata Wizard.
2. In the Metadata Wizard dialog box, click Data Sources, Next.
3. Select your data source from the list of available data source connections, and click Next.
If the data source connection is not available in the list, you can click New to create the data source
connection.
4. Specify a name for the package, and click Next.
Optionally, you can specify a description and screen tip for the package.
5. Specify access permissions for the package.
You can add users, groups, or roles to the package. For more information, see “Users, groups, and
roles” on page 209.
6. Click Finish to import the metadata and create the package.
7. When prompted, click Yes to publish the package, or click No to return to the Project Viewer.
Procedure
1. Run the script excluding any steps that publish the package.
2. Verify the model or analyze the impact of publishing the package.
3. Publish the package.
Procedure
Do one of the following:
• Move one report to the latest version of the model by editing and saving the report.
• Before republishing the model, move all reports to the latest version of the model by selecting the
Delete all previous model versions check box in the Publish wizard.
• Before republishing the model, disable model versioning by setting the model version limit to 1.
Exploring packages
When you have a large number of projects and object-based security in a project, it can be difficult to keep
everything organized. You can explore packages to see the packages and roles in a project.
On the Package Contents tab, you see a list of all the packages (normal and object-based) in a project, as
well as the objects that were selected, unselected, or hidden for each package.
On the Object Security tab, you see a list of all the users, groups, and roles in a project, and in which
package the object-based security is applied. You can also see whether the objects in the project are
hidden or visible to that specific user, group, or role.
Procedure
1. Select the Packages folder.
2. From the Actions menu, click Package, Explore Packages.
3. Choose what you want to do.
Goal Action
Edit the package Click the Package Contents tab, select the
package and click Edit.
For more information, see “Creating or modifying
packages” on page 207.
View the security for each package Click the Object Security tab and select a
package.
4. Click Close.
Viewing the distribution of objects in packages
When you view the package inclusion of an object, you see, by package, where that object exists and
whether it is selected, unselected, or hidden in that package.
If the object is secured, you will also see the object-based package in which the object exists.
Procedure
1. Click the object that you want to see, and click Actions, Edit Package Inclusion.
2. To edit the package, click Edit Package.
For more information, see “Creating or modifying packages” on page 207.
3. Click OK.
Procedure
1. Click the object that you want to document.
Tip: Click the top-level namespace to document the entire model.
2. Click Tools, Model Report.
The model report displays.
You can save, print, or change the format of the report.
Multiuser modeling
You can implement multiuser modeling in IBM Cognos Framework Manager by branching and merging or
by segmenting and linking.
• Branching and merging
If you use branching and merging to manage a multiuser project, each user can modify the same objects
in a project at the same time. Each user has a copy of the entire project and can work on any part of it.
When the branches are merged back into the root project, all conflicts between the root project and the
branches are resolved. For more information, see “Branching and merging projects” on page 223.
• Segmenting and linking
If you use segmenting and linking to manage a multiuser project, each user can look at the same parts
of a project at the same time. However, you must ensure that each user modifies discrete parts of
the project. Use links to allow different users to refer to a project at the same time as another user is
working on it. For more information, see “Segmented and linked projects” on page 228.
FA 1 metadata
FA 2 metadata
FA 1 FA 2
branch branch
common common
FA 1 metadata FA 2 metadata
Modeler enhances this branch by importing Modeler enhances this branch by importing
data sources, adding calculations, and creating data sources, adding calculations, and
and publishing packages specific to functional creating and publishing packages specific
area 1. to functional area 2.
FA 2
metadata
FA 1
metadata
FA 1 FA 2
branch branch
FA 1 FA 2
metadata metadata
Branch contains the complete metadata Branch contains the complete metadata
for functional area 1 for functional area 2
Distribution by layers
In distribution by layers, the metadata is organized in layers. Each layer requires access to the metadata
of the layer above it. For example, a model contains three layers. The top layer is the root project,
consisting of a fully modeled physical layer. The root project is branched to create the second layer,
the intermediate branch. The intermediate branch contains a fully modeled development layer. The
intermediate branch is branched to create the third layer, the presentation branch. The presentation
branch contains a fully modeled business layer where reporting packages are defined and published.
branch
Development Layer Branching is done after the development
layer has been completely modeled.
A modeler enhances the presentation
branch, and creates and
publishes business packages.
Presentation branch
Presentation Layer
Creating branches
You can create a branch in a project.
he log file associated with the new branch will be empty. When you create a branch for a read-only
project, the resulting branch is writable.
Procedure
1. Open the project from which you want to branch.
2. Click Project, Branch to.
3. In Project name box, type a name for the project.
4. In the Location box, type the path to the folder where you want to store the branched version.
Procedure
1. Open the project into which you want to merge a branch.
2. Click Project, Merge from.
3. In the Select Project to Merge From dialog box, click Files of Type, All Files (*.*).
4. Locate the log.xml file for the branch to be merged, and click Open.
The Perform the Merge window opens, showing a list of transactions. The transactions that you
selected are run.
Framework Manager requires only the log.xml and the IdLog.xml files, not the entire set of project files
to populate the transaction history list. If you do open the .cpf file directly when prompted, Framework
Manager locates and opens the log.xml file. The advantage of directly opening the log.xml file is to
reduce the number of large files that may need to be distributed in a multiuser environment.
5. Choose how to run the transactions:
• To run the entire transaction list continuously from start to finish, click Run.
• To run one transaction and then pause, click Step.
When a transaction is completed, a check mark or an "X" displays beside it. A check mark indicates
that the transaction was applied successfully to the model you are merging into. An "X" means that the
transaction failed. Detailed information for each transaction is listed under Transaction Details. If a
transaction fails, the merge process pauses.
6. Choose one of the following:
Goal Action
Skip the current transaction and run the one after Click Skip.
it
Run the current transaction and pause Click Step.
Run the transaction list from the current Click Continue.
transaction to the end
Accept transactions run to this point and return to Click Accept.
the project page
Cancel all transactions run to this point and Click Revert.
return to the project page
7. Perform the previous step until you reach the end of the transaction list or you have accepted or
reverted the changes.
If you accepted the changes, they display in the Project Viewer. If you reverted the changes, none of
the changes display.
8. If you accepted the changes, save the merged project in the project page. If you decide not to save the
changes, close the project without saving it.
Note: If you accept the changes in the Perform the Merge window but do not save the project you
can never perform the same merge again. After you accept transactions they are removed from the
transaction list.
Case 1
An object used in the branch project is not in the root project. In the Merge dialog box, you see the
Replace box indicating the name of the object that is missing from the root project.
To resolve this problem, you can select an alternative object from the root project in the following way:
• From the Project Viewer or Diagram, select the name of the object to use in place of the missing object.
In the Merge dialog box, the object displays in the Replacement Field.
• Click Replace.
The transaction runs again, substituting your replacement object for the missing object.
For more complex problems, you may be prompted to select the object that cannot be found in the root
project from the Object Naming Conflict Resolution dialog box. If a warning displays, you are unable to
resolve the problem using this dialog box. Instead, you can modify the root project or skip the transaction.
Case 2
For all failed transactions, you can resolve the problem by modifying the root project. First, modify the
model as required, and then, from the Perform the Merge dialog box, click Continue to run the entire
transaction list starting from the failed transaction.
Case 3
You are unable to fix the transaction. To resolve this problem, do the following:
• Click Skip to skip the next transaction.
• Clear the check box for the failed transaction.
Segmenting projects
Understanding project segmentation is critical to ensure stability and minimize complexity in a multiuser
modeling environment. If you intend to segment your project, do the following:
• Model the physical layer as completely as possible by:
– Ensuring that the namespace in the main project and any links in the project to folders have the same
identifier. See “Importing objects with the same name” on page 43.
For example, you have a main project and a link in the project to a folder. The folder you link to
must exist in a namespace that has the same name as the main project. If the identifier in the main
project and that of the linked folder are not the same, any relationships, shortcuts, or expressions
that reference objects in the link, from the main project, may not work.
– Ensuring all objects in a project have unique identifiers
For example, you have a main project that contains a query subject named NewQS, and a segment in
the project. You open the segment, add a new query subject named NewQS, and save the segment.
When you open the main project, an error occurs because a query subject named NewQS already
exists in the main project.
– Updating references in both the main project and segments in the project
Creating segments
With segments, you can organize a project according to business rules and organizational requirements,
and share and reuse project information.
You create segments at the folder level or the namespace level. You can create a new project in a new
folder, complete with its own associated project files.
When a new segment is created, existing parameter maps from the main project are copied to the new
segment. After the segment is created, parameter maps are unique to each segment and cannot be
shared between segments. For example, if you are working in the main project, you can use a parameter
Procedure
1. Click the folder or namespace that you want to divide.
2. Click Project, Create Segment.
You can accept the default settings for the project name.
3. To rename the segment, in the Project Name box, type a different name.
This does not change the folder name. If you want to rename the folder, you should rename it in
Project Viewer before creating the segment.
For ease of use, keep the same name for both the folder and the segment.
4. Click OK.
The Project Viewer is refreshed and the icons representing the segmented folder or the segmented
namespace are shown.
Creating links
You create links to help organize work across large projects, to maintain consistency, and to reuse
information.
For example, the project named Inventory contains the folder named Products. You can create a link from
the Sales Products to Inventory Products. If any changes or additions are made to the Inventory Products
folder, you will see them in the Sales Products folder.
If you plan to link model segments, ensure that you follow the steps for model segmentation. For more
information, see “Segmenting projects” on page 228.
A linked project is shared by other projects. It should not be created in a sub-directory within the master
project directory.
Procedure
1. In the Project Viewer, click the project, segment, namespace, or folder that you want to link to.
Tip: You can create links only to folders, namespaces, projects, or segments.
2. Click Project, Link Segment.
3. Locate and click the .cpf file of the project that contains the object that you want to link to.
4. Click Open.
• If the project you selected requires upgrading, you are prompted. For more information, see Chapter
11, “Upgrading models,” on page 309.
Procedure
1. Create a share that will host the project that is to be protected.
2. Give read-only access to that share for any developer leveraging the project.
Segmenting projects
You can create a segment for a project that is stored in an external repository. The segments are project
directories that are stored under the main project directory. Maintain the same hierarchy in the repository
as in the project directory.
The segments can be opened individually as stand-alone projects.
A segment can also be opened as part of the main project. In this situation, you must check out the
project for each segment that you want to modify.
Copying projects
When you copy a project, you create a replica of that project in another location. All files in the project
folder, including sub-folders, are copied to the new location. When you make changes to the project in one
folder, these changes are not reflected in copies of the project in other folders.
Copying a segmented model copies all segments as well as the main project.
There may be times when you cannot copy a project and must use Save As instead. Saving the project
with a new name creates a new project folder while saving the project with the existing name overwrites
the current project. This is useful if you want to save changes made to a read-only project or if you want to
save a project with a different name or to a new location without overwriting the original project.
You cannot create a copy of a project in the same folder as the original. If you copy a project under an
existing project folder, Framework Manager treats it like a project segment. For more information, see
“Segmented and linked projects” on page 228.
If a project or segment is open when you copy it, the last saved version is copied.
Procedure
1. Click File, Manage Projects, Copy.
2. In the From box, click the browse button and select the .cpf file for the project that you want to copy.
Note: The project folder name is shown in the text box.
3. In the To box, type the project name.
By default, the project name and the directory where the project is saved are the same.
4. In the Location box, type the new location or click the browse button and select the new project
location.
Moving projects
You may decide to move a project if your folder becomes so full that it is difficult to locate particular
projects. When you move a project, you are actually copying it to a new folder and deleting it from the
current folder. All files in the project folder, including sub-folders, are moved to the new location.
Moving a segmented model moves all segments as well as the main project.
Before you can move a project, the project must be closed in Framework Manager.
Procedure
1. Click File, Manage Projects, Move.
2. In the From box, click the browse button and select the .cpf file for the project you want to move.
Note: The project folder name is shown in the text box.
3. In the To box, type the new location or click the browse button and select the new project location.
4. Click OK.
Renaming projects
When you rename a project, you provide a new name for the .cpf file. You are not changing the location of
the project. Secondary project files and log files keep their original name.
If a project displays in the recent projects list on the Framework Manager Welcome page and you proceed
to rename it, you cannot open the project by clicking the link. You must open the project using the Open
command from the File menu.
Before you can rename a project, the project must be closed in Framework Manager.
Procedure
1. Click File, Manage Projects, Rename.
2. In the From box, click the browse button and select the .cpf file for the project you want to rename.
Note: The project folder name is shown in the text box.
3. In the To box, type the new name for the project and click OK.
If the original project folder and .cpf file have the same name, both the folder and .cpf file are
renamed.
Deleting projects
When you delete a project, the project folder and all its contents, including any user files, are deleted from
the file system and sent to the recycle bin.
If your project is segmented and you delete the main project, the segments are deleted as well. Deleting a
project segment deletes only the segment and not the model it is based on.
As a general rule, delete segments from within the model. If you delete the segment using Delete from
the File menu, it displays as if the segment still exists within the model. For more information, see
“Segmented and linked projects” on page 228.
Before you delete a project, ensure that the project and all its segments are closed. Framework Manager
does not support a file locking mechanism so it is possible under certain circumstances to delete a project
with open segments. If you delete a project with open segments, the segments can no longer be saved.
Procedure
1. Click File, Manage, Projects, Delete.
Procedure
1. In the Project Viewer, click a package that has been published.
2. Click Actions,Package, Analyze Publish Impact.
3. Choose what you want to do:
Goal Action
View the dependencies for an object See “Showing object dependencies” on page
235.
See the details for an object Click the row that contains the object.
The details for the object display under Change
Details for.
Find an object in the Project Viewer In the row that contains the object, under
Actions, click Find in Project View.
Sort the results Click Sort at the top of a column.
Display modeler's comments, last changed by, Click the double down arrow.
and last date changed
4. Click Close.
Procedure
1. From the Analyze Publish Impact dialog box, do one of the following:
• Select each object for which you want to determine the report dependencies by selecting individual
check boxes.
• Select all objects by selecting the check box at the top of the check box column.
2. Click Find Report Dependencies.
3. Specify the scope of the search:
Goal Action
Procedure
1. In the Project Viewer, click an object.
2. Click Tools, Show Object Dependencies.
The objects that depend on the selected object display under Dependent objects.
3. To show the object identifier for the dependent objects, select the Show Object ID check box.
4. If the object has children and you want to see the dependencies for a child object, click the plus sign
(+) beside the object that contains the child object.
5. Click a child object under the parent object.
The objects that depend on the child object display under Dependent objects.
6. Optional: You can also show object dependencies in the following way:
• In the Project Viewer, right-click an object and select Show Object Dependencies.
• In the Context Explorer window, right-click an object and select Show Object Dependencies.
• In the Analyze Publish Impact window, click the Show Dependencies icon under Actions in the
row that contains the object.
Procedure
1. In the Project Viewer, right-click an object and select Remap To New Source.
2. If you want to change the matching criteria, click Options and do the following:
• Choose the matching criteria for the object you are using to remap, and for the original object that
you are remapping.
You can match objects by name or by object reference.
• The default criteria options are By Name for the object you are using to remap, and By Object
References for the original object that you are remapping.
• Click OK.
• To use the criteria you specified, select the Use matching criteria options check box.
If the matching criteria is By Name to By Name, spaces within the string are removed.
If there is no object reference, the object name is used.
3. Do one or more of the following:
Goal Action
Remap an individual object manually Under Available Model Objects, drag an object to
the object that you want to remap under Query
Items, Measures, Calculations, and Filters.
The new value for the object displays under
Remap To.
Remap multiple objects automatically Under Available Model Objects, drag a query
subject to any row under Query Items,
Measures, Calculations, and Filters.
All of the objects that meet the matching criteria
are remapped and their values display under
Remap To.
Clear the remap value and the original value for Click the row that contains the object, and click
the selected object Clear.
Clear the remap value for all objects Click Clear All.
4. Click OK when you are finished remapping.
Project reuse
You may have to use the same model and reports with different sets of actual data. The data sets may be
different databases, accounts, or schemas in a single database.
You may encounter multiple data sets in the following situations:
• When you use a different data set than the one used in production.
• In large enterprises, where each division has it own data set.
• In OEM applications that have no direct control over customer data.
The tables and columns used by the project must be logically the same across all data sets. You must also
ensure that the correct data set is identified in each case.
Data sources in IBM Cognos Framework Manager contain information that identifies the location of any
data source tables needed for the query subjects. This information is the name of the data source in the
content store, as well as the optional catalog and schema names. Ensure that the catalog and schema
names use the desired data set.
If different content stores are in use, and a different version of the project is deployed to each content
store, you can specify the data source information in the project for each site. If you have only one
content store, you can publish each project as a separate package. These solutions require a lot of manual
maintenance. To reduce this level of maintenance, you can use one of the following options.
Procedure
1. Create a single session parameter whose value identifies whether you are in design mode. When
you are in design mode, set the value of this session parameter to a specific value, such as design.
Otherwise, leave the value empty.
Tip: If you use a project or override value, you must set it each time you open the model for editing.
2. For each catalog and schema in each project data source, create a parameter map that contains
• An empty default value.
• A key whose name is the design value of the session parameter above, and whose value is the name
of the design mode catalog or schema for that data source.
3. Select the data source, and replace the catalog and schema property values with a macro that uses the
corresponding parameter map and session parameter.
For example, use
#$DBSchemaName ($DeployOrDesign) #
Model portability
You can use a IBM Cognos Framework Manager model to access data from different database instances.
The database instances can be from the same or different vendors.
There are several things to consider when moving a Framework Manager model from one relational
database to another. Unlike changing from one identical database to another on the same platform, it may
not be sufficient to change the data source connection information.
Review the generation of determinants and relationships based on indexes and do not assume that the
indexes reliably describe functional dependencies or relationships for reporting.
Scalar functions are imported into a model prefixed by a catalog or schema qualification in the SQL
statement. As with tables and views, you may have to remove or alter the location qualification when
switching vendors. For example, if you create a model against an ORACLE database, and the connection
is changed to point to an equivalent SQL Server database, an error results because the model data source
type has remained OR instead of changing to the appropriate data source type.
To move a model from one relational database to another, do the following:
• Evaluate the DDL (Data Definition Language) to determine portability for physical names by
– Constraining physical names to a lowest common denominator, such as 31 characters.
– Avoiding using reserved key words in the ANSI standard and vendor documentation.
– Avoiding using vendor specific data fields.
Procedure
1. Click Project, View Transaction History.
Tip: To make the dialog box larger, double-click the caption. Double-click again to restore the dialog
box to its original size.
Procedure
1. Click Project, Run Script.
2. Select the script you want, and click Open.
3. If you want to view the details of a transaction, click the transaction.
4. Set the starting or stop point that you want.
• To set the starting point for running the script, select the script and then click Set the starting point.
You can do this at any time to skip an instruction or run instructions that have already been executed
• To set a stop point for the script, select the script and then click Set the stop point .
You can stop the script to make a manual fix and then start it again.
Tip: To remove the stop point, click Remove the stop point
5. Using the toolbar buttons, choose the run action that you want.
Button Description
Skips to the next transaction and runs the script to the end
Skips to the next transaction and stops, but does not run any
transactions
Syntax
At the command prompt, ensure you navigate to the installation location of the BmtScriptPlayer.exe.
Use the following syntax to run the Script Player:
where <projectname> is the name of the project and <actionlogname> is the name of the action log.
For example,
Options
You can specify how the Script Player runs using the following options.
If you are working in a UNIX environment, you may want to create a script to hide credentials that are
passed on the command line.
-a FILEPATH
Apply the specified action log.
FILEPATH is the path, including the file name, to the action log file.
-b NUM
Execute transactions with sequence number equal to or higher than the number specified by NUM.
The default is the first transaction.
-c FILEPATH
Create a new project.
FILEPATH is the path, including the file name, to the models project (.cpf) file.
Using this option without specifying an action log results in the creation of an empty model.
If the model specified in the FILEPATH already exists, it is silently replaced.
Examples
This table shows some examples of Script Player commands.
Skip transactions that include this object Click Exclude and in the Exclude Transactions
that Use this Object dialog box, select the level
of exclusion that you want.
The current transaction and all subsequent ones
that reference the excluded object are ignored.
For example, if a transaction attempts to create
a package that uses the excluded object, the
package is not created.
Note: You must fix errors before skipping
transactions.
Replace this and all following occurrences of the Click Replace and in the Replace Missing Objects
object dialog box, select the option that you want.
Fix the problem manually Click Stop and then fix the problem in the
temporary project.
Retargeting an object
If a transaction refers to an object that no longer exists, the script stops and a dialog box displays with
the name of the problematic object. You can retarget the object by clicking Replace and selecting a new
object.
If a missing object displays in an expression, the script stops and a dialog box displays with the name of
the problematic object. You must fix the problem manually by opening the expression that contains the
missing object.
Procedure
1. Click Project, View Transaction History.
2. Locate the entry in a log file for the transaction that occurred after the last transaction you want to
archive.
All transactions in the current log file prior to the selected transaction will be archived.
3. Click Archive Log File.
Segmented models
A segmented model should be synchronized only by synchronizing the main project. The results of
synchronizing the entire project are written to the log file of the main project. The ability to synchronize
individual segments is lost after the first synchronization of the main project.
If you are working in the main project and change a segment, the main log file is updated. If you are
working in the segment and make changes, the segment log file is updated.
Synchronization commands do not necessarily run in the order they display in the log files. This happens
because it is possible to update segments concurrently and the action logs are replayed based on the
time of the original action. Commands may display to jump between log files, making it difficult to use
debugging features such as single stepping.
Log files are contained in the project that is open and not in the model that is updated.
If you open a main project and make changes to a linked model, the actions are logged in the log file of
the main project. If you then synchronize the linked model, the change is lost because it did not display in
the set of log files that were used in the synchronization.
Synchronization can be run only on the main project or a stand-alone segment. You cannot synchronize
linked projects or segments in the main project. If the segments are updated by the linked project, the
synchronization can produce unpredictable results in the main project.
Do not use model synchronization in combination with linked projects.
Steps to synchronize
Procedure
1. Click Project, Synchronize.
2. You can create a backup of your Framework Manager project by selecting the Backup project into this
directory check box.
3. If you want to view the details of a transaction, click the transaction.
4. Set the starting or stop point that you want.
• To set the starting point for running the script, select the script and then click Set the starting point.
You can do this at any time to skip an instruction or run instructions that have already been executed
• To set a stop point for the script, select the script and then click Set the stop point .
You can stop the script to make a manual fix and then start it again.
Tip: To remove the stop point, click Remove the stop point
5. Using the toolbar buttons, choose the run action that you want.
Button Description
Skips to the next transaction and runs the script to the end
Skips to the next transaction and stops, but does not run any
transactions
Query behavior
By monitoring and adjusting the behavior of queries in your IBM Cognos Framework Manager project, you
can improve the performance of your model.
You can do any of the following steps:
Procedure
1. Set governors to reduce system resource requirements and improve performance by ensuring that the
metadata in a package contains the appropriate limits. For example, you can set limits on the amount
of data retrieved or the time that a query can take. For more information, see “Governors” on page
247.
2. Specify whether aggregate rollups are computed locally or in the database. For relational metadata,
you can improve performance by selecting the right type of query processing. After initial report
execution, by turning the query reuse feature on, you can create reports without querying the database
again. For more information, see “Specifying where aggregate rollups are processed” on page 254.
3. Improve performance by setting the query processing type to determine whether SQL processing
is performed by the database server or processed locally. For more information, see “Improving
performance by setting the query processing type” on page 254.
4. Specify the transaction mode for a query subject with a stored procedure so the query subject can be
used in all the studios. For more information, see “Specify transaction modes” on page 256.
5. Improve performance by reusing cached data when running a report. By reusing cached data, you
can create a report without querying the database again. For more information, see “Improving
performance by reusing cached data when running a report” on page 255.
6. Select the vendor-specific function sets for the data sources that are defined in the project. For more
information, see “Selecting function sets” on page 256.
7. Indicate the behavior of individual functions that are based on the data sources in the project. For
more information, see “Quality of service” on page 257.
8. Control and optimize how queries are run by modifying the properties of a data source that was
created using the Metadata Wizard in IBM Cognos Framework Manager. For more information, see
“Controlling and optimizing queries” on page 259.
Governors
Use governors to reduce system resource requirements and improve performance. You set governors
before you create packages to ensure the metadata in the package contains the specified limits. All
packages that are subsequently published use the new settings.
The governor settings that take precedence are the ones that apply to the model that is currently open
(whether it is a parent model or a child model).
In a new project the governors do not have values defined in the model. You must open the Governors
window and change the settings if necessary. When you save the values in the Governors window by
clicking OK, the values for the governors are set. You can also set governors in Reporting. The governor
settings in Reporting override the governor settings in the model.
For information about the governors specific to dynamic query mode (DQM), see “Dynamic query mode
governors” on page 265.
You can control the number of tables that a user can retrieve in a query or report. When a table is
retrieved, it is counted each time it displays in the query or report. The limit is not the number of unique
tables. If the query or report exceeds the limit set for the number of tables, an error message displays and
the query or report is shown with no data.
A setting of zero (0) means no limit is set.
Note: This governor is not used in dynamic query mode.
You can set data retrieval limits by controlling the number of rows that are returned in a query or report.
Rows are counted as they are retrieved.
When you run a report and the data retrieval limit is exceeded, an error message displays and the query or
report is shown with no data.
You can also use this governor to set limits to the data retrieved in a query subject test or the report
design mode.
A setting of zero (0) means no limit is set.
If you externalize a query subject, this setting is ignored when you publish the model. For more
information, see“Externalized query subjects and dimensions” on page 215.
You can limit the time that a query can take. An error message displays when the preset number of
seconds is reached.
A setting of zero (0) means no limit is set.
Note: This governor is not used in dynamic query mode.
You can control the character length of BLOBs (binary large objects) that a user can retrieve in a query or
report. When the character length of the BLOB exceeds the set limit, an error message displays, and the
query or report is shown with no data.
A setting of zero (0) means no limit is set.
Outer Joins
You can control whether outer joins can be used in your query or report. An outer join retrieves all rows
in one table, even if there is no matching row in another table. This type of join can produce very large,
resource-intensive queries and reports.
Governors are set to deny outer joins by default. For example, outer joins are not automatically generated
when you test a query item in Framework Manager.
SQL is generated automatically when you
• Run a report.
• Test a query item or relationship in Framework Manager.
• Create a new model query subject based on other objects.
Cross-Product Joins
You can control whether cross-product joins can be used in your query or report. A cross-product join
retrieves data from tables without joins. This type of join can take a long time to retrieve data.
The default value for this governor is Deny. Select Allow to allow cross-product joins.
Shortcut Processing
You can control how shortcuts are processed by IBM Cognos software.
When you open a model from a previous release, the Shortcut Processing governor is set to Automatic.
Automatic is a shortcut that exists in the same folder as its target and behaves as an alias, or
independent instance. However, a shortcut existing elsewhere in the model behaves as a reference to
the original. When you create a new model, the Shortcut Processing governor is always set to Explicit.
If you set the governor to Explicit, the shortcut behavior is taken from the Treat As property. If the
Shortcut Processing governor is set to Automatic, verify the model and, when repairing, change the
governor to Explicit. This changes all shortcuts to the correct value from the Treat As property based on
the rules followed by the Automatic setting.
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 regardless of the setting of the Treat As property is.
You can control how SQL is generated for inner joins in a model by selecting one of the following settings:
• If the governor is set to Server determined, the CQEConfig.xml file is used to determine the
governor value. If there is no active CQEConfig.xml file or no parameter entry for the governor in the
CQEConfig.xml file, then the Implicit setting is used.
• The Implicit setting uses the where clause.
For example,
• The Explicit setting uses the from clause with the keywords inner join in an on predicate.
SELECT
publishers.name, publishers.id,
books.title FROM publishers INNER JOIN books ON publishers.id
= books.publisher_id ORDER BY publishers.name, books.title;
You can set the join type on the query property in Reporting to override the value of this governor.
Regardless of the setting you use for this governor, the Explicit setting is used for left outer joins, right
outer joins, and full outer joins.
This governor has no impact on typed-in SQL.
If the governor is set to Server determined, the CQEConfig.xml file is used to determine the governor
value. If there is no active CQEConfig.xml file or no parameter entry for the governor in the CQEConfig.xml
file, then the Disabled setting is used.
The Disabled setting prevents aggregation of the measure for the attributes. This is the default behavior.
For example,
The Enabled setting allows aggregation of the measure for the attributes. Note: This is the default
behavior for IBM Cognos Framework Manager versions prior to 8.3.
You can control the use of the minimum aggregate in SQL generated for attributes of a level (member
caption).
If the governor is set to Server determined, the CQEConfig.xml file is used to determine the governor
value. If there is no active CQEConfig.xml file or no parameter entry for the governor in the CQEConfig.xml
file, then the Minimum setting is used.
The Minimum setting generates the minimum aggregate for the attribute. This setting ensures data
integrity if there is a possibility of duplicate records. For example,
select XMIN(Product.Product_line
for Product.Product_line_code) as Product_line, //level attribute
Product.Product_line_code as Product_line_code
from
(...) Product
The Group By setting adds the attributes of the level in the group by clause with no aggregation for the
attribute. The distinct clause indicates a group by on all items in the projection list. The Group By
select distinct
Product.Product_line as Product_line,//level attribute
,Product.Product_line_code
as Product_line_code
from(...) Product
You can control the use of the minimum aggregate in SQL generated for attributes of a determinant with
the group by property enabled.
If the governor is set to Server determined, the CQEConfig.xml file is used to determine the governor
value. If there is no active CQEConfig.xml file or no parameter entry for the governor in the CQEConfig.xml
file, then the Minimum setting is used.
The Minimum setting generates the minimum aggregate for the attribute. This setting ensures data
integrity if there is a possibility of duplicate records. For example,
select PRODUCT_LINE.PRODUCT_LINE_CODE
as Product_line_code,
XMIN(PRODUCT_LINE.PRODUCT_LINE_EN
for PRODUCT_LINE.PRODUCT_LINE_CODE)
as Product_line //attribute
from
great_outdoors_sales..GOSALES.PRODUCT_LINE PRODUCT_LINE
group by
PRODUCT_LINE.PRODUCT_LINE_CODE //key
The Group By setting adds the attributes of the determinants in the group by clause with no aggregation
for the attribute. This setting is used if the data has no duplicate records. It can enhance the use of
materialized views and may result in improved performance. For example,
select
PRODUCT_LINE.PRODUCT_LINE_CODE as Product_line_code,
PRODUCT_LINE.PRODUCT_LINE_EN as Product_line //attribute
from
great_outdoors_sales..GOSALES.PRODUCT_LINE PRODUCT_LINE
group by
PRODUCT_LINE.PRODUCT_LINE_CODE //key
PRODUCT_LINE.PRODUCT_LINE_EN //attribute
This governor specifies whether generated SQL uses parameter markers or literal values.
If the governor is set to Server determined, the CQEConfig.xml file is used to determine the governor
value. If there is no active CQEConfig.xml file or no parameter entry for the governor in the CQEConfig.xml
file, then the Marker setting is used.
You can override the value of this governor in Reporting.
Dynamic SQL applications have the ability to prepare statements which include markers in the text which
denote that the value will be provided later. This is most efficient when the same query is used many
times with different values. The technique reduces the number of times a database has to hard parse an
SQL statement and it increases the re-use of cached statements. However, when queries navigate larger
amounts of data with more complex statements, they have a lower chance of matching other queries. In
this case, the use of literal values instead of markers may result in improved performance.
Note: This governor is not used in dynamic query mode.
This governor is selected upon initial upgrade of a Cognos ReportNet 1.x model. It prevents rigid
enforcement of data types so that an IBM Cognos model can function as a ReportNet 1.x model until
you update the data types in the metadata. After you have verified that the model has been upgraded
successfully, clear this governor.
Other than for initial upgrade, there are limited uses for this governor. For example, you have created a
model for use with a data source and you want to run it against a different data source. The new data
source must be structurally similar to the original data source, and the database schema must be the
same between the two data sources. If you select this governor, IBM Cognos Analytics retrieves metadata
from the data source and caches it instead of using the metadata already cached in the model. When you
have completed modifying and testing the model against the new data source, clear this governor.
If you do not use this governor, you must ensure that the following metadata is the same in the original
and new data sources:
• Collation sequence name
• Collation level
• Character set
• Nullability
• Precision
• Scale
• Column length
• Data type
Select this governor to specify that all reports based on this model will use cached data. For a new model,
this governor is enabled by default.
This setting affects all reports that use the model. Use Reporting if you want a report to use a different
setting than the model. For more information, see “Improving performance by reusing cached data when
running a report” on page 255.
This governor is selected only upon initial upgrade of a ReportNet 1.x model. This governor allows
consistent behavior with ReportNet 1.x by deriving a form of dimension information from the
relationships, key information, and index information in the data source.
You can choose to use the With clause with IBM Cognos SQL if your data source supports the With
clause.
The With clause is turned on for models created in IBM Cognos Analytics. For upgraded models, it is
turned off unless it was explicitly turned on in the Cognos ReportNet model prior to upgrading.
A published package includes the model objects selected when the package was created. In addition,
those model objects are analyzed in order to identify and include dependent objects in the package.
In a complex or very large model, the analysis can take considerable time. To shorten the publish time,
set this governor to skip this analysis step and have the entire model written to the content store. The
resulting package may be larger because the entire model is published instead of only required objects,
however the time required to publish should be reduced.
To use external data, report users import their data into an existing package. This governor controls the
number of external data files that can be imported.
The default is 1.
For more information about external data sources, see the IBM Cognos Analytics - Reporting User Guide.
To use external data, report users import their data into an existing package. This governor controls the
size of each external data file.
By default, the maximum file size that report users can import is 2560 KB.
For more information about external data sources, see the IBM Cognos Analytics - Reporting User Guide.
To use external data, report users import their data into an existing package. This governor controls the
number of rows that can exist in each external data file.
By default, the maximum number of rows that report users can import is 20000.
For more information about external data sources, see the IBM Cognos Analytics - Reporting User Guide.
Procedure
1. In the Project Viewer, click the data source you want to change.
2. In the Properties pane, in the Rollup Processing list box, select the type of rollup processing that you
want.
You can specify the type of transaction that is used by query subjects with stored procedures.
By default, a query subject that contains a stored procedure is run in a read-only transaction. However,
the stored procedure might include operations that require a read/write transaction. The Transaction
Access Mode and Transaction Statement Mode properties allow query subjects that are run in read/
write transactions to be used in all other studios.
The Transaction Access Mode property for data sources specifies the access mode of a new transaction.
The following access mode options are available:
• Unspecified - A new transaction is started in the default mode.
• Read-Only - A new transaction is started in read-only mode.
• Read-Write - A new transaction is started in read/write mode.
Defaults: For Dynamic Query Mode, the default is unspecified. For Compatible query mode, the default is
read-only.
Limit: In Dynamic Query Mode, the Transaction Access Mode property is only supported for stored
procedure based query subjects.
The Transaction Statement Mode property specifies the action to be taken when a transaction ends. The
following actions are possible:
• Unspecified - Specifies that the default action taken when a transaction ends.
• Rollback - a transaction is rolled back when it ends.
• Commit - a transaction is committed when it ends.
• Autocommit - autocommit is carried out when a transaction ends.
Default: Rollback. If the underlying database supports autocommit, then the default action is commit.
Limit: The Transaction statement mode property is ignored by Dynamic Query Mode.
In the Project Viewer, click the data source that you want to change. In the Properties pane, in the
Transaction Access Mode and the Transaction Statement Mode list boxes, click the required settings.
Procedure
1. Click Project, Project Function List.
2. Select the Set function list based on the data source type check box.
Tip: To disable this filter, select the Include all function sets check box.
3. In the Function set page, click the appropriate data source row.
4. From the drop down list on the Function set field, select the function set you want to use with this
data source.
5. Repeat steps 2 to 4 until finished.
6. Click OK.
Quality of service
With IBM Cognos Framework Manager, you can query any combination of data source types, but not all
data sources support functions the same way. The quality of service indicator provides you and your
users with a visual clue about the behavior of individual functions when used in conjunction with the data
sources in the model.
Each function specified in your data source may have a different quality of service, depending on the
type of data source in use. For each query feature that does not have the same quality of service across
packages, you can override the level of service and add text to describe the specific situation in that
model. Your users can see the quality of service indicators and the context specific description, and use
this information when determining which functions to use in reports.
Procedure
1. Click Project, Project Function List, Define Quality of Service.
2. Expand the tree nodes to view the quality of service for each function.
3. To override the quality of service, click the arrow beside each function and select the quality of service
indicator from the list.
4. After changing the quality of service, you can add detailed information about the function in the text
box on the right.
This information becomes available to your users and can assist them in determining whether to use
this function in their reports.
Content Manager Data Source Specifies the name of the data source as it is
identified in the Content Manager. If using an XML
data source, this property may be parameterized.
Query Type Specifies the type of query model that this data
source understands. For example, SQL sources are
relational and MDS sources are multidimensional.
Table 13. User roles and benefits of using the dynamic query mode
IT Manager and Data You have or are moving to Java™- Expanded data reach by using the
Professional based architectures and you require Java connectivity to OLAP data
JDBC or Java connectivity to data sources, XMLA connectivity, and JDBC
sources. connectivity to many relational data
sources.
IT Manager and IT More database vendors exclusively Support for 64-bit environments that
Administrator support 64-bit computers. You provide better memory management
want your applications to take and improved scalability and
advantage of your investment in 64- performance.
bit technology.
Modeler and IT Manager Your business users want to quickly In-memory caching stores both the
find answers when they are looking query plan and the query results while
at information. As an IT manager, maintaining the security permissions
you want to provide this ability while for each user. As a result, business
maintaining the security of your users get information quickly without
applications. compromising security.
Table 13. User roles and benefits of using the dynamic query mode (continued)
Cognos Analytics You invested in OLAP and relational Optimized access to OLAP data
Director and IT Manager technologies and you want to sources through customized and
optimize and gain the maximum enhanced MDX for specific versions of
value from your investment. OLAP technology.
SQL generation optimizations for
relational data sources.
Cognos Analytics You find it challenging to easily Detailed logging and query
Administrator troubleshoot what happens when a visualization by using Dynamic Query
query is planned and executed. Analyzer to visualize the logs and to
troubleshoot.
Procedure
1. Open Framework Manager, and select Create a new project.
2. In the New Project dialog box, specify a name and location for the project, and select the Use
Dynamic Query Mode check box.
Results
The package is now available in IBM Cognos Analytics and will use the dynamic query mode for reports
and analyzes.
Tip: You can verify the type of query mode used by the package by viewing the package properties.
Multi-fact queries
Filters (or projections) are not allowed to drag in extra facts or cause multi-fact queries if only 1 fact is in
the query. Otherwise, you encounter the following error.
XQE-PLN-0084 SQL cannot be generated, because the filter condition: [GOSALES_OR].[PRODUCT_copy].
[PRODUCTNUMBER] = 10 could not be applied to the following fact stream which does not contain a fact
projection: (PRODUCT_copy).
Some database systems might use a faster execution plan when simple equality conditions are used
versus the more complex predicate. In such situations, you can manually override the governor setting, if
required.
If you create a new data module, and then link it to a preexisting data module, only the governor values of
the new module are used. The values in the preexisting data module aren’t accessible.
In Cognos Analytics 11.x data modules, you can use the Supports NULL values property on columns to
allow or disallow null values. For more information, see "Object properties" in the IBM Cognos Analytics
Data Modeling Guide.
SELECT
COALESCE(
FS1.Item_Code,
FS2.Item_Code) AS Item_Code,
COALESCE(
FS1.Customer_Number,
FS2.Customer_Number) AS Customer_Number,
FS1.Order_Quantity AS Order_Quantity,
FS2.Plan_Sales_Quantity AS Plan_Sales_Quantity
FROM
FS1
FULL OUTER JOIN FS2
ON
FS1.Item_Code IS NOT DISTINCT FROM FS2.Item_Code AND
(FS1.Customer_Number IS NOT DISTINCT FROM FS2.Customer_Number)
The following example shows the same join where the governor is set to Equal operator.
SELECT
COALESCE(
FS1.Item_Code,
FS2.Item_Code) AS Item_Code,
COALESCE(
FS1.Customer_Number,
FS2.Customer_Number) AS Customer_Number,
FS1.Order_Quantity AS Order_Quantity,
FS2.Plan_Sales_Quantity AS Plan_Sales_Quantity
FROM
FS1
Because Customer_Number is nullable, the output can show results where the stitch is not applied
properly if Customer_Number has null values.
In the following example, the governor is set to Automatic for the same join:
SELECT
COALESCE(
FS1.Item_Code,
FS2.Item_Code) AS Item_Code,
COALESCE(
FS1.Customer_Number,
FS2.Customer_Number) AS Customer_Number,
FS1.Order_Quantity AS Order_Quantity,
FS2.Plan_Sales_Quantity AS Plan_Sales_Quantity
FROM
FS1
FULL OUTER JOIN FS2
ON
FS1.Item_Code = FS2.Item_Code AND
(FS1.Customer_Number IS NOT DISTINCT FROM FS2.Customer_Number)
In this instance, Is Not Distinct From is used only when a column is nullable. This provides correct results
and better performance than the default governor setting.
total(
total( m1 for X ) - total( m2 for X)
)
The Set to Report Scope setting specifies that the top-most aggregate has a "FOR REPORT" scope. This is
the DQM behavior.
The Remove setting specifies that the top-most aggregate is removed from the calculation. This is the
CQM behavior.
The Server determined setting specifies that the top-most aggregate has a "FOR REPORT" scope. A
server-side configuration setting might be added to this setting in a future release.
The default setting is Sever determined.
Key Value
20100000 Empty string
20100101 2010-01-01 00:00:00.000
In Cognos Analytics 11.0.8 +, the key-value pairs are formatted based on the data types of the query
items. In the following example, the key-value pairs are formatted before they are populated into a
parameter map.
Key Value
20100000 Empty string
20100101 Jan 1, 2010 12:00:00 AM
20100102 Jan 2, 2010 12:00:00 AM
20100103 Jan 3, 2010 12:00:00 AM
20100104 Jan 4, 2010 12:00:00 AM
The ON setting specifies that the key-value pairs that are populated into a parameter map are formatted.
The OFF setting specifies that the key-value pairs that are populated into a parameter map are not
formatted.
The default setting is OFF.
In-memory caching
Dynamic query mode provides data caches that optimize report performance and reduce load on
supported data sources. As metadata trees are populated and reports or interactive queries are executed,
the dynamic query mode determines which available caches can be used.
Dynamic query mode provides controls to the modelers, report authors, and administrators to help them
with the following decisions:
• How security determines which caches can be shared across sessions.
• Should a request always access the underlying data source instead of using cached data.
• When caches should be purged.
For relational data sources, the Allow usage of local cache governor defines whether query reuse is
enabled or disabled by default. For an application that must always query the latest data in a data source
this governor would be set to disabled.
A report author can override the model governor settings by specifying the Use local cache property of a
query. If this property is not changed, the setting that is defined by the governor is applied by the dynamic
query mode.
Dynamic query mode provides model governors that define how security controls which caches can be
used. By default, dynamic query mode considers database signons that are used to retrieve data from a
data source, model security rules, and connection command blocks.
Where the default rules are too fine-grained, a modeler can change the settings for the following
governors:
• Cache is sensitive to DB info
• Cache is sensitive to model security governors
• Cache is sensitive to connection command blocks
For example, an application might require users to connect to a data source with their own signons (for
auditing or chargeback rules) while allowing them access to the same data. By relaxing the Cache is
sensitive to DB info setting, fewer cached data sets are created and more requests can reuse the same
cached objects.
By default, the relational caches are automatically deleted by dynamic query mode when the following
conditions exist:
• The caches were not used (idle) for 5 minutes.
• The maximum number of cached objects that a session owns is reached.
• The maximum number of cached objects in a dynamic query server is reached.
The default values for the idle timeout and the query service limits can be changed in IBM Cognos
Administration.
IBM Cognos Analytics allows query optimizations for suppression when authoring reports with OLAP
data sources in IBM Cognos Query Studio and IBM Cognos Analytics - Reporting, where you can enable
suppression.
If a cell's expression evaluates to null, it does not have to be computed during query evaluation, which
reduces the number of cells that need to be processed.
The results vary based on a combination of the structure of the cube, the cardinality, the style of report,
the size of the query, and the sparsity of the results.
In IBM Cognos Analysis Studio, when using a package with the dynamic query mode enabled, null
suppression of rows and columns is processed in the data source, which results in improved performance.
For more information about null suppression and implementing optimizations specific to IBM
Cognos TM1® data sources, see the IBM Redbooks publication, IBM Cognos Dynamic Query
(www.redbooks.ibm.com/abstracts/sg248121.html).
Natural order
The default order of members is called the natural order. The natural order of members in OLAP over
relational is ascending order by the member caption, with nulls last. If two or more captions are identical,
the secondary sort key is the business key in ascending order. The business key is assumed to be unique.
For example, there is a Return Reason level in a dimension of a data model for product sales. If there
are no explicit member sort specifications in the model, the dynamic query mode sorts the members in
alphabetical order according to the member caption.
• Defective product
• Incomplete product
• Unsatisfactory product
• Wrong product ordered
• Wrong product shipped
In the compatible query mode, there is no consistent default sort and the natural order is dependent on
the query and the data source.
Sort specification
In IBM Cognos Framework Manager you can explicitly set the member sort specification according to your
business needs. This option is available in the Dimension Definition window, on the Members Sort tab.
Member-relative analysis always respects the order of members, whether explicit or implicit (natural
order). If a particular order of the members is important to the business view, then use the Level Sort
properties to define an explicit sort specification. Multiple Level Sort properties apply in the order listed.
If all sort properties are identical, the natural order applies.
When there is no explicit sort specification, the natural order applies. If you rely on the natural order,
member-relative functions may give unexpected results when a particular order of members is required.
This problem especially occurs for the month level in a time dimension.
In the dynamic query mode, any settings in the Sorting options box that appears on the Members Sort
tab are ignored. Instead, the following sorting options take effect:
• The metadata tree display always respects the order of members.
• The members are always ordered. The report author can apply a different sort to display the members.
Use the Level Sort Properties box in the Dimension Definition window to explicitly specify the order of
the members. The default sort order of the members is by the ascending order of the member caption of
the level.
For more information about how to specify member sort order, see the IBM Cognos Framework Manager
User Guide.
Example
Member ordering defined in the model follows the hierarchy defined for the dimension. However, sorting
in a report follows the report layout. For example, a Retailers dimension defines the following hierarchy:
• Region
Table 14. Report output for Region and Retailer country or region.
Region Retailer country or region
Americas Brazil
Americas Canada
Americas Mexico
Americas United States
Asian Pacific Australia
Asian Pacific China
Asian Pacific Japan
Asian Pacific Korea
Asian Pacific Singapore
Central Europe Belgium
Central Europe France
You can instead project only Retailer country or region in a list report with an alphabetical sort applied
to the column. The result is a list with the Retailer country or region members appearing in alphabetical
order by caption.
Sorting in the report does not interfere with any member-relative operations. They continue to follow the
member sort order in the model, whether it is explicit or implicit.
Procedure
1. To apply the filter in Cognos Framework Manager, click Tools > Launch Context Explorer.
2. Select the join that you want to optimize and set the Filter Type property.
Choose one of the following values:
In
The generated filter is an IN predicate that is composed of constant values of the join keys from
the "one-side" join operand.
Between
The generated filter is a BETWEEN predicate that is composed of the minimum and maximum of the
join key values from the "one-side" operand.
This is the default value.
Table
The generated filter is a table value constructor form of the IN predicate.
Many data sources support the IN and BETWEEN predicates in their SQL syntax, while table or row
constructors are less common. Do not select the Table option if the data source does not support
it. The dynamic query mode would be forced to decompose the query and perform local query
processing, which is not faster than when filter joins are not used.
If a report is creating a large list of values in an IN predicate, performance might be impacted by the
methods that the database vendor uses to optimize or rewrite the IN predicate. This also increases
the size of the SQL statement that is sent to the data source. If possible, use the BETWEEN predicate
instead.
Tip: A report author can use the validate feature in Cognos Analytics - Reporting to see a message that
explains why a filter join cannot be pushed to the database.
Procedure
1. In Cognos Framework Manager, select the query that you want to be a summary query.
2. Set the (DQM) Usage property to Summary Query.
[NameSpace].[Summary_query_subject].[QUANTITY]>100*1000
The fact item QUANTITY is replaced with its aggregate expression and the filter is interpreted as a
summary filter:
aggregate([NameSpace].[Summary_query_subject].[QUANTITY])>100*1000
In this example, "aggregate" represents the regular aggregate of the fact item QUANTITY. The
aggregate's scope is that of the grouping columns of the summary query subject.
5. To enable the caching of the data of the summary query subject, set the (DQM) Use Local Cache
property of the summary query subject to True.
This setting is applied only if the (DQM) Use Local Cache project governor is enabled either in the
model or in the query.
Procedure
1. In Cognos Framework Manager, create a query subject that you want to use as a bridge table.
2. Set the (DQM) Usage property to Bridge.
3. To enable the caching of the data of the summary query subject, set the (DQM) Use Local Cache
property of the summary query subject to True.
This setting is applied only if the (DQM) Use Local Cache project governor is enabled either in the
model or in the query.
To solve this problem, you must set the Transaction Access Mode property to Read-Write.
Transaction access modes and queries that use multiple model data sources
When a query uses multiple Framework Manager model data sources that reference the same Content
Manager Data Source, the query uses the JDBC connection transaction access mode that is specified for
the model data source whose name is first in alphabetical order.
select
PRODUCT_LINE.PRODUCT_LINE_CODE as Product_Line_Code,
PRODUCT_LINE.PRODUCT_LINE_EN as Product_Line,
PRODUCT_TYPE.PRODUCT_TYPE_CODE as Product_Type_Code,
PRODUCT_TYPE.PRODUCT_TYPE_EN as Product_Type,
PRODUCT.PRODUCT_NUMBER as Product_Number,
PRODUCT_MULTILINGUAL.PRODUCT_NAME as Product_Name
PRODUCT_MULTILINGUAL.DESCRIPTION as Product_Description,
PRODUCT.INTRODUCTION_DATE as Introduction_Date,
PRODUCT.PRODUCT_IMAGE as Product_Image,
PRODUCT.PRODUCTION_COST as Production_Cost,
PRODUCT.MARGIN as Margin
from
gosl_82..gosl.PRODUCT_LINE PRODUCT_LINE,
gosl_82..gosl.PRODUCT_TYPE PRODUCT_TYPE,
gosl_82..gosl.PRODUCT PRODUCT,
gosl_82..gosl.PRODUCT_MULTILINGUAL PRODUCT_MULTILINGUAL
where
(PRODUCT_MULTILINGUAL."LANGUAGE" - N'EN')
and
(PRODUCT_LINE.PRODUCT_LINE_CODE = PRODUCT_TYPE.PRODUCT_LINE_CODE)
and
(PRODUCT_TYPE.PRODUCT_TYPE_CODE = PRODUCT.PRODUCT_TYPE_CODE)
and
(PRODUCT.PRODUCT_NUMBER = PRODUCT_MULTILINGUAL.PRODUCT_NUMBER
If you test only Product name, you see that the resulting query uses only Product Multilingual, which is the
table that was required. This is the effect of minimized SQL.
select
PRODUCT_MULTILINGUAL.PRODUCT_NAME as Product_Name
from
gosl_82..gosl.PRODUCT_MULTILINGUAL PRODUCT_MULTILINGUAL
where
(PRODUCT_MULTILINGUAL."LANGUAGE" - N'EN")
To simplify the model in this example, apply star schema concepts to create one model query subject that
combines the foreign keys of both Order header and Order details and includes all measures at the Order
details level. This query subject should be joined to the same query subjects that Order header and Order
details were joined to. You may choose to remove the original relationships from the two data source
query subjects except for the relationship that defines the join between them. For a discussion of the
pros and cons of creating relationships to model query subjects, see the examples in “What is minimized
SQL?” on page 282.
In the example below, Order header and Order details have been combined into a new model query
subject named Sales. This query subject has been joined to Product, Time, and Order method.
If you do not specify the determinants properly in the Time query subject, incorrect aggregation may
occur. For example, Expected volume values that exist at the Month level in Product forecast is repeated
for each day in the Time query subject. If determinants are not set correctly, the values for Expected
volume are multiplied by the number of days in the month.
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.
If we run a query to show Revenue, Product cost, and Margin for each product using the Order details fact,
we get the following results:
Notice that the value for Margin seems to be wrong. This is because of the order of operations used in
computing Margin. Margin is computed as:
The aggregation took place after the mathematical operation and, in this case, it produces undesired
results.
To produce the desired values for Margin, we need to aggregate before the mathematical operation:
You can accomplish this in IBM Cognos Framework Manager by creating a stand-alone calculation for
Margin and setting its Regular Aggregate property to Calculated. Each query item in the calculation's
expression is aggregated as specified in its Regular Aggregate property. The Regular Aggregate
In this example, Margin is based on the measures Product cost and Revenue that are within the same
measure dimension, Sales. If the Regular Aggregate property for Margin is set to Calculated, it is rolled
up as:
If Margin is based on the source query items of the measures Product cost and Revenue (Sales
(model).Product cost, Sales (model).Revenue), the calculated aggregation is not supported and the
aggregation behaves as automatic. In this case, Margin is rolled up as:
For more information, see “Modifying how query items are aggregated” on page 107.
Note that this is a simplified representation and not an example of how this would appear in a model built
using IBM Cognos modeling recommendations.
The Result
Individual queries on Sales and Product Forecast by Month and Product yield the following results. The
data in Sales is actually stored at the day level.
A query on Sales and Product Forecast respects the cardinality between each fact table and its
dimensions and writes SQL to return all the rows from each fact table. The fact tables are matched
on their common keys, month and product, and, where possible, are aggregated to the lowest common
Note that in February 2004, Course Pro Umbrellas were in the forecast but there were no actual sales.
The data in Sales and Product Forecast exist at different levels of granularity. The data in Sales is at the
day level, and Product Forecast is at the month level.
The SQL
The SQL generated by IBM Cognos software, known as a stitched query, is often misunderstood. A
stitched query uses multiple subqueries, one for each star, brought together by a full outer join on the
common keys. The goal is to preserve all dimensional members occurring on either side of the query.
The following example was edited for length and is used as an example to capture the main features of
stitched queries.
select
coalesce(D2.MONTH_NAME,D3.MONTH_NAME) as MONTH_NAME,
coalesce(D2.PRODUCT_NAME,D3.PRODUCT_NAME) as PRODUCT_NAME,
D2.EXPECTED_VOLUME as EXPECTED_VOLUME,
D3.QUANTITY as QUANTITY
from (select TIME.MONTH_NAME as MONTH_NAME,
PRODUCT_LOOKUP.PRODUCT_NAME as PRODUCT_NAME,
XSUM(PRODUCT_FORECAST_FACT.EXPECTED_VOLUME for
TIME.CURRENT_YEAR,TIME.QUARTER_KEY,TIME.MONTH_KEY,
PRODUCT.PRODUCT_LINE_CODE, PRODUCT.PRODUCT_TYPE_CODE,
PRODUCT.PRODUCT_KEY) as EXPECTED_VOLUME
from
(select TIME.CURRENT_YEAR as CURRENT_YEAR,
TIME.QUARTER_KEY as QUARTER_KEY,
TIME.MONTH_KEY as MONTH_KEY,
XMIN(TIME.MONTH_NAME for TIME.CURRENT_YEAR,
TIME.QUARTER_KEY,TIME.MONTH_KEY) as MONTH_NAME
from TIME_DIMENSION TIME
group by TIME.MONTH_KEY) TIME
join PRODUCT_FORECAST_FACT PRODUCT_FORECAST_FACT
on (TIME.MONTH_KEY = PRODUCT_FORECAST_FACT.MONTH_KEY)
join PRODUCT PRODUCT on (PRODUCT.PRODUCT_KEY =
PRODUCT_FORECAST_FACT.PRODUCT_KEY)
where
(PRODUCT.PRODUCT_NAME in ('Aloe Relief','Course Pro
Umbrella')) and
(TIME.MONTH_NAME in ('April 2004','February 2004','February
2006'))
group by
TIME.MONTH_NAME,
PRODUCT_LOOKUP.PRODUCT_NAME
) D2
full outer join
(select TIME.MONTH_NAME as MONTH_NAME,
PRODUCT_LOOKUP.PRODUCT_NAME as PRODUCT_NAME,
XSUM(SALES_FACT.QUANTITY for TIME.CURRENT_YEAR,
TIME.QUARTER_KEY, TIME.MONTH_KEY,
PRODUCT.PRODUCT_LINE_CODE, PRODUCT.PRODUCT_TYPE_CODE,
PRODUCT.PRODUCT_KEY ) as QUANTITY
from
select TIME.DAY_KEY,TIME.MONTH_KEY,TIME.QUARTER_KEY,
TIME.CURRENT_YEAR,TIME.MONTH_EN as MONTH_NAME
from TIME_DIMENSION TIME) TIME
join SALES_FACT SALES_FACT
on (TIME.DAY_KEY = SALES_FACT.ORDER_DAY_KEY)
join PRODUCT PRODUCT on (PRODUCT.PRODUCT_KEY = SALES_FACT.PRODUCT_KEY)
The SQL
Because a circular join path was detected in the model, the generated SQL did not include one of the
relationships that was not necessary to complete the join path. In this example, the relationship between
Time and Product Forecast was dropped.
A circular join path rarely results in a query that produces useful results.
select
TIME_.MONTH_NAME as MONTH_NAME,
PRODUCT_LOOKUP.PRODUCT_NAME as PRODUCT_NAME,
XSUM(SALES_FACT.QUANTITY for
TIME_.CURRENT_YEAR, TIME_.QUARTER_KEY, TIME_.MONTH_KEY,
PRODUCT.PRODUCT_LINE_CODE, PRODUCT.PRODUCT_TYPE_CODE,
PRODUCT.PRODUCT_KEY ) as QUANTITY,
XSUM(PRODUCT_FORECAST_FACT.EXPECTED_VOLUME for TIME_.CURRENT_YEAR,
TIME_.QUARTER_KEY, TIME_.MONTH_KEY, PRODUCT.PRODUCT_LINE_CODE,
PRODUCT.PRODUCT_TYPE_CODE, PRODUCT.PRODUCT_KEY ) as EXPECTED_VOLUME
from
(select TIME.DAY_KEY,TIME.MONTH_KEY, TIME.QUARTER_KEY,
TIME.CURRENT_YEAR,TIME.MONTH_EN as MONTH_NAME
from TIME_DIMENSION TIME) TIME
join
SALES_FACT on (TIME_.DAY_KEY = SALES_FACT.ORDER_DAY_KEY)
join
PRODUCT_FORECAST_FACT on (TIME_.MONTH_KEY =
PRODUCT_FORECAST_FACT.MONTH_KEY)
join
PRODUCT (PRODUCT.PRODUCT_KEY = PRODUCT_FORECAST_FACT.PRODUCT_KEY)
where
(PRODUCT.PRODUCT_NAME in ('Aloe Relief','Course Pro Umbrella'))
and
(TIME_.MONTH_NAME in ('April 2004','February 2004','February 2006'))
group by
TIME_.MONTH_NAME, PRODUCT.PRODUCT_NAME
In this result, the lower level of granularity for records from Sales results in more records being returned
for each month and product combination. There is now a 1-n relationship between the rows returned
from Product Forecast and those returned from Sales.
The SQL
The stitched SQL generated for this example is very similar to the SQL generated in the multiple-fact,
multiple-grain query. The main difference is the addition of Order Method. Order Method is not a
conformed dimension and affects only the query against the Sales Fact table.
select
D2.QUANTITY as QUANTITY,
D3.EXPECTED_VOLUME as EXPECTED_VOLUME,
coalesce(D2.PRODUCT_NAME,D3.PRODUCT_NAME) as PRODUCT_NAME,
coalesce(D2.MONTH_NAME,D3.MONTH_NAME) as MONTH_NAME,
D2.ORDER_METHOD as ORDER_METHOD
from
(select
PRODUCT.PRODUCT_NAME as PRODUCT_NAME,
TIME.MONTH_NAME as MONTH_NAME,
ORDER_METHOD.ORDER_METHOD as ORDER_METHOD,
XSUM(SALES_FACT.QUANTITY for TIME.CURRENT_YEAR,TIME.QUARTER_KEY,
TIME.MONTH_KEY,PRODUCT.PRODUCT_LINE_CODE,PRODUCT.PRODUCT_TYPE_CODE,
PRODUCT.PRODUCT_KEY,ORDER_METHOD_DIMENSION.ORDER_METHOD_KEY) as
QUANTITY
from
PRODUCT_DIMENSION PRODUCT
join
SALES_FACT SALES_FACT
on (PRODUCT.PRODUCT_KEY = SALES_FACT.PRODUCT_KEY)
join
ORDER_METHOD_DIMENSION ORDER_METHOD
on (ORDER_METHOD.ORDER_METHOD_KEY = SALES_FACT.ORDER_METHOD_KEY)
join TIME_DIMENSION TIME
on ( TIME.DAY_KEY = SALES_FACT.ORDER_DAY_KEY)
where
(PRODUCT.PRODUCT_NAME in ('Aloe Relief','Course Pro Umbrella'))
and
( TIME.MONTH_NAME in ('April 2004','February 2004','February 2006'))
group by
PRODUCT.PRODUCT_NAME,
TIME.MONTH_NAME,
ORDER_METHOD.ORDER_METHOD
) D2
full outer join
(select
PRODUCT.PRODUCT_NAME as PRODUCT_NAME,
TIME.MONTH_NAME as MONTH_NAME,
XSUM(PRODUCT_FORECAST_FACT.EXPECTED_VOLUME for TIME.CURRENT_YEAR,
TIME.QUARTER_KEY,TIME.MONTH_KEY,PRODUCT.PRODUCT_LINE_CODE,
PRODUCT.PRODUCT_TYPE_CODE,PRODUCT.PRODUCT_KEY) as EXPECTED_VOLUME
from
PRODUCT_DIMENSION PRODUCT
join
PRODUCT_FORECAST_FACT PRODUCT_FORECAST_FACT
on (PRODUCT.PRODUCT_KEY = PRODUCT_FORECAST_FACT.PRODUCT_KEY)
join
(select
TIME.CURRENT_YEAR as CURRENT_YEAR,
TIME.QUARTER_KEY as QUARTER_KEY,
TIME.MONTH_KEY as MONTH_KEY,
XMIN(TIME.MONTH_NAME for TIME.CURRENT_YEAR, TIME.QUARTER_KEY,
TIME.MONTH_KEY) as MONTH_NAME
from
TIME_DIMENSION TIME
group by
TIME.CURRENT_YEAR,
TIME.QUARTER_KEY,
TIME.MONTH_KEY
) TIME
on (TIME.MONTH_KEY = PRODUCT_FORECAST_FACT.MONTH_KEY)
Items from these query subjects are used in a Query subject that behaves as a fact in the
query: query:
Product line and Product type Product type
Product line, Product type, and Product Product
Product line, Product type, Product, and Sales Sales
Product line and Sales Sales
Test this model by authoring a report on the number of orders per city, per country or region. Using this
model returns an incorrect result. The numbers are correct for the cities but some cities are shown as
being in the wrong country or region. This is an example of an incorrectly related result.
Usually the first place to look when you see something like this is in the SQL.
The SQL
In this example, we see a stitched query, which makes sense if we have multiple facts in the model.
A stitched query is essentially a query that attempts to stitch multiple facts together. It uses the
relationships that relate the facts to each other as well as the determinants for the conformed, or
common, dimensions defined in the model. A stitched query can be identified by two queries with a full
outer join. The wrapper query must include a coalesce statement on the conformed dimensions.
Note the following problems in the SQL:
select
D3.COUNTRY as COUNTRY,
D2.CITY as CITY,
D2.number_of_orders as number_of_orders
from
(select
SALES_BRANCH.CITY as CITY,
XCOUNT(ORDER_HEADER.ORDER_NUMBER for SALES_BRANCH.CITY) as
number_of_orders,
RSUM(1 at SALES_BRANCH.CITY order by SALES_BRANCH.CITY
asc local)
as sc
from
gosales.gosales.dbo.SALES_BRANCH SALES_BRANCH
join
gosales.gosales.dbo.ORDER_HEADER ORDER_HEADER
on (SALES_BRANCH.SALES_BRANCH_CODE = ORDER_HEADER.SALES_BRANCH_CODE)
group by
SALES_BRANCH.CITY
order by
CITY asc
) D2
full outer join
(select
COUNTRY_MULTILINGUAL.COUNTRY as COUNTRY,
RSUM(1 at COUNTRY_MULTILINGUAL.COUNTRY order by
COUNTRY_MULTILINGUAL.COUNTRY asc local) as sc
from
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
group by
COUNTRY_MULTILINGUAL.COUNTRY
order by
COUNTRY asc
) D3
on (D2.sc = D3.sc)
By looking at the stitched columns in each query, we see that they are being calculated on unrelated
criteria. This explains why there is no apparent relationship between the countries or regions and cities in
the report.
So why do we see a stitched query? To answer that question, we must look at the model.
In this example, the query items used in the report came from different query subjects. Country or region
came from Country Multilingual, City came from Sales Branch, and the Number of Orders came from a
count on Order Number in the Order Header query subject.
Solution 1
You can add a filter to Country Multilingual that changes the cardinality of the relationship to 1-1.
Select *
from [GOSL].COUNTRY_MULTILINGUAL
Where
COUNTRY_MULTILINGUAL."LANGUAGE"='EN'
Or you can add a filter on the relationship and change the cardinality to 1-1.
COUNTRY.COUNTRY_CODE = COUNTRY_MULTILINGUAL.COUNTRY_CODE
and COUNTRY_MULTILINGUAL.LANGUAGE = 'EN'
Either choice results in a model that has a single fact in this query.
Solution 2
Simplify the model by consolidating the related query subjects. This gives the greatest benefit by
simplifying the model and reducing the opportunities for error in query generation.
select
Country.c7 as COUNTRY,
SALES_BRANCH.CITY as CITY,
XCOUNT(ORDER_HEADER.ORDER_NUMBER for Country.c7,SALES_BRANCH.CITY)
as number_of_orders
from
(select
COUNTRY.COUNTRY_CODE as c1,
COUNTRY_MULTILINGUAL.COUNTRY as c7
from
gosales.gosales.dbo.COUNTRY COUNTRY
join
gosales.gosales.dbo.COUNTRY_MULTILINGUAL COUNTRY_MULTILINGUAL
on (COUNTRY.COUNTRY_CODE = COUNTRY_MULTILINGUAL.COUNTRY_CODE)
where COUNTRY_MULTILINGUAL.LANGUAGE='EN'
) Country
join
gosales.gosales.dbo.SALES_BRANCH SALES_BRANCH
on (SALES_BRANCH.COUNTRY_CODE = Country.c1)
join
gosales.gosales.dbo.ORDER_HEADER ORDER_HEADER
on (SALES_BRANCH.SALES_BRANCH_CODE = ORDER_HEADER.SALES_BRANCH_CODE)
group by
Country.c7,
SALES_BRANCH.CITY
Procedure
1. Open each segment as a separate project, starting with the lowest level segment in the hierarchy.
2. Follow the steps to upgrade the model.
For more information, see Chapter 11, “Upgrading models,” on page 309.
Do not repair the segment.
3. After the upgrade is complete, save the project.
4. Upgrade each segment in the hierarchy, working back to the main project.
5. Repair the complete model in the master project.
6. After upgrading the master project, check in each segment, and then check in the master project.
FMMD_ModelUpdate utility
The Framework Manager FMMD_ModelUpdate utility changes the case of object names in the model to
lowercase or uppercase.
The utility processes imported tables, views, stored procedures, and user-defined scalar functions in the
model .xml files. It works with models that were created or updated in IBM Cognos Framework Manager
11.x or earlier versions.
The following screen capture from Framework Manager shows an example of the Physical database
objects that are processed and updated by the FMMD_ModelUpdate utility. The External Name property
is also updated.
You might need to use this utility when you migrate your model to a different database, and you encounter
errors that are related to missing tables or columns when you run queries. The errors might be caused by
the mismatched case of metadata in the different databases. The initial case of the metadata objects in
the model depends on the database that was used to create the model. When the model is used with a
different database that handles the metadata case differently, errors might occur.
For more information about vendors metadata, see the applicable SQL reference guide. Search for
supported identifier names. Review how the vendors handle identifiers that are, or are not, enclosed
between a delimiter, which is typically a single quotation mark (') or a backquote character (`).
-queryobject=dbquery
-queryobject=storedprocedure
-queryobject=function
-cmdlineoptionsfile=file name
Specifies the name of a text file that contains the utility command-line options. Use this option if you
want to run the utility from a script file instead of entering the commands directly in the command-
line interface. The options in this file override the options that are specified from the command line.
Each option in the script must be specified on a separate line. Comment lines start with the number #
character. For example, the file might look in the following way:
-xsltfile=file name
Specifies the name of a valid XSLT script that the utility must use to apply the set of transformations
on themodel.xml file. By default, the FMMD_ModelUpdate.xsl file is used. For more information,
see “Creating a custom XSLT stylesheet” on page 312.
-h or question mark (?) character
Displays the list of commands that are supported by the utility.
Procedure
1. Open the operating system command line utility.
2. Run the utility in one of the following ways:
fmmd_modelupdate.bat -shift=upper|lower
-datasourcename=name
-inputlocation=folder
-filename=file name
-outputlocation=folder
-outputfileextension=.out.xml
-queryObject=dbquery|storedprocedure|function
-cmdlineoptionsfile=file name
-xsltfile=<file>]
• Run the utility commands from the script file by typing the following command:
For example, if your script file is model_convert_case, the command would be as follows:
fmmd_modelupdate.bat -cmdlineoptionsfile=model_convert_case
Results
The utility applies edits to a copy of the model.xml file that it reads. The original model file is not
changed or renamed. An output file is crated in the folder that you specified for the -outputlocation
option. The default extension of the output file is .out.xml. For example, if your model file is the default
model.xml, the output file would be model.out.xml.
What to do next
To use the updated model in IBM Cognos Analytics, do the following steps:
• Rename the original model.xml file.
• Rename the utility output file to the original model file. For example, rename model.out.xml, to
model.xml.
• Open the output model file in Framework Manager, and if needed manually apply any outstanding
changes. For example, update the column metadata or change the native or pass-through query
subjects.
• Test all applicable query subjects to ensure that the database doesn’t return any errors that would
indicate missing tables, views, stored procedures, functions, or column names.
• Republish existing packages or publish new packages to propagate the model changes to the related
reports, dashboards, or other content.
Metadata callbacks
Using the FMMD_ModelUpdate utility might sometimes cause metadata callbacks.
At runtime, the query engine might need data type information about columns that are referenced by
a query. By default, the query engine attempts to obtain that information from a model. If the model
is unable to provide the necessary column information, the query engine turns to the database for this
information. Database systems with large amounts of metadata might take longer to resolve this type of
requests, which can impact the performance of reports or dashboards.
A default data source query subject is normally given the name of the table as it was first imported, and
the logical SQL statement uses a table name that is the same as the name of the data source query
subject. When the FMMD_ModelUpdate utility runs, it changes the table name in the logical SQL and the
external_name attribute of all columns that are associated with the data source query subject. This
change might cause metadata callbacks. To avoid this issue, you can create a new namespace in the
model, and import the applicable tables and views into this namespace from the database that will be
queried.
Using symbols and patterns can provide similar results as basic data formatting tasks. For example, you
can set how many digits appear after the decimal point. You can achieve these types of results with
a pattern, or you can set the Number of decimal places property. Patterns allow flexibility for more
complex requirements.
Each supported content language code requires a specific set of symbols to be used in patterns. For each
language code, there are two tables you will need; one for date and time symbols, and one for decimal
symbols. The decimal symbols are the same for all locales, however, date and time symbols are grouped
into six locale groups. Check the Date and Time Symbol section to see which locale group is used for your
locale.
To define patterns, open the Data format dialog box, and edit the Pattern property for each format type.
Use the symbols that are defined in the language code tables, and follow these guidelines.
Pattern guidelines
When you define a pattern, the number of symbols you use affects how the data will be shown. There are
different rules for text, numbers, and values that can take the form of text or numbers.
Text
You can specify whether text is produced in full or abbreviated form.
Numbers
The number of symbols you use in a pattern sets the minimum number of digits that are produced in a
report. Numbers that have fewer digits than specified are zero-padded. For example, if you specify mm for
minutes, and the database value is 6, the report will show 06.
Note: The year value is handled differently. If you specify two symbols for year, the last two digits of the
year value is produced. For example, yyyy produces 2013, and yy produces 13.
Locale Group A
Locales: af-za, en, en-au, en-be, en-bw, en-ca, en-gb, en-hk, en-ie, en-in, en-mt, en-nz, en-ph, en-sg,
en-us, en-vi, en-za, fo-fo, gl-es, id, id-id, is, is-is, it, it-ch, it-it, kk-kz, ms, ms-bn, ms-my, nb-no, nl, nl-be,
nl-nl, no, no-no, om-et, om-so, pl, pl-pl, pt, pt-br, pt-pt, so-dj, so-et, so-ke, so-so, sv, sv-fi, sv-se, sw-ke,
sw-tz
Era G Text AD
Locale Group B
Locales: be-by, bg-bg, el, el-gr, fi, fi-fi, hr, hr-hr, hu, hu-hu, ja, ja-jp, ko, ko-kr, ro, ro-ro, ru, ru-ua, ru-ru,
sh-yu, sk, sk-sk, sl-si, sq-al, sr-sp, th, tr, tr-tr, uk-ua, zh, zh-cn, zh-hk, zh-mo, zh-sg, zh-tw
Era G Text AD
Locale Group C
Locales: ca-es, cs, cs-cz, da, da-dk, es, es-ar, es-bo, es-cl, es-co, es-cr, es-do, es-ec, es-es, es-gt, es-hn,
es-mx, es-ni, es-pa, es-pe, es-pr, es-py, es-sv, es-us, es-uy, es-ve, eu-es, mk-mk
Era G Text AD
Locale Group D
Locales: de, de-at, de-be, de-ch, de-de, de-lu
Era G Text AD
Locale Group E
Locales: fr, fr-be, fr-ca, fr-ch, fr-fr, fr-lu
Era G Text AD
Locale Group F
Locales: ga-ie
Era R Text AD
Symbol Meaning
This product uses standard Microsoft Windows operating system navigation keys in addition to
application-specific keys.
The following keyboard shortcuts are based in US standard keyboards.
Description Shortcut
Context-sensitive help F1
New file Ctrl + N
Open file Ctrl + O
Save file Ctrl + S
Undo Ctrl + Z
Redo Ctrl + Y
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Delete Del
There are special considerations when using SAP-based packages created in Framework Manager. For
detailed information about creating your SAP queries, creating the SAP-based packages in Framework
Manager and using them in Transformer, see the section about working with SAP BW data using a package
in Framework Manager. For general information about creating packages in Framework Manager, see
"Create or Modify a Package" in the IBM Cognos Framework Manager User Guide.
Limitations
• This extract process is limited to SAP BW data sources only.
• The data source must be a specifically constructed query defined in the SAP BW data source.
For general information about creating packages, see "Create or Modify a Package" in the Framework
Manager User Guide.
Procedure
1. In Query Designer, click New Query.
2. In the New Query dialog box, select the information provider that contains the cube that you want to
import.
3. Click the Tools icon to view the technical name of the InfoObject.
4. Drag a characteristic that you wish to import from the InfoObject catalog on the left column to one of
the fields on the right-hand side of the page. For example, Columns or Rows.
The characteristics you select will define the metadata in the Cognos Transformer cube. The
characteristics must adhere to the following restrictions:
• You must have at least a single optional variable to segment the data.
• Select a characteristic that is representative of the data source. The characteristics can be either key
figures, which will become measures in Cognos Transformer, or dimensions, which will become the
Cognos Transformer dimensions.
• Do not assign any of the characteristics a display hierarchy, either explicitly or by a variable.
• All key figures in the SAP BW query must be numeric.
• Do not select the Currency/Unit characteristic.
• Ensure that all selected key figures use the same currency.
• Only include characteristics in the SAP BW query that you wish to extract using Framework
Manager. Including unnecessary characteristics increases data volume, thereby adversely affecting
performance.
• Characteristics must be copied to the Columns or Rows fields of the query definition. If copied to
the Free Characteristics or the Filter fields, the characteristics show as dimensions when importing
from the package but the stream extract processing is not able to fetch the values.
• If you have filters defined, they must reference only dimensions that have been included elsewhere
in the query definition.
• If you include a free characteristic, no values will appear for that characteristic in the key figures
extract. A filter on a free characteristic acts as a filter on the returned SAP BW data. You can use this
as a filter to define a subset of an InfoCube.
• Use a picklist prompt, rather than a type-in prompt for the query. A picklist prompt provides values
for segmenting the data.
5. To define the metadata that will populate the Cognos Transformer cube, you must change the
properties of each characteristic that you have selected for inclusion. Right-click a characteristic, and
select Properties.
6. In the Properties of Characteristic dialog box, change the Display As value to Key, and the Suppress
Results Rows value to Always. Note that any restriction or filter applied here will be carried forward in
Cognos Transformer.
7. Repeat steps 5 and 6 for each characteristic that you selected in step 4.
Note: You should only select the characteristics that you require. To avoid excessive memory
consumption, and decreased system performance or failure, carefully consider what characteristics
Results
You are now ready to create a variable “Create a Variable” on page 329. For more information on using the
SAP Query Designer, see your SAP BW documentation.
Create a Variable
You must now create an optional prompt parameter for the query so Cognos Transformer can issue
smaller queries to SAP, and thereby retrieve the entire data set.
There are no set rules for variable usage when extracting SAP BW data for use in Cognos Transformer.
However, you must be careful not to request too much data that could potentially perform poorly or error
out with out-of-memory messages within your SAP environment.
A basic guideline to follow is that when a variable is utilized for the extraction, Cognos Transformer will
first fetch all members that exist for the dimension against which the variable is defined. After this,
Cognos Transformer will perform individual data fetches to extract the fact data for each of the individual
members within the dimension in order to satisfy the variable.
This allows Cognos Transformer to break down your data extraction into manageable chunks that the SAP
BW server can handle. There are no set standards as to which dimension to apply it to. To achieve optimal
performance, you must understand your SAP BW data and determine which dimension evenly breaks up
the factual data.
You must choose carefully which dimension to define the variable on. It may require some
experimentation to achieve optimal performance. For example, you may have a Country or region
dimension that contains three countries or regions as members, United States (US), Canada (CA), and
Mexico (MX). If most of the business is performed in the US (90%) and the remaining business (10%)
is recorded against Canada and Mexico evenly, this dimension would not evenly split up the data. The
resulting queries would have one very large request (US) and two small ones (CA and MX). Therefore, this
dimension would not be a good candidate.
You do not want to apply a variable on a dimension that would cause too many very small requests. For
example, [0MATERIAL], a dimension often utilized in SAP BW environments would probably not be a good
candidate because it would cause too many small requests to be performed.
You may have a dimension defined for [COSTCENTER] that evenly divides up the data for 10 distinct cost
centers that may serve to segment the data evenly. Another good alternative may be calendar year or
calendar month because it may divide your data into sections that perform adequately.
It is not necessary to apply any variables to queries for data extraction. Some extraction will perform
perfectly well when no variables are applied. For example, a good approach may be to apply a variable on
a dimension which splits the data into 20 individual fetches and test the extraction. If this performs well,
you may choose to apply a variable on a different dimension which may contain 5 distinct members and
see how it compares.
No formula can be applied as no two environments are alike. However, a cautious approach is
recommended to avoid disrupting your SAP BW environment.
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer 329
Procedure
1. In Query Designer, right-click a characteristic that you have selected in the previous procedure and
select Restrict.
To ensure that data is distributed evenly, select a characteristic that is representative of the cube and
will not result in a large number of values. You want a resulting variable where the number of rows
for each value of the variable is similar; you do not want a resulting variable that is too fine-grained
(for example, not many rows per value resulting in an excessive number of queries), nor do you want a
variable that is too coarse-grained (for example, more than one million rows per value).
2. In the Selection for … dialog box, click the Variables tab, right-click anywhere inside the Description
window and select New Variable.
Note: If one of the characteristics that you have chosen already has a variable, you can avoid creating
a new variable and skip to step 7 of this procedure.
3. In the New Variable Wizard General Information page, type a Variable Name and Description, and
select a dimension as the characteristic. Click Next.
4. In the Details page, select Single Value, Multiple Single Values, or Interval in the Variable
Represents field, Optional in the Variable entry is field, and select the Ready for Input check box.
Click Next.
5. In the Default Values page, ensure that the Default Value field is empty.
6. Click Next until you are returned to Selection for … dialog box. The new variable appears in the
Description window.
7. Select the variable and click the right arrow to move the selected variable to the Selection window.
Save the query. You are now ready to import the query in Framework Manager.
Results
You are now ready to create a model in Transformer. For more information on creating a package, see
"Create or Modify a Package" in the Framework Manager User Guide.
Procedure
1. Click the Packages folder, and from the Actions menu, click Create, Package.
2. In the Provide Name page, type the name for the package and, if you want, a description and screen
tip. Click Next.
3. Select the query that you imported in the previous section.
For more information, see “Creating a BW Query in SAP Business Explorer Query Designer” on page
328.
4. In the Define objects page, when hiding or excluding child objects from the package, you must select
each of them individually. Excluding parent objects also exclude all of its children. Note that excluding
(or unselecting) many objects from larger cubes will require a significant amount of time.
Note: Framework Manager supports ctrl+shift and alt+shift functionality. Use these keystrokes to
select multiple objects that you wish to include or hide in the cube. For example, if you wish to only
include two items in a large branch, select the entire branch, then use ctrl+shift to de-select the items
you wish to include, and hide the remaining selected items.
For more information about including, excluding and hiding objects, see "Create or Modify a Package"
in the Framework Manager User Guide.
5. Choose whether to use the default access permissions for the package:
• To accept the default access permissions, click Finish.
• To set the access permissions, click Next.
6. When you are prompted to open the Publish Package Wizard, click Yes.
7. Select the default values, and click Publish. This will publish the package to the content store, and will
allow you to access the package in Transformer.
8. At the final screen verify the results, and click Finish.
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer 331
Results
You are now ready to create a model in Transformer. For more information on creating a package, see
"Create or Modify a Package" in the Framework Manager User Guide.
Procedure
1. In Transformer, click Create a new model.
2. In the New Model Wizard, click Cancel.
3. With the Dimension Map pane selected, from the Edit menu, click Insert Dimension from Package.
4. Click Browse to open the metadata browser.
5. In the Browse Metadata dialog box, select the package that contains your SAP BW query and click
OK.
6. In the Insert Dimension from Package dialog box, click Finish.
7. In the Select Dimension and Measures from Package dialog box, click the dimensions and
measures to include in the data source.
Select a query item that will provide the dates for the PowerCube. Note that the dates for the
PowerCube can be derived entirely from the transaction data.
8. If there are errors or warnings, you are notified. In the Data Sources pane, expand the package to
view the data source queries and query items. Key figures or measures appear in the Measures pane.
Ensure that the aggregation rule for each measure is correctly defined within Transformer to align as
closely as possible with the aggregation rule defined in SAP BW.
It is recommended that the storage type for all measures be set to 64-bit floating point.
For the root level of each characteristic (dimension), ensure it is marked as unique.
SAP BW presentation hierarchies may contain ragged paths, typically in association with the "not
assigned" and "#" nodes in the hierarchy. The gaps in these hierarchies produce blanks at the
associated level in the Transformer hierarchy. In Transformer, it is possible to define the text that
Results
You can now use this model to create PowerCubes for use with the desired IBM Cognos component,
accessing the dimensional and fact data from the original SAP BW data source. For more information, see
the section "Create a Model" in the Transformer User Guide.
Extract Size
The Extract Size data source property within Framework Manager controls the amount of data retrieved
from SAP BW at any one time.
If this setting is negative, zero, or empty, a single query is issued to SAP BW to extract the characteristic
data.
If this setting is a positive value, Framework Manager issues multiple queries to SAP BW, each of which
returns approximately the number of megabytes specified by the Extract Size property.
This feature can reduce the overall size of the query result on the SAP BW server. Overall query execution
may take longer, but for large characteristics, not using this feature may result in consumption of a user's
allotted memory space on the SAP BW server.
The entire data for a characteristic dimension will be in memory within Framework Manager prior to the
production of an extract file. It is important that only the required query items be extracted from SAP BW
to ensure that an extract does not fail due to memory allocation errors within Framework Manager.
Model query subjects are extracted using the same mechanism by which queries are executed within IBM
Cognos. Therefore, the Extract Size property has no effect on the query execution.
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer 333
Measure Dimensions
When extracting a measure dimension, you should create a model query subject containing the measures
that you want. You should include the business key query item from each of the levels of each dimension,
depending on the level of granularity that you are trying to achieve.
For information about externalizing model query subjects, see “Framework Manager Considerations” on
page 335.
Characteristic Dimensions
Characteristic dimensions are externalized independent of the type of SAP BW data source, such as
InfoCube or SAP BW query.
Framework Manager uses a single approach to externalize all dimensions that do not contain fact query
items. In these cases, the extract size configuration setting is used to control the manner in which data is
extracted from SAP BW.
Note: Model query subjects are externalized in a different manner, regardless of whether they contain fact
query items or not. For information about externalizing model query subjects, see “Framework Manager
Considerations” on page 335.
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer 335
In addition, any calculations defined within the key figures dimension are ignored. These may be defined
either within the SAP BW query in BEx, or in a model query subject in Framework Manager.
Each characteristic extracted must contain at least one query item from the lowest level of its hierarchy
(if there is one) to provide linkage with the key figures extract. You should include the business key query
item from each of the levels of each dimension, depending on the level of granularity that you are trying to
achieve.
Transformer Guidelines
When using the SAP BW data that you extracted from Framework Manager, keep these considerations in
mind.
• In Transformer version 8.3, you can insert regular dimensions from SAP data sources directly from a
IBM Cognos data source, using the Insert dimension from package option.
• Using the model wizard in Transformer, insert a data source of type Delimited-Field Text With Column
Titles and start by selecting the CSV file. Do not run auto-design.
• Drag all the key figure columns from the Data Sources pane into the Measures pane. Ensure that the
aggregation rule for each measure is correctly defined within Transformer to align as closely as possible
with the aggregation rule defined in SAP BW.
• It is recommended that the storage type for all measures be set to 64-bit floating point.
• Using the date wizard, select a query item that will provide the dates for the PowerCube. Note that the
dates for the PowerCube can be derived entirely from the transaction data.
• Insert the various CSV files corresponding to the characteristics that were externalized using
Framework Manager.
Each CSV file contains a column that corresponds to a column in the key figures CSV file. By right-
clicking the various columns and editing the column properties, ensure the columns that provide the
linkage between a characteristic and the key figures have the same name. For example, if a key figure
column is named Customer and the corresponding column in the customer CSV file is named Customer
- Key, then the name of the column in the key figures CSV file can be changed to Customer - Key.
• For each characteristic, create a new dimension, using the key columns, or other attributes of a
characteristic, to drive the levels of the dimension. For each level, ensure that the properties for the
label, short name, and description are assigned source columns, if applicable.
• For the root level of each characteristic (dimension), ensure it is marked as unique.
• SAP BW presentation hierarchies may contain ragged paths, typically in association with the "not
assigned" and "#" nodes in the hierarchy. The gaps in these hierarchies produce blanks at the
associated level in the Transformer hierarchy.
In Transformer, it is possible to define the text that should be used for blanks. The default text is blank,
but you should define a more appropriate text for blank entries for all such levels.
Appendix C. Guidelines for Working with SAP BW Data for Use in Transformer 337
338 IBM Cognos Framework Manager Version 11.1.0 : User Guide
Appendix D. Reserved words
You must ensure that the names of data sources, tables, and columns do not use names reserved by IBM
Cognos software.
If you must use a reserved word, enclose the word in quotes in the SQL specification. For example,
select Orderdate, "Timezone".
The following words are reserved:
The following are also reserved words: _cursor, _local and _rowset.
340 IBM Cognos Framework Manager Version 11.1.0 : User Guide
Appendix E. Supported SQL data types
The IBM Cognos Analytics query service supports the standard relational data types that represent
numeric, character, or temporal values.
When data modules and models are built, and queries are planned and executed, the data source is
required to describe the column metadata, such as the data type, precision, scale, and nullability, to
the query service. This includes columns in tables or views that are returned by a query or passed as
parameters to procedures, functions, or query parameters. The query service maps the source column
data types to the types that it supports. If the source data type is not supported by the query service, the
query service treats it as an unknown type.
The following list shows the data types that are supported by the query service:
Precise and imprecise numeric types
The following precise numeric types are supported: smallint, integer, bigint, decimal, and decfloat.
The following imprecise numeric types are supported: float (real treated as float), and double
precision.
When database vendors support numeric data types that are equivalent to the types that the query
service supports, the query service easily maps the source data types to the types that it supports.
When database vendors use a general "number" data type, where the range of values that a column
or parameter can hold is determined by the column precision and scale, the query service must
determine which of its built-in data types to use for the mapping. The query service assigns the data
type based on the precision and scale of the metadata. For example, a column in ORACLE that is
described as NUMBER(3) is mapped to the smallint type. Columns with higher precision are mapped
to larger precise (integer, bigint, or decimal) or imprecise (double precision) data types. For very large
numeric values, the query service can use the decfloat data type.
For more information, see ibmcognos.decfloat.
Character types
The following types are supported: char, varchar, clob, national char, national varchar, and national
clob.
Character large objects (clob) can hold large strings and impose restrictions on how they can be used
in a query. For more information, see the ibmcognos.maxvarcharsize parameter in Managing IBM
Cognos Analytics.
The maximum length of a character string supported by dynamic query is 64 KB.
Datetime types
The following types are supported: date, time, time with time zone, timestamp, and timestamp with
time zone.
Interval types
The following types are supported: interval year to month, and interval year to second.
Logical types
The supported type is Boolean.
The query service does not return the Boolean type to reports or dashboards.
Unknown types
The query service might not support a data type that is an equivalent of the source data type. A
Framework Manager model or a data module that include columns with such data types show the type
as an unknown data type. The query service can't perform any local query processing on values with
the unknown data type, and the values can't be displayed in reports and dashboards.
A column of an unknown type can be referenced in expressions (calculations or filters) that are
processed by the underlying data source. For example, a table includes a spatial column. A report or
model might include a detail filter that the data source uses to evaluate if a customer is located within
a distance from the specified spatial value. The data source must evaluate the expression in the filter.
If a table includes a bit string column, the report or model that uses the column can include an
expression to convert the bit string to a type, such as integer, that is supported by the query engine.
The expression must be supported by the data source.
Some data sources are supported through a vendor JDBC driver. In such cases, it might be possible to
automatically convert the type and values of a built-in data type into a type that is supported by the
query service. The query service would not be aware of the original data type. For more information
about mapping the vendors built-in data types to JDBC data types, see the applicable SQL reference or
programming guides from the vendors.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of
express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of
the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the
exchange of information between independently created programs and other programs (including this
one) and (ii) the mutual use of the information which has been exchanged, should contact:
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this document and all licensed material available for it are provided by
IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any
equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be
the same on generally available systems. Furthermore, some measurements may have been estimated
through extrapolation. Actual results may vary. Users of this document should verify the applicable data
for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
If you are viewing this information softcopy, the photographs and color illustrations may not appear.
Depending upon the configurations deployed, this Software Offering may use session and persistent
cookies that collect each user's
• name
• user name
• password
for purposes of
• session management
• authentication
• enhanced user usability
• single sign-on configuration
• usage tracking or functional purposes other than session management, authentication, enhanced user
usability and single sign-on configuration
These cookies cannot be disabled.
If the configurations deployed for this Software Offering provide you as customer the ability to collect
personally identifiable information from end users via cookies and other technologies, you should seek
your own legal advice about any laws applicable to such data collection, including any requirements for
notice and consent.
For more information about the use of various technologies, including cookies, for these purposes, see
IBM's Privacy Policy at https://www.ibm.com/privacy/us/en/.
A bridge tables
creating in a model 278
accessibility features description 52
keyboard shortcuts 325 broken reports 220
accessing business layer 45
secured InfoCube 157 business rules for relational metadata
action logs macros 130
running in batch mode 241 parameters 128
adding session parameters 127
business rules for SAP BW metadata 192 business rules for SAP BW metadata
data source functions 256 calculations 192
function sets 256 filters 194
groups 209 business view 45
languages for relational metadata 101 business view for relational metadata
languages to packages 214 folders 146
object security 212 namespaces 146
roles 209 business view for SAP BW metadata
users 209 folders 202
additive 111, 180 namespaces 202
aggregation shortcuts 201
rules for relational metadata 107, 109–111 shortcuts and dimensions 202
rules for SAP BW metadata 178, 180, 181
types 180
types for relational metadata 111
C
aggregation rules 111 cached data
Aggregation Rules property reusing 255
relational metadata 107 caching
aliases in-memory 273
using with parameters 198 calculated aggregations
analyzing relational metadata 109
problems 1 calculated key figures 157
publishing impact on packages 234 calculations
applying creating for SAP BW metadata 192
filters for SAP BW metadata 197 security 212
Architect XML files cardinality
importing 39 1-1 297
As View SQL 1-n 297
model query subjects 81 redefining 49
attributes 82, 93, 163, 169, 170 catalog 259
auditing 222, 234 categories
auto save for verifying 205
options 10 changes in model not in report 220
automatic aggregation types changing
relational metadata 110 metadata 232
SAP BW metadata 180, 181 changing packages
analyzing the effects 234
B characteristic
mapping to Framework Manager 162
balanced hierarchies 85, 165 characteristic dimensions
BLOB 248 externalizing 334
BmtScriptPlayer characteristic structures 159
syntax 241 checking
branches projects 205
creating 225 choosing
branching query processing 254
methodologies 223 clearing
projects 223 object security 212
Index 347
Cognos PowerCubes, See IBM Cognos PowerCubes D
comparing tables 67
complex expressions data
relationships 50 formatting for SAP BW metadata 181
Composite stored procedures 58 security 209, 210
conditional query subjects 198 using multilingual 98
conformed dimensions data extraction
creating 67 SAP BW guidelines for variable usage 329
multiple facts 294, 298 data formats
connecting to multiple PowerCubes 30 date and time symbols 316
connections between decimal format symbols 322
dimensions 95, 171 using patterns 315
query subjects 67 data source
content manager data source 259 adding functions 256
Context Explorer 67, 95, 171 updated by stored procedure 58
controlling data source connections
access 209 creating 33
SQL generation 247 dynamic query mode 262
converting isolation levels 31
measures into query items 92 OLAP cubes 30
model query subjects into data source query subjects data source functions
75 adding 256
query items into measures 119 data source query subjects
regular dimensions 89 definition 5
copying data source query subjects for relational metadata
projects 232 using parameters 128
count distinct 107 data sources
creating Architect XML files 39
branches 225 connection levels 31
calculations for SAP BW metadata 192 connections 33
dimensions for relational metadata 82, 93 DecisionStream 39
dimensions for SAP BW metadata 163 IBM Cognos models 38
filters for SAP BW metadata 194 importing metadata 29
folders for relational metadata 146 Impromptu XML files 39
folders for SAP BW metadata 202 modifying properties 259
links 230 multilingual 100
measure folders for relational metadata 148 properties 168, 254
namespaces 43 SAP BW 157
namespaces for relational metadata 146 database functions
namespaces for SAP BW metadata 202 vendor-specific 256
packages 207 database layer 45
parameter maps for SAP BW metadata 198 database only 254
projects 5, 24 date
prompts with query macros 133 format type 181
query item folders for relational metadata 147 prompts 116, 184
query sets for relational metadata 67 date prompts 182
query subjects for relational metadata 57, 58 DecisionStream
query subjects for SAP BW metadata 174 importing 39
regular dimensions for relational metadata 89 default data set
relationship shortcuts for relational metadata 50 setting 237
relationships for relational metadata 50 defining
segments 229 function sets 256
cross-product joins 247 languages for relational metadata 101
crowsfeet notation 12, 24 prompt controls for SAP BW metadata 182
csv files 215, 216 deleting
CSVIdentityName function 211 projects 233
CSVIdentityNameList function 211 dependencies, object 235
cubes 259 dependencies, report 235
curly brackets 130 detailed fact query subject 327
currency detailed key figures 327
format type 181 determinants 61
custom properties Diagram tab 11
SAP BW 187 diagrams
custom relationship expressions 49 settings 12, 24
Index 349
finding Grouping of Measure Attributes (continued)
objects 14 governor 250
fixing groups
failed transactions 227 adding 209
FMMD_ModelUpdate utility
changing the case of names in a model 309
custom XSLT stylesheet 312
H
metadata callbacks 313 hierarchies
running 310 balanced 85, 165
folders network 86, 168
creating 146, 148 ragged 86, 166
measure 148 SAP BW 159
query item 147 specifying roles 93
folders for SAP BW metadata time-dependent 160
creating 202 unbalanced 86, 166
using shortcuts 201 versioned 160
font
settings 12, 24
format types I
currency 181
IBM accessibility page 326
date 181
IBM Cognos 8 Planning and SAP BW data 327
text 181
IBM Cognos models
formatting
importing 38
data for SAP BW metadata 181
IBM Cognos PowerCubes
Framework Manager
publishing 218
project 3
import view 45
function set ID 259
importing
function sets
Architect XML files 39
adding 207, 256
DecisionStream 39
defining 256
duplicate object names 35
functions
IBM Cognos models 38
project 256
Impromptu XML files 39
metadata from data sources 29
G metadata into Framework Manager 34
SAP BW hierarchies 159
generating SAP BW metadata 157, 161
models, using Model Design Accelerator 26 SAP HANA metadata 36
governor translation tables for relational metadata 102
Allow Dynamic Generation of Dimensional Information Impromptu Query Definition files 216
252 Impromptu XML files
Allow Enhanced Model Portability at RunTime 252 importing 39
Allow Usage of Local Cache 252 improving performance
Cross-Product Joins 249 reusing cached data 255
Grouping of Measure Attributes 250 in_range function 194
Maximum External Data File Size 253 InfoCube
Maximum External Data Row Count 253 mapping to Framework Manager 162
Maximum External Data Sources 253 permissions for accessing metadata 157
Maximum Number of Report Table 248 InfoCube key figures
Maximum Number of Retrieved Rows 248 externalizing 334
Outer Joins 248 Informix
Process Entire Model When Publishing 253 functions 58
Query Execution Time Limit 248 stored procedures 58
Shortcut Processing 249 intersect all query set 67
SQL Generation for Determinant Attributes 251 intersect query set 67
SQL Generation for Level Attributes 250 IQD
SQL Join Syntax 249 files 216
SQL Parameter Syntax 251 isolation levels 31
Suppress Null Values for SAP BW Data Sources 252
Use With Clause When Generating SQL 252
governors J
allow usage of local cache 255
joins
dynamic query mode 265
creating 23
setting 247
deleting 23
Grouping of Measure Attributes
Index 351
Model Design Accelerator (continued) moving
generating models 26 metadata 232
joins 23 projects 233
managing star schemas 26 multi-edge suppression 215
Metadata Wizard 24 MultiCube
Model Accelerator 22 mapping to Framework Manager 162
Model Warning View 24 multilingual
Query Subject Diagram 23 data sources 100
Relationship Editing Mode 23 data, using 98
model documentation 222 multilingual modeling
model objects example for relational metadata 103
using parameters 198 packages 214
viewing 7, 21 parameters 100
model portability 238, 247 relational metadata 98
model query subjects multilingual reporting environment
definition 5 setting up 98
externalizing 333 multilingual reports 99
security 212 multiple cubes in packages 218
model query subjects for relational metadata multiple data sets
creating 57 setting default data set 237
creating from existing objects 66 multiple data source connections
SQL type 81 using 30
model query subjects for SAP BW metadata multiple users
creating 174 modeling 222
creating from existing objects 175 multiple-fact queries 294, 298
model session parameters multiple-grain queries 294, 298
relational metadata 127 multiuser modeling 222, 223
SAP BW metadata 199
model versioning 220
model versions
N
updating 216 namespaces
Model Warning View 24 creating 43
modeling creating for relational metadata 146
data sources 100 creating for SAP BW metadata 202
distributed models 222 definition 4
main projects 222 naming conventions
multilingual 100 objects 16
multiuser 222, 223 native metadata 30
models nested parameters 198
definition 4 network hierarchies 86, 168
FMMD_ModelUpdate utility 309 non-additive 111, 180
generating, using Model Design Accelerator 26 notation 12, 24
migrating from one relational database to another 238 null suppression 215
preparing relational 45 null values
preparing SAP BW metadata 157 SAP BW 247
publishing 205 nulls
sample 17 suppressing 274
upgrading 6, 309 number sign
upgrading segmented and linked projects 309 reserved for macros 130
verifying 205
versioning 216
modifying O
filters for SAP BW metadata 194
object security
packages 207
adding 212
properties 13
calculations 212
query item properties 13
filters 212
query items for relational metadata 104
model query subjects 212
query items for SAP BW metadata 176
removing 212
relational dimensions 13
shortcuts 212
relational query subjects 13
objects
relationships 49
exploring 11, 22
session parameters 127, 199
naming conventions 16
SQL at runtime 133
properties 13
stored procedure query subjects 58
Index 353
properties (continued) query subjects (continued)
parameter map 259 Impromptu Query Definition files 216
prompt info 182 properties 13
prompt type 116, 184 searching 14
query interface 259 security 210
query processing 259 tab files 215, 216
query type 259 testing 42
regular aggregate 107, 178 transaction modes 256
rollup processing 259 Transformer files 216
SAP BW data source 168 query subjects for relational metadata
SAP BW variables 168 converting 75
schema 259 converting from dimensions 89
semi-aggregate 178 creating 57, 66
transaction access mode 259 evaluating 73
transaction statement mode 259 exploring 67
usage 107, 178 generating SQL 80
use item reference 117, 185 modifying 13, 58
viewing 13 query sets 67
publishing stored procedure 57
metadata 205 testing 70
packages 205, 216, 220 updating 74
packages based on OLAP data sources 218 query subjects for SAP BW metadata
creating 174, 175
evaluating 175
Q parameter maps 198
queries query type 259
multiple-fact 294, 298 Query, SAP BW
single fact 293 mapping to Framework Manager 162
split 304 quotation marks
query items in expressions 130
converting 92, 119 in macros 130
definition 5
properties 13 R
query items for relational metadata
aggregation rules 111 ragged hierarchies 86, 166
durable model capability 234 recording transactions 239
folders 147 regional settings
modifying 13, 104 setting up a multilingual environment 98
renaming 234 Regular Aggregate property
roles 93 relational metadata 107
usage 111 SAP BW metadata 178, 180
query items for SAP BW metadata regular dimensions for relational metadata
aggregation 180 converting 89
aggregation rules 180 exploring 95
formatting 181 levels 88
modifying 176 merging 89
roles 169, 170 regular dimensions for SAP BW metadata
usage 180 exploring 171
query macros levels 168
using to create prompts 133 related objects 67, 95, 171
query processing relational data source query subjects
choosing 254 evaluating 73
query reuse 255 updating 74
query sets for relational metadata relational metadata
creating 67 business view 45
testing 70 import view 45
Query Subject Diagram 23 query items 104
query subjects relational models
building using Model Design Acclerator 26 migrating 238
csv files 215, 216 Relationship Editing Mode 23
definition 5 relationships
embedded files 215, 216 1-n 297
exploring 11, 22 changing 49
externalized 215, 216 complex expressions 50
Index 355
sparse data T
semi-additive measures 111
split queries 304 tab files 215, 216
SQL tasks
As View 80, 81 viewing 14
generation types 80 testing
Minimized 80, 81 changing settings 72, 97, 173
model query subjects 81 projects 205
SQL generation prompts 119, 187
controlling 247 query subjects 42
SQL Generation for Determinant Attributes relational measure dimensions 95
governor 251 relational query sets 70
SQL Generation for Level Attributes relational query subjects 70
governor 250 relational regular dimensions 95
SQL Parameter Syntax SAP BW measure dimensions 171
governor 251 SAP BW regular dimensions 171
square brackets 130 text box prompts 116, 182, 184
star schemas text format type 181
creating using Model Design Accelerator 25 time limits 247
managing using Model Design Accelerator 26 time prompts 116, 182, 184
statistics trace
viewing 14 transaction history 239
stored procedure query subjects transaction access mode 256
Composite 58 transaction access modes
creating 58 stored procedures 278
definition 5 transaction history
evaluating 73 viewing 239
example 60 transaction statement mode 256
Informix 58 transactions
modifying 58 fixing 227
updating 74 mode 256
stored procedures play back 240
data query updates database 58 Transformer
transaction access modes 278 SAP BW 333
structures Transformer and query subjects 216
SAP BW 159 Transformer version 7.x
summaries externalized CSV files 333
viewing 14 Transformer version 8.x
summarize aggregations externalized CSV files 333
relational metadata 110 translation tables
summary queries exporting 102
creating in a model 277 importing 102
supported environments type-in prompts 116, 182, 184
multilingual 98
supporting
multiple users 222
U
suppressing unbalanced hierarchies 86, 166
nulls 274 understanding
suppression metadata 221
multi-edge 215 union all query set 67
null 215 union query set 67
suppression options 215 unique identifiers
synchronizing objects 16
fixing errors 243 updating
linked projects 246 model versions 216
metadata 245 query subjects 74
projects 245 upgrading
query subjects 74 models 6
segmented projects 245 Usage property
syntax relational metadata 107, 111
BmtScriptPlayer 241 SAP BW metadata 178, 180
users
adding 209
packages 207
V
validating
relational query subjects 73
SAP BW query subjects 175
variables
guidelines for SAP BW fact data 329
SAP BW 187
stored procedure 60
using when externalizing 336
vendor-specific database functions 256
verifying
models 205
packages 205
versioned hierarchies 160
versioning
models 216
viewing
diagrams 11, 22, 23
model objects 7, 21
package inclusion 222
properties 13
related objects 67, 95, 171
statistics 14
summaries 14
tasks 14
W
With clause 247
X
XQE-PLN-0309
errors 278
Index 357
358 IBM Cognos Framework Manager Version 11.1.0 : User Guide
IBM®