Вы находитесь на странице: 1из 81

Capacitación

IBM Cognos
Framework Manager
®

Overview of IBM Cognos 8 BI

IBM Cognos 8 BI

© 2008 IBM Corporation


IBM Cognos 8 and Performance Management

 Good decisions are the building blocks of great


business performance.
 Understand and improve your business based on:
 How are we doing?
 Why?
 What should we be doing?

 IBM provides performance management through


software, services, best-practices, and partners.
IBM Cognos 8 BI Components
IBM
Cognos Query Report Analysis Event Metric
Cognos Admin
Viewer Studio Studio Studio Studio Studio
Connection

Framework Manager Transformer Metric Designer

IBM
Files Cognos 8
Dimensional Relational Other
Content
IBM Cognos 8 Architecture (high level)
Web-based (IBM Cognos Connection)
IBM Cognos 8
user interfaces Windows-based (Framework Manager, Transformer, Metric Designer)
SDK

Web server
Tier 1: Web server (IBM Cognos 8 gateway)

Tier 2: Applications IBM Cognos 8 server

Tier 3: Data IBM Cognos 8 IBM Cognos 8


Files
Content Store Metric Stores
Query Data Sources
IBM Cognos 8 Groups and Roles
 IBM Cognos 8 provides default groups and roles for
security such as:

System
Administrators

Authors,
Query Users,
Analysis Users

Consumers,
Readers
®

Identify Common Data


Structures
IBM Cognos 8 BI

© 2008 IBM Corporation


Examine the Role of an IBM Cognos 8
Metadata Model
 An IBM Cognos 8 metadata model provides a business
presentation view of an organization’s data sources.
 BI users use the model to analyze and report on their data
sources.
Reporting Layer

IBM Cognos 8 Metadata Model

Relational Files Other


Cubes
Distinguish Between Operational and
Reporting Databases
 Relational databases are typically either:
Operational Reporting
Customer Sales Product
Type Area Line Sales
1..1 1..1 1..1 Rep
1..1
1..n 1..n 1..n
0..n

Customer Sales Product 1..1 Order 1..1


Rep Type Customer 0..n Fact 0..n Product
1..1 1..1 1..1
0..n
1..n 1..n 1..1

Order Product
1..n
Header Date
1..1 1..1
1..n

Order
Detail 1..n
Identify Features of an Operational Database
 Operational databases:
 are designed to maximize accuracy and minimize
redundancy
 are optimized for writing and updating data rather
than reading data
 often result in monolithic designs with multiple
joins
 Large queries can perform slowly.
Identify Issues with Operational Databases
 “Show all customer types Customer Sales Product
that bought from a product Type Area Line
1..1 1..1 1..1
line.” 1..n 1..n 1..n

 The query must check data Customer Sales


Rep
Product
Type
in seven tables before 1..1 1..1 1..1

returning a result set.


0..n 1..n

Order Product
0..n
Header
1..1 1..1
1..n

Order
Detail 0..n

Query requires 7 tables


Examine Reporting Databases
(Star Schema Design)
 Transactional data is stored in a fact table
 Reference data is stored in separate dimension tables
Sales
Rep
1..1
0..n

Customer
1..1 Order 1..1
0..n Fact 0..n Product
0..n
1..1

Date

Query only requires 3 tables


Create a Star Schema
 Collapse the relationships to form dimensions
(perspectives). Customer Sales Product
Type Area Line
1..1 1..1 1..1

1..n 1..n 1..n

Sales Product
Customer Rep Type
1..1 1..1 1..1
Sales
Rep 0..n 1..n

1..1 Order
0..n
0..n
Header Product
1..1 Order 1..1 1..1 1..1
Customer 0..n Fact 0..n Product 1..n

0..n
1..1 Order
Detail 0..n

Date
Examine Operational Data
 Data is normalized
Product Line Table Product Type Table Product Table

PL# PL_Desc PL# PT# PT_Desc PT# Prod# Prod_Desc


a Classic Tents a 1 Pup Tents 1 101 1 Sleeper
b Moose Boots a 2 Family Tents 1 102 2 Sleeper
2 rows b 11 Child Boots 2 201 4 Sleeper
b 12 Adult Boots 2 203 6 Sleeper
4 rows 11 1101 Wet Proof
12 1102 Hikers+
6 rows
Before collapsing into a star schema dimension
Examine Reporting Data
 Data is de-normalized
Product Dimension Table

PL# PL_Desc PT# PT_Desc Prod# Prod_Desc


A Classic Tents 1 Pup Tents 101 1 Sleeper
A Classic Tents 1 Pup Tents 102 2 Sleeper
A Classic Tents 2 Family Tents 201 4 Sleeper
A Classic Tents 2 Family Tents 203 6 Sleeper
B Moose Boots 11 Child Boots 1101 Wet Proof
B Moose Boots 12 Adult Boots 1102 Hikers
6 rows

After collapsing into a star schema dimension


Examine Fact Tables
 Fact tables contain the (usually additive) values by
which a company measures itself:
 Standard Selling Price - not additive
 Sale Amount - additive

Dimension Tables
Fact Table Product

Sales Revenue
Measures Quantity
………………………. Customer
Product Key
Foreign Keys Customer Key
Time Key Time
Examine Dimension Tables
 Dimension tables provide descriptive information.
 Dimension tables may be “conformed” so that they
are applicable to multiple fact tables across the
business. Dimension Dimension
Product Warehouse
Fact Fact
Sales Inventory

Dimension Dimension
Customer Time

Conformed Dimensions
Identify Issues with a Star Schema
 Data is only as current as the last data load.
 Structural issues:
 the distinct count problem
 very large dimension tables
 snowflakes
 Fact issues:
 different levels of granularity (detail) in fact tables
Define Relationships
 Specify how data in one table is linked to data in
another table.
 Relationships are implied in the physical data
(modeler explicitly declares these relationships)
 Modeler formulates the reality of the business by
configuring the relationships
Examine Relationships: Cardinality
1..1 Security  One-to-One: One employee
Employee
1..1 Number holds exactly one security
number.

 One-to-Many: Each order


Order 1..1 Order
Header 1..n Details header must have one or more
order details.

 Many-to-Many: Each part may


1..n be provided by many
Part Supplier
1..n suppliers, and each supplier
may provide many parts.
Examine Relationships:
Optional vs. Mandatory
 Relationships may be mandatory or optional.
 For example, a product may exist even if it has not
been ordered, but an order must refer to at least
one existing product.
 It is important to determine if certain relationships
are optional.
 For example, is there a reporting requirement to
list sales representatives who have sold nothing?
Examine Relationships: Data Traps
 There are four basic data traps:
 chasm trap (many-to-many relationship)
 transitive relationship trap (more than one path
between two tables)
 connection trap (an optional path through
different entities)
 fan trap (multiple one-to-many relationships that
fan out from a single table)
Examine Chasm Traps
 Many-to-many relationship
 Structure cannot record and maintain data (it lets
the information fall into a chasm)
 Not incorrect when designing at a high level (it just
does not show all the necessary details)

Which suppliers
1..n
Supplier Part provide which
1..n
specific parts?
Examine Transitive Relationships
 Exists if there is more than one path between two
tables

1..1
Customer 0..n
Order

1..1 1..1 Can an order exist


Can a customer without an order
1..n
exist without an detail?
order detail? 0..n Order
Detail

Which relationship is redundant: the one


between Customer and Order Detail, or the one
between Order and Order Detail?
Examine Fan Traps
 Identified by multiple one-to-many relationships that
fan out from a single table

1..1 1..1
Division

1..n 1..n

Branch Employee

Is there a direct relationship between Branch and Employee?


Examine Connection Traps
 Is there an optional path through different entities?
 There must be a reliable path through all truly related
entities

What is the relationship between Branch and Employee?

If an employee does not work for a branch, do they


work for a division?

1..1 1..1
Division 1..n
Branch 1..n
Employee

1..1 1..n

???
®

Create a Baseline Project

IBM Cognos 8 BI

© 2008 IBM Corporation


What is Framework Manager?
 Provides the metadata model development environment for
IBM Cognos 8
 Used to create simplified business presentations of metadata derived
from one or more data sources
Simple Business
Complex Data Source Presentation
What is Framework Manager? (cont’d)
 Can create two model types:
 relational for reporting
 dimensionally modeled relational (DMR) for OLAP-
style analysis and reporting

Relational Dimensional
Model Model
Define a Framework Manager Project
 At the highest level, objects in a project include:
 a model organized
into namespaces
and folders
 data sources
 parameter maps
 packages
Define Framework Manager Metadata
Elements
 Metadata is defined and organized by the following
elements: Model Measure
Query Subject Dimension

Data Source
Query Subject

Regular
Dimension

Query Item

Relationship
(scope
relationship
Shortcut
for dimensional
objects)
Examine the Model from the Author’s Point of
View
Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Manage
Security
Packages

Report Studio
Query Studio
Data Content
Analysis Studio
Sources Store
….
Import Required Metadata Recommendation #2

Select Object
for Import

Select Select Select Criteria


Select Data Objects to Generate
Import Source to Import Relationships
Source

Import
Create Data
Source
Connection
Generate Relationship Criteria
Requirements Review Recommendation #1

Staff
Retailer by
by Location
Location

Order Sales Product


Method Fact

Time
Import Additional Metadata
Requirements Review Recommendation #1

Staff
Retailer by
by Location
Location

Order Sales Product


Method Fact

Time
®

Prepare Reusable Metadata

IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Manage
Security
Packages

Report Studio
Query Studio
Data Content
Analysis Studio
Sources Store
….
Verify Relationships
 Ensure your model has all required relationships after
import.
 Ensure the join cardinality between query subjects
meet your needs
 0..n - zero occurrences to multiple occurrences
 1..n - one occurrence to multiple occurrences
 0..1 - zero occurrences to one occurrence
 1..1 - must have one occurrence
Mandatory Cardinality Example
Product Type Table
Product Line Table
PL# PT# PT_Desc
PL# Plods
1..1 1 100 Aviator
1 Sunglasses 1..n
1 200 High Fashion
2 Razors
1 300 Prescription
1 400 Children

PL# Plods PT# PT_Desc


1 Sunglasses 100 Aviator
1 Sunglasses 200 High Fashion
1 Sunglasses 300 Prescription
1 Sunglasses 400 Children
Optional Cardinality Example
Product Type Table
Product Line Table
PL# PT# PT_Desc
PL# Plods
1..1 1 100 Aviator
1 Sunglasses 0..n
1 200 High Fashion
2 Razors
1 300 Prescription
1 400 Children

PL# Plods PT# PT_Desc


1 Sunglasses 100 Aviator
1 Sunglasses 200 High Fashion
1 Sunglasses 300 Prescription
1 Sunglasses 400 Children
2 Razors
Verify and Modify Query Item Properties
Recommendation #3

 After import, verify that the metadata represents


the business needs.
 Should Usage for Manager_Code = Identifier,
Fact, or Attribute?
 Should Regular Aggregate for Unit_Price =
SUM?
 Should a prompt on Country Name retrieve
through Country Code?
®

Model for Predictable Results:


Virtual Star Schemas
IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Security Manage
Packages

Report Studio
Query Studio
Data Content
Analysis Studio
Sources Store
….
What are the Advantages of Modeling as a
Star Schema?
 Subject area marts (star schema groupings)
 Simpler for the user to understand - fewer query
subjects
 Adaptable and extendable - you can easily add and
reuse facts and dimensions
 Conformed dimensions prevent data silos - facts are
related to one another through dimensions
Modeling in Layers
 Recommend a Presentation View
Presentation View for
logical groupings
 Choose whether you
?
would like a middle layer
and what to put in it

Foundation
Objects View
Modeling in Layers: No Middle Layer
§ Foundation Objects View Presentation View
contains
§ data source query subjects
§ model query subjects to
resolve issues
§ calculations and filters
§ Appropriate for large projects
§ Can be difficult to maintain
Foundation
§ Not easily portable Objects View
Modeling in Layers: Business Logic View
 Business Logic View contains Presentation View
 all model query subjects,
joined with relationships
 all calculations and filters
Business Logic View
 Provides insulation between data
source and reports
 Less maintenance
 Portable Data Source View

 Longer development time


 Larger project files and model
Modeling in Layers: Consolidation View
 Model query subjects, Presentation View
calculations and filters are
split between Consolidation
View and Foundation Objects
View, based on need Consolidation View
 All relationships are in the
Foundation Objects View
 Compromise between
Foundation
development time and Objects View
maintenance time
 Smaller project size than
Business Logic View method
®

Model for Predictable Results:


Consolidate Metadata
IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Security Manage
Packages

Report Studio
Query Studio
Data Content
Analysis Studio
Sources Store
….
Examine Returns Data
 In the data source returns are related to order details,
and not the required dimensions for reporting

1..1
ORDER_DETAILS RETURNED_ITEM
0..n
Create Virtual Facts Recommendation #5

 Returns Fact needs the same relationships as Sales


Fact.

Sales Fact Returns Fact


PRODUCT_NUMBER PRODUCT_NUMBER
RETAILER_SITE_CODE RETAILER_SITE_CODE
RETAILER_CONTACT_CODE RETAILER_CONTACT_CODE
SALES_STAFF_CODE SALES_STAFF_CODE
SALES_BRANCH_CODE SALES_BRANCH_CODE
ORDER_METHOD_CODE ORDER_METHOD_CODE
ORDER_DATE RETURN_CODE
ORDER_CLOSE_DATE RETURN_DATE
SHIP_DATE ORDER_DETAIL_CODE
Quantity RETURN_REASON_CODE
… RETURN_QUANTITY
Create Virtual Dimensions Recommendation #5
 Add dimensional query items from ORDER_HEADER
and ORDER_DETAILS to create Order Codes.
ORDER_DETAILS ORDER_HEADER
ORDER_DETAIL_CODE ORDER_NUMBER
ORDER_NUMBER RETAILER_NAME
SHIP_DATE 1..n 1..1 RETAILER_NAME_MB
PRODUCT_NUMBER RETAILER_SITE_CODE
Quantity RETAILER_CONTACT_CODE
Unit Cost SALES_STAFF_CODE
... …

Order Codes
1..1 1..1
Order Number
Order Detail Code
1..n Conformed Dimension 1..n
Sales Fact Returns Fact
Consolidate Metadata Recommendation #5

 Foundation Objects View: Presentation View


 holds all the foundation
query subjects and
their relationships
 Consolidation View: Consolidation View

 uses model query subjects


to consolidate metadata
from the foundation query Foundation
subjects for presentation Objects View
 contains filters and
calculations where required
Consolidation Example
 Consolidate a snowflake dimension into one model
query subject for presentation

PRODUCT_
LINE
1..1
1..n
PRODUCT_ Products
TYPE
PRODUCT 1..1 1..1
NAME_LOOKUP 1..n Model
PRODUCT Query Subject
1..1
®

Calculations and Filters

IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Security Manage
Packages

Report Studio
Query Studio
Data Content
Sources Analysis Studio
Store
….
Create Calculations Recommendation #6

 Create calculations to provide report authors


with values that they regularly use.
 Revenue = Quantity * Unit Sale Price
 Calculations can use query items, parameters, and
functions.
 Two types of calculations:
 embedded
 stand-alone
Filter Data Recommendation #6

 Two types of filters:


 embedded
 stand-alone

Embedded filter

Stand-alone filters
Customize Metadata for Run Time
Recommendation #6
 Modify query subjects to dynamically control the
data returned using:
 session parameters
 parameter maps
 macros
IBM Cognos 8 Environment Session
Parameters
 Predefined and stored in the content store database
Parameter Maps
 Used to substitute one value for another
 Keys must be unique

Key Value
Bart Scott 60
Ana Orozco 80
Alex 53
Rodriguez

Source Values Target Values


Macros
Filter Expression

[Sales Target Fact].[Sales Staff Code] =


#$SecurityLookup{$account.defaultName}#
Macro
Session Parameter
passed to parameter map
Parameter Map
Key Value
Bart Scott 60
Ana Orozco 80
Generated SQL
Alex 53
Rodriguez …….
Where
Sales_Target_Fact.Sales_Staff_Code = 60
Dynamically Retrieve Language Column
Recommendation #6

Region calculation =
‘SALES_REGION_’ +
a string based on
user’s locale setting

1. Call runLocale session parameter: en, en-uk, fr, ...


2. Use a parameter map to convert to EN, FR, ...
3. Concatenate the results with a string to form the desired
column name
 SALES_REGION_EN
 SALES_REGION_FR
 and so on
Filter Based on Locale Recommendation #6

PRODUCT_LANGUAGE Filter =
a string based on user’s locale setting

1. Call runLocale session parameter: en, en-uk, de, ...


2. Use a parameter map to convert to EN, DE, ...
3. Use sq macro function to wrap in single quotes: ‘EN’,
‘DE’, ...
®

Specify Determinants

IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Security Manage
Packages

Report Studio
Query Studio
Data Content
Analysis Studio
Sources Store
….
IBM Cognos 8 Determinants
Recommendation #7

 Determinants are a feature of IBM Cognos 8 typically


used to provide control over granularity when
aggregating.
 Required for dimensions connected to facts at levels
of granularity that have repeating keys.
 Other cases requiring determinants include:
 preventing distinct clause on unique keys
 BLOB data types in the query subject
 improving performance on dimensionally modeled
relational (DMR) metadata
Determinants: Time Dimension Example
Recommendation #7
Time Dimension  Time dimensions
MONTH_KEY
may contain
DAY_KEY several levels of
……
granularity (Year,
1..1 Month, Day)
Two levels of
granularity  Use determinants
to specify levels for
1..n
grouping
Sales Target Fact

MONTH_KEY
SALES_TARGET
Specify Determinants
Recommendation #7
Data Set Example #1
Data
Year Key Month Key Month Name Day Key Day Name

2005 200501 Jan 05 20050101 Sunday, Jan 1, 2005

2005 200501 Jan 05 20050102 Monday, Jan 2, 2005

Determinant Settings
Name Key Attributes Uniquely Identified Group By

Year Year Key None No Yes

Month Month Key Month Name No Yes


Day Day Key Day Name Yes No
Month Key
Month Name
Year Key
Specify Determinants (cont’d)
Recommendation #7
Data Set Example #2
Data
Year Key Month Key Month Name Day Key Day Name

2005 01 January 20050101 Sunday, Jan 1, 2005

2005 01 January 20050102 Monday, Jan 2, 2005

Determinant Settings
Name Key Attributes Uniquely Identified Group By

Year Year Key None No Yes

Month Year Key, Month Month No Yes


Key Name
Day Day Key Day Name Yes No
Month Key
Month
Name
Year Key
Determinants: Products Dimension Example
Recommendation #7
Product Type &
Product  Your merged query
Product Type
Code subject introduced
multiple levels of
Product Number
granularity
1..1
Two levels of
granularity
 Again, use
determinants to
1..n specify levels for
Sales Target Fact grouping
PRODUCT_TYPE_CODE

SALES_TARGET
®

Create the Presentation View

IBM Cognos 8 BI

© 2008 IBM Corporation


Framework Manager Workflow
Framework Manager

Create Model
Import Prepare
Project Metadata for
Metadata Metadata
Reporting

Set Create and


Publish Security Manage
Packages

Report Studio
Query Studio
Data Content
Sources Analysis Studio
Store
….
Create a Presentation View Recommendation #10

 Provide a logical and


simplified presentation
of metadata and
reporting tools for
report authors.
Populate the Presentation View
Recommendation #10
 Use star schema grouping wizard
Staff Sales Target
by Location by Location

Sales Target
Fact

Products Time

Retailer
by Location
Identify Conformed Dimensions
 Based on matching names
 Must use at least one
conformed dimension to
report across facts to:
 allow for stitch queries
 ensure correct aggregation
for each fact

Вам также может понравиться