Vous êtes sur la page 1sur 40

Introduction to Framework Manager

Framework Manager is a metadata modelling tool for Cognos 8. It is used to model the business presentation of data from one or more data sources. When we add Security and Multilingual capabilities to this Business presentation, one model can serve the reporting, ad hoc querying, and Analysis needs of many groups of users around the globe. Role of a Cognos 8 Metadata Model A Cognos 8 metadata model is business presentation of information from one or more data sources. BI users use the model to analyze and report on their data sources. Reporting Layer

Cognos 8 Metadata Model

What is a model?



When a report is created in Cognos 8 Report Studio, how does IBM Cognos 8 BI know about the data? How does it connect to the databases, and how does it know what the tables and data items are and how they relate to each other? The model, created by the BI Administrator using FM, is the framework that exposes the metadata that describes the source to the Cognos Studio users Objects that Make up the Model Project: The top-level object that contains all the other objects in the model .

Folder: A container to improve the organization of the model. It appears as a folder for report-writers using the published model but does not offer the naming protection of namespaces. Namespaces:. They are containers like folders. Objects in a Framework Manager project must be uniquely identifiable. If there are two objects that have the same name, they must reside in two separate namespaces

Query subjects: A query subject is a set of query items that have an inherent relationship. It could be as simple as all the columns of a single table, or it could be more complex, with columns from multiple tables, filters, calculations, SQL logic.

There are 3 types of Query subjects: Data Source: It is a SQL select statement that specifies the columns and table(s) to be pulled into the model. Model: These 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, businessoriented view of a data source. Usually, model query subjects are created in the business view, not the import view. Stored Procedure: This is simply a definition that specifies a stored procedure coded within the data source that returns a tablelike result set. Query Item: A column in a query subject, which can be an actual column or a calculation.

Relationship: They specify which fields in the two query subjects are related, how they are related.

Data Source: The data source definition allows FM to connect to the database and query it for the available metadata-that is, the tables and columns that can be accessed from the database.

Parameter Map: A simple, two column table that is stored in the model and used in conjunction with the FM macro facility to substitute values in the model at runtime of a report to get the desired results.

Package: A package is a subset of a project. It must contain all the information that a specific user or group of users needs to create reports.

Work Flow of FM Model Development


Create Project

PrepareMetada ta
Set Security

Model metadata&Prep are The Business View


Create And Manage Package

Content Store

Cognos Connection Report Studio Query Studio Analsys Studio Event Studio

Framework Manager UI It consists of mainly: Project Viewer shows the objects in a project in a hierarchical view. It is used to view, modify and create objects. Diagram View shows the hierarchy and relationships among objects in project in a diagram.

Project Viewer

Diagram View

Context Explorer shows the visual representation of the objects that are connected to a query subject or dimension that is selected in the Project viewer. Properties pane Here we can view and modify the properties of the objects last selected in the Object Explorer view, Diagram view, Project viewer, or Search pane. Summary pane shows the statistics and tasks available for a selected object: Statistics section shows the number of objects, by class, located in the currently selected object. Tasks section shows actions that are applicable to the currently selected object, based on the object class. Examine Framework Manager UI Open Windows Explorer and Go to [Install Location] Navigate to Cognos\c8\webcontent\samples\Models Copy Go_Sales Folder into C:/CognosTraining/Model folder. From the Start menu, point to All programs, Cognos 8, and then Click Framework Manager. Under projects, click a open project, and in the location box, Specify the path C:/CognosTraining/Model/ go_sales. Select go_sales.cpf and then click OK. The logon page appears, type the Username and Password, and then Click OK. The Select Languages dialog box appears. Set the default and design language for this project as English. View various components of Framework Manager Create Project Before creating a FM project: Analyze and understand reporting requirements Understand the data and structure of the data source(s) To create the FM project: Name a project and establish the file system location for project files. Import the required metadata.

Prepare Metadata
To prepare the model for reporting, we must evaluate and, if necessary, modify the imported metadata. Create relationships between two data sources or examine and modify relationships such as ambiguous relationships Examine and modify object properties, such as name, description, usage, and aggregate rule. Dynamically control data returned at runtime by creating filters, calculations, prompts, macros, and by directly editing query subject SQL.

Select Metadata Source. Select the Data Source from the list or Create a new Data Source if required. Select the objects you want to import. Create Project Open Framework Manager from Start Menu.

Click On Create a New Project.

Rename the Model as Sales Model

Click on OK

Rename the Namespace

Create and Verify Relationships A Relationship in Cognos 8 defines how two query subjects relate, or refer, to each other. For instance ,Product query subject that has a row for each product and includes the product number and the product name and Order Details query subject contains line items for sales orders, and each line refers to the ordered product by the product number, along with the quantity ordered and the amount of the sale. If we need a report that lists the product names and the quantity ordered, we need to pull the product name and quantities ordered from respective Query subjects. The way we communicate Cognos 8 how orders relate to products is by defining relationship between the two Query subjects. STEPS TO CREATE RELATIONSHIP

Select Create Relationship

Cardinality A component of Relationship is the cardinality, which tells the relationship how many rows from one of the query subjects defined in the relationship are expected to match a row in the query subject on the other side of the relationship. Cardinality can be expressed as one of the following: 0..1 Zero occurrences to multiple occurrences 1..n One occurrences to multiple occurrences 0..1 Zero occurrences to one occurrences 1..1 Must have one occurrences The Query engine behind Framework Manager can resolve the concept of min/max and optional state of cardinality. Min/max (1/n) Optional or mandatory (0 or 1)

Click OK

Create Calculations Formulas for creating a new data item from zero or more data items, which can be constants, simple constructs such as function calls or mathematical operations, or complex constructs with mathematical logic. Calculations often exist within a query subject definition as just another query item, also stand-alone calculations can be created which is placed in a folder or namespace.

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 standalone 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.


Create Filter Purpose: To create reusable filters for the Camping Equipment and Mountaineering Equipment product lines.

Set Security
To secure access to Cognos Applications, we must implement a security strategy that involves user authorization. Package Security: It defines who can access the package to author and run reports, and who can administer the package to publish it and set permissions for it. Object Security: It is used to set explicit allow or deny access to folders, namespaces, query subjects, query items, and so on. This means that for any object in the model, we can specify which users, groups, or roles can access it. Data Security: It enables the users to create their own reports and analyses while keeping certain information confidentiality.

Publishing the Model

Publishing is the act of making the model available in the Cognos BI suite to support generating content, such as reports, based on your model. What we publish is a package, which consists of the objects in the model that is chosen to publish for use by end users. A package is a subset of objects in the model that is exposed to the end users so that they are able to create their own content in reports and events.

Model Versioning
It is a handy facility that enables to publish a new version of the model without worrying about breaking existing reports. Reports and other content are written against the latest version of the model at the time that content is created. If changes to the model are published subsequently, the existing reports will continue to reference the version against which they were created, as long as that version exists. Through versioning, then, we can publish new version to support new reports as soon as possible. We can then go back and check reports against the latest model version, fixing them as necessary until all content is validated on that version. Tip: To see which reports are impacted by changes to the model, select the package in the Project Viewer tree and then choose Actions | Package | Analyze Publish impact.

Publish model and Set Security Create new Package

Data Security

Object Security

Dimensionally Modelled Relational Model One of the most powerful, and cool, feature of Framework Manager is its ability to model relational data so that it appears dimensional to the Cognos 8 Studios and to the users. Dimensional data provides the report author and analysis user with the ability to quickly navigate through large amounts of data while, at the same time, exploring multiple aspects of that data

Regular Dimensions Regular dimensions can be things like product, customer, date, geography, sales person, or anything that describes the data. They are layered objects; they have hierarchies, hierarchies have levels, and finally, levels have mandatory and optional attributes

A Hierarchy defines how the levels in your regular dimension relate to each other.In the above slide there are 4 levels. From the lowest level to the highest these are: Product, Product type, Product Line, and Product (All). Product will rollup to Product types, which rollup to Product Lines, and Product Lines rollup to the artificial level Product(All). Levels in a dimension must contain an attribute that takes on the role of the businesskey; that is,it uniquely identifies a member for that level.

In the above slide, the product level has a businesskey of Product number. Levels also must contain an attribute that takes on the role of labelling the members for the level. This role is called the memberCaption.The memberCaption is commonly a text description as opposed to the business key. In some cases the businesskey role and the memberCaption role can be applied to the same attribute. The Unique level checkbox in Dimension Definition screen must be checked for any level that has a business key that uniquely identifies the row of data, even if the key repeats in the data. This specifies that the level's key does not need the parent key to identify it. For Eg: checkbox is cleared if the month key is 1 through 12, since year keys are also needed 2005, 2006, to uniquely identify month 1-2005, 2-2005, 3-2005 and so on.

Measure Dimensions
Regular dimensions provide context to the measures. Measures are the items that we count, also called facts, metrics, or key figures. Sales, Sales Target, Inventory levels are all examples of measures. Measure dimensions are much easier to understand than regular dimensions because there are no hierarchies, levels, and so on.

Scope Relationships. The Scope Relationship defines which measures are in scope for which dimensions and at which level for a hierarchy. For E.g. Suppose you sell cookies every day of the year and, of course, you are interested in how those cookies are selling. In this case, the cookies sales measure is in scope down to the day level of the Time hierarchy. When you talk about cookies sales per day, it makes sense. Suppose you set a sales target for cookies and your goal is to sell one crore cookies per month. The cookies sales target is in scope only down to the month level of the Time hierarchy, not the day level.