Cognos 简明教程

Cognos - Quick Guide

Data Warehouse - Overview

数据仓库包含 multiple heterogeneous data sources 中的数据,用于分析报告和决策制定。数据仓库是一个用于存储来自不同数据源和应用程序的数据的中心位置。

A Data Warehouse consists of data from multiple heterogeneous data sources and is used for analytical reporting and decision making. Data Warehouse is a central place where data is stored from different data sources and applications.

数据仓库一词最早是由比尔·因蒙在 1990 年发明的。数据仓库始终有别于操作型数据库。

The term Data Warehouse was first invented by Bill Inmom in 1990. A Data Warehouse is always kept separate from an Operational Database.

数据仓库系统中的数据来自操作事务系统,如下所示−

The data in a DW system is loaded from operational transaction systems like −

  1. Sales

  2. Marketing

  3. HR

  4. SCM, etc.

在加载到数据仓库系统以进行信息处理之前,它可能经过操作数据存储或其他转换。

It may pass through operational data store or other transformations before it is loaded to the DW system for information processing.

数据仓库用于报告和分析信息,并存储历史和当前数据。数据仓库系统中的数据用于分析报告,此类报告稍后由业务分析师、销售经理或知识工作者用于决策制定。

A Data Warehouse is used for reporting and analyzing of information and stores both historical and current data. The data in DW system is used for Analytical reporting, which is later used by Business Analysts, Sales Managers or Knowledge workers for decision-making.

data warehouse

在上述图片中,可以看到数据来自 multiple heterogeneous data 源到数据仓库。数据仓库的常见数据源包括−

In the above image, you can see that the data is coming from multiple heterogeneous data sources to a Data Warehouse. Common data sources for a data warehouse includes −

  1. Operational databases

  2. SAP and non-SAP Applications

  3. Flat Files (xls, csv, txt files)

业务智能 (BI) 用户通过数据仓库中的数据访问分析报告、数据挖掘和分析。此类数据由业务用户、销售经理、分析师用于决策制定,以定义未来战略。

Data in data warehouse is accessed by BI (Business Intelligence) users for Analytical Reporting, Data Mining and Analysis. This is used for decision making by Business Users, Sales Manager, Analysts to define future strategy.

Features of a Data Warehouse

它是一个集中数据存储库,其中存储来自一个或多个异构数据源的数据。数据仓库系统存储当前和历史数据。通常,数据仓库系统存储 5-10 年的历史数据。数据仓库系统始终与操作事务系统分开。

It is a central data repository where data is stored from one or more heterogeneous data sources. A DW system stores both current and historical data. Normally a DW system stores 5-10 years of historical data. A DW system is always kept separate from an operational transaction system.

数据仓库系统中的数据用于从季度到年度比较的不同类型的分析报告。

The data in a DW system is used for different types of analytical reporting range from Quarterly to Annual comparison.

Data Warehouse Vs Operational Database

数据仓库和操作数据库之间的差异如下−

The differences between a Data Warehouse and Operational Database are as follows −

  1. An Operational System is designed for known workloads and transactions like updating a user record, searching a record, etc. However, Data Warehouse transactions are more complex and present a general form of data.

  2. An Operational System contains the current data of an organization and Data warehouse normally contains the historical data.

  3. An Operational Database supports parallel processing of multiple transactions. Concurrency control and recovery mechanisms are required to maintain consistency of the database.

  4. An Operational Database query allows to read and modify operations (insert, delete and Update) while an OLAP query needs only read-only access of stored data (Select statement).

Architecture of Data Warehouse

数据仓库涉及数据清理、数据集成和数据合并。数据仓库具有 3 层架构−

Data Warehousing involves data cleaning, data integration, and data consolidations. A Data Warehouse has a 3-layer architecture −

Data Source Layer

它定义了数据如何进入数据仓库。它涉及各种数据源和操作事务系统、平面文件、应用程序等。

It defines how the data comes to a Data Warehouse. It involves various data sources and operational transaction systems, flat files, applications, etc.

Integration Layer

它由操作数据存储和暂存区域组成。暂存区域用于执行数据清理、数据转换以及从不同源加载数据到数据仓库。由于多个数据源在不同的时区可用,因此使用暂存区域存储数据,然后将转换应用于数据。

It consists of Operational Data Store and Staging area. Staging area is used to perform data cleansing, data transformation and loading data from different sources to a data warehouse. As multiple data sources are available for extraction at different time zones, staging area is used to store the data and later to apply transformations on data.

Presentation Layer

这用于由终端用户执行业务智能报告。数据仓库系统中的数据由业务智能用户访问,并用于报告和分析。

This is used to perform BI reporting by end users. The data in a DW system is accessed by BI users and used for reporting and analysis.

下图显示了数据仓库系统的常见架构。

The following illustration shows the common architecture of a Data Warehouse System.

data warehouse architecture

Characteristics of a Data Warehouse

以下是数据仓库的关键特征−

The following are the key characteristics of a Data Warehouse −

  1. Subject Oriented − In a DW system, the data is categorized and stored by a business subject rather than by application like equity plans, shares, loans, etc.

  2. Integrated − Data from multiple data sources are integrated in a Data Warehouse.

  3. Non Volatile − Data in data warehouse is non-volatile. It means when data is loaded in DW system, it is not altered.

  4. Time Variant − A DW system contains historical data as compared to Transactional system which contains only current data. In a Data warehouse you can see data for 3 months, 6 months, 1 year, 5 years, etc.

OLTP vs OLAP

首先,OLTP 代表 Online Transaction Processing ,而 OLAP 代表 Online Analytical Processing

Firstly, OLTP stands for Online Transaction Processing, while OLAP stands for Online Analytical Processing

在 OLTP 系统中,有大量的在线短事务,如 INSERT、UPDATE 和 DELETE。

In an OLTP system, there are a large number of short online transactions such as INSERT, UPDATE, and DELETE.

而对于 OLTP 系统,有效措施是短事务的处理时间,并且非常短暂。它控制多访问环境中的数据完整性。对于 OLTP 系统,每秒事务的数量衡量效率。OLTP 数据仓库系统包含当前和详细的数据,并使用实体模型中的模式(3NF)维护。

Whereas, in an OLTP system, an effective measure is the processing time of short transactions and is very less. It controls data integrity in multi-access environments. For an OLTP system, the number of transactions per second measures the effectiveness. An OLTP Data Warehouse System contains current and detailed data and is maintained in the schemas in the entity model (3NF).

For Example

For Example

零售商店中的日常交易系统,其中客户记录每天都会插入、更新和删除。它提供更快的查询处理速度。OLTP 数据库包含详细和当前数据。存储 OLTP 数据库的模式是实体模型。

A Day-to-Day transaction system in a retail store, where the customer records are inserted, updated and deleted on a daily basis. It provides faster query processing. OLTP databases contain detailed and current data. The schema used to store OLTP database is the Entity model.

在 OLAP 系统中,与事务系统相比,事务数量更少。执行的查询本质上很复杂,涉及数据聚合。

In an OLAP system, there are lesser number of transactions as compared to a transactional system. The queries executed are complex in nature and involves data aggregations.

What is an Aggregation?

如果有人要进行年与年的比较,我们保存包含聚合数据(如年(1 行)、季度(4 行)、月(12 行)等)的表,则只处理一行。然而,在非聚合表中,它将比较所有行。这称为聚合。

We save tables with aggregated data like yearly (1 row), quarterly (4 rows), monthly (12 rows) or so, if someone has to do a year to year comparison, only one row will be processed. However, in an un-aggregated table it will compare all the rows. This is called Aggregation.

在 OLAP 系统中可以使用各种聚合函数,如 Sum、Avg、Max、Min 等。

There are various Aggregation functions that can be used in an OLAP system like Sum, Avg, Max, Min, etc.

For Example

For Example

SELECT Avg(salary)
FROM employee
WHERE title = 'Programmer';

Key Differences

这些是 OLAP 和 OLTP 之间的主要区别。

These are the major differences between an OLAP and an OLTP system.

  1. Indexes − An OLTP system has only few indexes while in an OLAP system there are many indexes for performance optimization.

  2. Joins − In an OLTP system, large number of joins and data are normalized. However, in an OLAP system there are less joins and are de-normalized.

  3. Aggregation − In an OLTP system, data is not aggregated while in an OLAP database more aggregations are used.

  4. Normalization − An OLTP system contains normalized data however data is not normalized in an OLAP system.

oltp

Data Mart Vs Data Warehouse

数据中心专注于单个功能领域,代表数据仓库的最简单形式。考虑包含销售、市场营销、人力资源和财务数据的数据仓库。数据中心专注于单个功能领域,如销售或市场营销。

Data mart focuses on a single functional area and represents the simplest form of a Data Warehouse. Consider a Data Warehouse that contains data for Sales, Marketing, HR, and Finance. A Data mart focuses on a single functional area like Sales or Marketing.

data mart vs data warehouse

在上面的图片中,你可以看到数据仓库和数据中心之间的区别。

In the above image, you can see the difference between a Data Warehouse and a data mart.

Fact vs Dimension Table

事实表代表进行分析的度量。它还包含维度键的外键。

A fact table represents the measures on which analysis is performed. It also contains foreign keys for the dimension keys.

For example − 每一个销售都是一个事实。

For example − Every sale is a fact.

Cust Id

Prod Id

Time Id

Qty Sold

1110

25

2

125

1210

28

4

252

维度表代表维度的特征。客户维度可以具有 Customer_Name、Phone_No、Sex 等等。

The Dimension table represents the characteristics of a dimension. A Customer dimension can have Customer_Name, Phone_No, Sex, etc.

Cust Id

Cust_Name

Phone

Sex

1110

Sally

1113334444

F

1210

Adam

2225556666

M

Data Warehouse - Schemas

模式被定义为数据库逻辑描述,其中事实表和维度表以逻辑方式结合。数据仓库以星形、雪花形和事实星座模式维护。

A schema is defined as a logical description of database where fact and dimension tables are joined in a logical manner. Data Warehouse is maintained in the form of Star, Snow flakes, and Fact Constellation schema.

Star Schema

星形模式包含一个事实表和多个维度表。每个维度仅以一个维度表表示,并且它们未规范化。维度表包含一组属性。

A Star schema contains a fact table and multiple dimension tables. Each dimension is represented with only one-dimension table and they are not normalized. The Dimension table contains a set of attributes.

Characteristics

  1. In a Star schema, there is only one fact table and multiple dimension tables.

  2. In a Star schema, each dimension is represented by one-dimension table.

  3. Dimension tables are not normalized in a Star schema.

  4. Each Dimension table is joined to a key in a fact table.

下图显示了公司的销售数据,相对于四个维度,即时间、项目、分支和位置。

The following illustration shows the sales data of a company with respect to the four dimensions, namely Time, Item, Branch, and Location.

star schema

中心有一个事实表。它包含四个维度中的每个维度的键。事实表还包含属性(即销售额和销售单位)。

There is a fact table at the center. It contains the keys to each of four dimensions. The fact table also contains the attributes, namely dollars sold and units sold.

Note − 每个维度只有一个维度表,每个表都保存一组属性。例如,位置维度表包含属性集 {location_key, street, city, province_or_state,country}。此约束可能会导致数据冗余。

Note − Each dimension has only one-dimension table and each table holds a set of attributes. For example, the location dimension table contains the attribute set {location_key, street, city, province_or_state, country}. This constraint may cause data redundancy.

For example − “温哥华”和“维多利亚”这两个城市都在加拿大不列颠哥伦比亚省。此类城市的条目可能会导致沿属性 province_or_state 和 country 发生数据冗余。

For example − "Vancouver" and "Victoria" both the cities are in the Canadian province of British Columbia. The entries for such cities may cause data redundancy along the attributes province_or_state and country.

Snowflakes Schema

雪花模式中的一些维度表已规范化。规范化将数据拆分为其他表,如下所示。

Some dimension tables in the Snowflake schema are normalized. The normalization splits up the data into additional tables as shown in the following illustration.

snowflakes schema

与星形模式不同,雪花模式中的维度表已规范化。

Unlike in the Star schema, the dimension’s table in a snowflake schema are normalized.

For example − 星形模式中的项目维度表已规范化并拆分为两个维度表,即项目表和供应商表。现在项目维度表包含属性 item_key、item_name、类型、品牌和 supplier_key。

For example − The item dimension table in a star schema is normalized and split into two dimension tables, namely item and supplier table. Now the item dimension table contains the attributes item_key, item_name, type, brand, and supplier-key.

供应商键链接到供应商维度表。供应商维度表包含属性 supplier_key 和 supplier_type。

The supplier key is linked to the supplier dimension table. The supplier dimension table contains the attributes supplier_key and supplier_type.

Note − 由于 Snowflake 模式中的规范化,因此冗余减少,因此维护和节省存储空间变得容易。

Note − Due to the normalization in the Snowflake schema, the redundancy is reduced and therefore, it becomes easy to maintain and the save storage space.

Fact Constellation Schema (Galaxy Schema)

事实星座具有多个事实表。它也称为 Galaxy 模式。

A fact constellation has multiple fact tables. It is also known as a Galaxy Schema.

以下插图显示了两个事实表,即 Sales 和 Shipping −

The following illustration shows two fact tables, namely Sales and Shipping −

galaxy schema

Sales 事实表与星型模式中的相同。Shipping 事实表具有五个维度,即 item_key、time_key、shipper_key、from_location、to_location。Shipping 事实表还包含两个度量,即已售金额和已售单位。还可以共享事实表之间的维度表。

The sales fact table is the same as that in the Star Schema. The shipping fact table has five dimensions, namely item_key, time_key, shipper_key, from_location, to_location. The shipping fact table also contains two measures, namely dollars sold and units sold. It is also possible to share dimension tables between fact tables.

For example − 时间、项目和位置维度表在 sales 和 shipping 事实表之间共享。

For example − Time, item, and location dimension tables are shared between the sales and shipping fact table.

Data Warehouse - ETL & Reporting Tools

ETL 工具从所有这些异构数据源中提取数据,转换数据(如应用计算、连接字段和键、删除不正确的字段等),并将数据加载到数据仓库中。

An ETL tool extracts the data from all these heterogeneous data sources, transforms the data (like applying calculations, joining fields, keys, removing incorrect data fields, etc.), and loads it into a Data Warehouse.

Extraction

在 ETL 加载期间需要一个临时存储区域。需要临时存储区域的原因有多种。源系统在特定时间段内才可用于提取数据。此时间段短于总数据加载时间。因此,临时存储区域允许从源系统中提取数据并将其保留在临时存储区域中,直到时间段结束。

A staging area is required during the ETL load. There are various reasons why staging area is required. The source systems are only available for specific period of time to extract data. This period of time is less than the total data-load time. Therefore, staging area allows you to extract the data from the source system and keeps it in the staging area before the time slot ends.

当需要将数据从多个数据源中组合在一起或需要将两个或更多个系统连接在一起时,需要临时存储区域。

The staging area is required when you want to get the data from multiple data sources together or if you want to join two or more systems together.

For example − 你无法执行 SQL 查询来连接来自两个不同物理数据库的两个表。

For example − You will not be able to perform an SQL Query joining two tables from two physically different databases.

不同系统的数据提取时间段会根据时区和运营时间而有所不同。从源系统中提取的数据可以用在多个数据仓库系统、运营数据存储中等等。

The data extractions’ time slot for different systems vary as per the time zone and operational hours. The data extracted from the source systems can be used in multiple Data Warehouse Systems, Operation Data Stores, etc.

ETL 允许进行复杂转换,并要求额外的区域来存储数据。

ETL allows you to perform complex transformations and requires extra area to store the data.

extraction

Transform

在数据转换中,对提取的数据应用一组函数,以将其加载到目标系统中。不需要任何转换的数据被称为直接移动或直通数据。

In data transformation, you apply a set of functions on extracted data to load it into the target system. The data that does not require any transformation is known as a direct move or pass through data.

可以对从源系统中提取的数据应用不同的转换。例如,你可以执行自定义计算。如果需要销售额总和并且数据库中没有这一数据,则可以在转换期间应用 SUM 公式并加载数据。

You can apply different transformations on extracted data from the source system. For example, you can perform customized calculations. If you want sum-of-sales revenue and this is not in database, you can apply the SUM formula during transformation and load the data.

For example − 如果表中不同列中的第一个和最后一个名称,则可以在加载之前使用联接。

For example − If you have the first name and the last name in a table in different columns, you can use concatenate before loading.

Load

在加载阶段,将数据加载到最终目标系统中,它可以是平面文件或数据仓库系统。

During the Load phase, data is loaded into the end-target system and it can be a flat file or a Data Warehouse system.

BI Reporting Tool

业务用户使用 BI(商业智能)工具来创建有关数据仓库中交易数据的基本、中等和复杂报告和使用 Information Design Tool/UDT 创建数据集。可以使用各种 SAP 和非 SAP 数据源来创建报告。

BI (Business Intelligence) tools are used by business users to create basic, medium, and complex reports from the transactional data in data warehouse and by creating Universes using the Information Design Tool/UDT. Various SAP and non-SAP data sources can be used to create reports.

市场上有相当多的 BI 报告、仪表板和数据可视化工具。其中一些如下所述 −

There are quite a few BI Reporting, Dashboard and Data Visualization Tools available in the market. Some of which are as follows −

  1. SAP Business Objects Web Intelligence (WebI)

  2. Crystal Reports

  3. SAP Lumira

  4. Dashboard Designer

  5. IBM Cognos

  6. Microsoft BI Platform

  7. Tableau Business Intelligence

  8. JasperSoft

  9. Oracle BI OBIEE

  10. Pentaho

  11. QlickView

  12. SAP BW

  13. SAS Business Intelligence

  14. Necto

  15. Tibco Spotfire

Cognos - Introduction

IBM Cognos Business Intelligence 是一个 web based reporting and analytic tool 。它用于执行数据聚合并创建用户友好型详细报告。报告可以包含图表、多页、不同的选项卡和交互式提示。这些报告可以在网络浏览器中查看,或在平板电脑和智能手机等手持设备中查看。

IBM Cognos Business Intelligence is a web based reporting and analytic tool. It is used to perform data aggregation and create user friendly detailed reports. Reports can contain Graphs, Multiple Pages, Different Tabs and Interactive Prompts. These reports can be viewed on web browsers, or on hand held devices like tablets and smartphones.

Cognos 还提供一个选项,可以用 XML 或 PDF 格式导出报告,或者可以用 XML 格式查看报告。你还可以将报告安排在特定时间段内在后台运行,这样可以节省查看每日报告的时间,而无需每次都运行报告。

Cognos also provides you an option to export the report in XML or PDF format or you can view the reports in XML format. You can also schedule the report to run in the background at specific time period so it saves the time to view the daily report as you don’t need to run the report every time.

IBM Cognos 提供广泛的功能,可以被认为是一种企业软件,可以提供灵活的报告环境和 can be used for large and medium enterprises 。它满足了高级用户、分析师、业务经理和公司高管的需求。高级用户和分析师想要创建特设报告,并可以创建相同数据的多个视图。业务高管希望以仪表板样式、交叉标签和可视化方式查看汇总数据。Cognos 为所有用户提供这两个选项。

IBM Cognos provides a wide range of features and can be considered as an enterprise software to provide flexible reporting environment and can be used for large and medium enterprises. It meets the need of Power Users, Analysts, Business Managers and Company Executives. Power users and analysts want to create adhoc reports and can create multiple views of the same data. Business Executives want to see summarize data in dashboard styles, cross tabs and visualizations. Cognos allows both the options for all set of users.

Key Features of IBM Cognos

Cognos BI 报告编制工具可将多个数据库中的数据合成为一组报告。与市场上的其他 BI 工具相比,IBM Cognos 提供了广泛的功能。您可以在 Cognos BI 报告编制工具中轻松创建和安排报告,并且可轻松设计复杂的报告。

Cognos BI reporting allows you to bring the data from multiple databases into a single set of reports. IBM Cognos provides wide range of features as compared to other BI tools in the market. You can create and schedule the reports and complex report can be designed easily in the Cognos BI Reporting Tool.

Cognos BI 报告编制工具可为一组用户(例如高级用户、分析师和业务执行人员等)创建报告。IBM Cognos 可以处理海量数据,适合中型和大型企业满足 BI 需求。

The Cognos BI Reporting Tool allows to create a report for a set of users like – Power users, Analysts, and Business Executives, etc. IBM Cognos can handle a large volume of data and is suitable for medium and large enterprises to fulfil BI needs.

3-Tier Architecture Cognos

Cognos BI 被认为是 3 层架构布局。顶部是 Web 客户端或 Web 服务器。第 2 层由 Web 应用程序服务器组成。而底层由数据层组成。

Cognos BI is considered to be a 3-tier architecture layout. At the top, there is a Web Client or a Web Server. The 2nd tier consists of a Web Application Server. While the bottom tier consists of a Data layer.

这些层之间由防火墙分隔,并且这些层之间的通信使用 SOAP 和 HTTP 协议进行。

These tiers are separated by firewalls and communication between these tiers happens using SOAP and HTTP protocols.

3 tier architecture cognos

Tier-1 Web Clients

Web 客户端允许 BI 用户访问 TM1 数据并在任何受支持的浏览器中与其进行交互。第 1 层负责管理网关,并且用于加密和解密密码,提取向 BI 服务器提交请求所需的信息,身份验证服务器并将请求传递给 Cognos BI 调度程序进行处理。

The web client allows BI users to access TM1 data and interact with data in any of the supported browsers. Tier 1 is responsible to manage the gateway and is used for encryption and decryption of passwords, extract information needed to submit a request to the BI server, authentication of server and to pass the request to Cognos BI dispatcher for processing.

Tier-2 Web Application Server

此层承载 Cognos BI 服务器及其相关服务。应用程序服务器包含应用程序层组件、内容管理器和引导程序服务。

This tier hosts the Cognos BI server and its associated services. Application server contains Application Tier Components, Content Manager and Bootstrap service.

Cognos TM1 Web 应用程序服务器在基于 Java 的 Apache Tomcat 服务器上运行。使用此层,可将 Microsoft Excel 工作表转换为 TM1 Web 工作表,还可以将 Web 工作表导出回 Excel 和 PDF 格式。

Cognos TM1 Web Application Server runs on Java based Apache Tomcat server. Using this tier, Microsoft Excel worksheets can be converted to TM1 Web sheets and also allows to export web sheets back to Excel and PDF format.

Tier-3 Data

此层包含内容和数据源。它包含 TM1 Admin 服务器和至少一个 TM1 服务器。

This tier contains content and data sources. It contains TM1 Admin server and at least one TM1 server.

TM1 Admin 服务器可以安装在 LAN 上的任何计算机上,并且必须驻留在与 TM1 服务器相同的网络上。TM1 服务器的版本应与 Cognos TM1 web 的版本相同或更高。

TM1 Admin server can be installed on any computer on your LAN and it must reside on same network as TM1 server. The version of TM1 server should be equal or most recent then the version of Cognos TM1 web.

Cognos Versions

在本节中,我们将讨论不同版本的 Cognos。

In this section we will discuss the different versions of Cognos.

Cognos Query Version 7

7.4

Inactive (as of Sept 30, 2012)

Unavailable (since Sept 30, 2012)

7.3

Inactive (as of Jan 1, 2008)

Unavailable (since June 30,2012)

7.4

7.1

Inactive (as of Dec 31, 2005)

Unavailable (since Nov 30, 2011)

7.3 or 7.4

7.0

Inactive (as of Dec 31, 2004)

Unavailable (since Nov 30, 2011)

7.1 or 7.3

Cognos 8 BI

8.4.0

Standard IBM Support(3), Inactive (as of Sept 30, 2012)

Unavailable (since Sept 30, 2012)

8.4.1

8.4 FCS (First Customer Ship)

Inactive (as of Feb 27, 2009)

Unavailable

8.4.1

8.3

Inactive (as of April 30, 2012)

Unavailable (since April 30, 2013)

8.4.1

8.2

Inactive (as of March 31, 2010)

Unavailable (since June 30, 2012)

8.4.1

8.1.2 MR2

Inactive (as of March 31, 2009)

Unavailable (since Nov 30, 2011)

8.4.1

8.1.2 MR1

Inactive (as of March 31, 2009)

Unavailable (since Nov 30, 2011)

8.4.1

8.1.1

Inactive (as of Dec 31, 2004)

Unavailable (since Nov 30, 2011)

8.4.1

Cognos tm1

9.4 MR1

Inactive (as of Sept 30, 2012)

Unavailable (since Sept 30, 2012)

9.5.2

9.4

Inactive (as of Sept 30, 2012)

Unavailable (since Sept 30, 2012)

9.5.2

9.1 SP4

Inactive (as of Dec 31, 2010)

Unavailable (since Nov 30, 2011)

9.5.2

9.1 SP3

Inactive (as of Dec 31, 2010)

Unavailable (since Nov 30, 2011)

9.5.2

然后有 Cognos Business Intelligence 10 的不同子版本,分别是:

And then there were different sub-versions of the – Cognos Business Intelligence 10, which were −

  1. IBM Cognos Business Intelligence 10.1

  2. IBM Cognos Business Intelligence 10.1.1

  3. IBM Cognos Business Intelligence 10.2

  4. IBM Cognos Business Intelligence 10.2.1

  5. IBM Cognos Business Intelligence 10.2.2

  6. IBM Cognos Business Intelligence 11.0.0

Cognos vs Other BI Reporting Tools

市场上还有各种其他 BI 报告工具,用于中型和大型企业进行分析和报告目的。此处将介绍其中一些工具及其关键特性。

There are various other BI reporting tools in the market that are used in medium and large enterprise for analytics and reporting purpose. Some of them are described here along with its key features.

Cognos vs Microsoft BI (Source: www.trustradius.com)

以下是两种工具均支持的主要特性:

Following are the key features that are supported by both the tools −

  1. Standard Reporting

  2. Ad-hoc Reporting

  3. Report output and Scheduling

  4. Data Discovery and Visualization

  5. Access Control and Security

  6. Mobile Capabilities

ibm cognos

Cognos 可被视为一个强大的解决方案,它允许创建各种报告,例如交叉表、活动报告(Cognos 10 中的最新特性)和其他报告结构。您可以创建用户提示,轻松安排报告,并且可以导出和查看不同格式的报告。Microsoft BI 提供业务数据的简单可视化,以及与 Microsoft Excel 的轻松集成。

Cognos can be considered as a robust solution which allows you to create a variety of reports like Cross tabs, Active reports (latest feature in Cognos 10), and other report structure. You can create user prompts, scheduling of report is easy and you can export and view reports in different formats. The Microsoft BI provides easy visualization of business data as well as Easy integration with Microsoft Excel.

IBM Cognos vs SAP Business Objects

SAP BO 支持其自己的 ETL 工具 SAP 数据服务。IBM Cognos 不支持自己的 ETL 工具。IBM Cognos 8 不提供脱机报告功能,但 SAP Business Objects 报告工具中提供了此功能。

SAP BO supports its own ETL tool SAP Data Services. IBM Cognos doesn’t support its own ETL tool. The IBM Cognos 8 doesn’t provide offline reporting features however it is there in SAP Business Objects reporting tools.

在 Cognos 中,整个功能被划分为多个工具,例如查询工作室、分析工作室、事件工作室等。想要学习所有工具是一项艰巨的任务。在 SAP Business Objects 中,您拥有多种工具,如 Web Intelligence(用于报告)、IDT(用于 Universe Designer)、仪表板设计器,因此用户认为管理和学习所有工具是一项艰巨的任务。

In Cognos the entire functionality is divided into multiple tools Query studio, Analysis studio, event studio etc. It is a tough task to learn all the tools. In SAP Business Objects, you have multiple tools like Web Intelligence for reporting, IDT for Universe Designer, Dashboard Designer so users feel that it is a tough task to manage and learn all the tools.

在 IBM Cognos 中,生成的数据可以转换为多种格式(例如 HTML、PDF 等),还可以从多个位置(电子邮件、移动电话、办公室等)访问。IBM 提供几种规划能力,例如预测、预算、高级情景建模等。BI 工具的选择取决于各种因素,如公司的需求、软件版本、支持的功能和许可成本。

In IBM Cognos, data generated can be transformed in various formats (for instance, HTML, PDF, etc.) and can also be accessed from multiple locations (e-mail, mobile, office, etc.). IBM provides several planning capabilities such as forecasts, budgets, advance scenario modelling etc. Selection of BI tool depends on various factors like need of company, software version, features supported and the license cost.

Cognos - Components and Services

Cognos 中有各个组件,它们使用 BI 总线进行通信,被称为简单对象访问协议 (SOAP),并支持 WSDL。Cognos 架构中的 BI 总线不是软件组件,而是一组允许 Cognos 服务之间通信的协议。

There are various components in Cognos that communicate with each other using BI Bus and are known as Simple Object Access Protocol (SOAP) and supports WSDL. BI Bus in Cognos architecture is not a software component but consists of a set of protocols that allows communication between Cognos Services.

BI 总线协议支持的进程包括 -

The processes enabled by the BI Bus protocol includes −

  1. Messaging and dispatching

  2. Log message processing

  3. Database connection management

  4. Microsoft .NET Framework interactions

  5. Port usage

  6. Request flow processing

  7. Portal Pages

使用安装向导安装 Cognos 8 时,你可以指定安装每个组件的位置 -

When you install Cognos 8 using the Installation wizard, you specify where to install each of these components −

Gateways

Cognos 8 Web 服务器层包含一个或多个 Cognos 8 网关。Cognos 8 中的 Web 通信通常通过驻留在一个或多个 Web 服务器上的网关进行。网关是 Web 服务器程序的扩展,它将信息从 Web 服务器传输到另一台服务器。Web 通信还可以直接与 Cognos 8 调度程序进行,但这种情况比较少见。

The Cognos 8 Web server tier contains one or more Cognos 8 gateways. The web communication in Cognos 8 is typically through gateways, which reside on one or more web servers. A gateway is an extension of a web server program that transfers information from the web server to another server. Web communication can also occur directly with a Cognos 8 dispatcher but this option is less common.

Cognos 8 支持几种类型的 Web 网关,包括 -

Cognos 8 supports several types of Web gateways, including −

  1. CGI − The default gateway, CGI can be used for all supported Web servers. However, for enhanced performance or throughput, you may choose one of the other supported gateway types.

  2. ISAPI − This can be used for the Microsoft Internet Information Services (IIS) Web server. It delivers faster performance for IIS.

  3. apache_mod − You can use an apache_mod gateway with the Apache Web server.

  4. Servlet − If your Web server infrastructure supports servlets or you are using an application server, you can use a servlet gateway.

Application Tier Components

此组件由一个调度程序组成,调度程序负责操作服务并路由请求。调度程序是一个多线程应用程序,每个请求使用一个或多个线程。配置更改会定期传达给所有正在运行的调度程序。此调度程序包括 Cognos 应用程序防火墙,以提供 Cognos 8 的安全性。

This component consists of a dispatcher that is responsible to operate services and route requests. The dispatcher is a multithreaded application that uses one or more threads per request. The configuration changes are routinely communicated to all the running dispatchers. This dispatcher includes Cognos Application Firewall to provide security for Cognos 8.

调度程序可以将请求路由到本地服务,例如报告服务、展示服务、作业服务或监视服务。调度程序还可以将请求路由到特定调度程序来运行给定的请求。这些请求可以根据负载均衡需求或软件包或用户组需求路由到特定的调度程序。

The dispatcher can route requests to a local service, such as the report service, presentation service, job service, or monitor service. A dispatcher can also route requests to a specific dispatcher to run a given request. These requests can be routed to specific dispatchers based on load-balancing needs, or package or user group requirements.

Content Manager

内容管理器包含 Access Manager,它是 Cognos 8 的主要安全组件。Access Manager 利用你现有的安全提供程序与 Cognos 8 一起使用。它为 Cognos 8 提供了一组一致的安全功能和 API,包括用户身份验证、授权和加密。它还提供对 Cognos 命名空间的支持。

Content Manager contains Access Manager, the primary security component of Cognos 8. Access Manager leverages your existing security providers for use with Cognos 8. It provides Cognos 8 with a consistent set of security capabilities and APIs, including user authentication, authorization, and encryption. It also provides support for the Cognos namespace.

Cognos - Connections

你可以在 Cognos Studio 中根据不同的数据源报告交互式用户报告,方法是在 Web 管理界面中创建关系和 OLAP 连接,这些连接稍后在 Framework Manager 中用于数据建模,称为软件包。在 Cognos Studio 中创建的所有报告和仪表板都发布到 Cognos Connection 和门户供分发。报告工作室可用于运行复杂报告并查看商业智能信息,或者还可以从发布它们的各个门户中访问此信息。

You can report interactive user reports in Cognos Studio on the top of various data sources by creating relational and OLAP connections in web administration interface which are later used for data modeling in Framework Manager known as packages. All the reports and dashboards that are created in Cognos Studio they are published to Cognos Connection and portal for distribution. The report studio can be used to run the complex report and to view the Business Intelligence information or this can also be accessed from different portals where they are published.

Cognos Connections 用于访问报告、查询、分析和软件包。它们还可用于创建报告快捷方式、URL 和页面并组织条目,还可以针对其他用例进行自定义。

Cognos Connections are used to access reports, queries, analysis, and packages. They can also be used to create report shortcuts, URLs and pages and to organize entries and they can also be customized for other use.

connections

Connecting Different Data Sources

数据源定义与数据库的物理连接和不同的连接参数,如连接超时、数据库的位置等。数据源连接包含凭据和登录信息。你可以创建一个新的数据库连接,也可以编辑现有数据源连接。

A data source defines the physical connection to a database and different connection parameters like connection time out, location of database, etc. A data source connection contains credential and sign on information. You can create a new database connection or can also edit an existing data source connection.

你还可以组合一个或多个数据源连接并使用 Framework Manager 创建和发布软件包。

You can also combine one or more data source connections and create packages and published them using Framework manager.

Dynamic Query Mode

动态查询模式用于使用 XMLA/Java 连接为数据源提供通信。要连接到关系数据库,你可以使用 type4 JDBC 连接,它将 JDBC 调用转换为供应商特定格式。与 type 2 驱动程序相比,它提供了更高的性能,因为无需将调用转换为 ODBC 或数据库 API。Cognos 连接中的动态查询模式可以支持以下类型的关系数据库 -

The dynamic query mode is used to provide communication to data source using XMLA/Java connections. To connect to the Relation database, you can use type4 JDBC connection which converts JDBC calls into vendor specific format. It provides improved performance over type 2 drivers because there is no need to convert calls to ODBC or database API. Dynamic query mode in Cognos connection can support the following types of Relational databases −

  1. Microsoft SQL Server

  2. Oracle

  3. IBM DB2

  4. Teradata

  5. Netezza

为了支持 OLAP 数据源,Java/XMLA 连接为不同的 OLAP 版本和技术提供了优化和增强的 MDX。Cognos 中的动态查询模式可与以下 OLAP 数据源一起使用 -

To support OLAP data sources, Java/XMLA connectivity provides optimized and enhanced MDX for different OLAP versions and technology. The Dynamic query mode in Cognos can be used with the following OLAP data sources −

  1. SAP Business Information Warehouse (SAP BW)

  2. Oracle Essbase

  3. Microsoft Analysis Services

  4. IBM Cognos TM1

  5. IBM Cognos Real-time Monitoring

DB2 Data Sources

DB2 连接类型用于连接至 DB2 Windows、Unix 和 Linux、Db2 zOS 等。

The DB2 connection type are used to connect to DB2 Windows, Unix and Linux, Db2 zOS, etc.

DB2 数据源中使用的常见连接参数包括以下内容:

The common connection parameters used in DB2 data source includes −

  1. Database Name

  2. Timeouts

  3. Signon

  4. DB2 connect string

  5. Collation Sequence

Creating a Data Source Connection in IBM Cognos

要在 IBM Cognos Framework Manager 中创建模型,需要创建一个数据源连接。在定义数据源连接时,需要输入连接参数,如数据库的位置、超时时间间隔、登录凭证等。

To create models in IBM Cognos Framework Manager, there is a need to create a data source connection. When defining the data source connection, you need to enter the connection parameters – location of database, timeout interval, Sign-on, etc.

在 IBM Cognos Connection 中,单击 Launch IBM Cognos Administration

In IBM Cognos Connection → click on the Launch IBM Cognos Administration

ibm cognos administration

在“配置”选项卡中,单击数据源连接。在此窗口中,导航至 New Data Source button

In the Configuration tab, click Data Source Connections. In this window, navigate to the New Data Source button.

configuration
data source connections

输入唯一的连接名称和描述。

Enter the unique connection name and description.

new data source

你可以添加与数据源相关联的描述以便唯一标识此连接,然后单击“下一步”按钮。

You can add a description related to the data source to uniquely identify the connection and click the next button.

new data source wizard

从下拉列表中选择连接类型,然后单击“下一步”按钮,如以下屏幕截图中所示。

Select the type of connection from the drop down list and click on the next button as shown in the following screenshot.

type of connection

在出现的下一个屏幕中,输入连接详细信息,如以下屏幕截图中所示。

In the next screen that appears, enter the connection details as shown in the following screenshot.

connection details

你可以利用“测试连接”使用你已定义的连接参数来测试连接到数据源的连接性。完成后,单击“完成”按钮。

You can use the Test connection to test the connectivity to the data source using connection parameters that you have defined. Click on the finish button once done.

Data Source Security Setup

可以使用 IBM Cognos 身份验证来定义数据源安全性。根据数据源,可以在 Cognos 连接中配置不同的身份验证类型:

Data Source Security can be defined using IBM Cognos authentication. As per the data source, different types of authentication can be configured in the Cognos connection −

No Authentication - 此项允许在不使用任何登录凭证的情况下登录到数据源。此类型的连接不会提供连接中的数据源安全性。

No Authentication − This allows login to the data source without using any sign-on credentials. This type of connection doesn’t provide data source security in connection.

IBM Cognos Software Service Credential - 在此类型的登录中,你需要使用指定给 IBM Cognos 服务的登录凭证登录到数据源,而且用户不需要单独的数据库登录凭证。在实时环境中,建议使用单独的数据库登录凭证。

IBM Cognos Software Service Credential − In this type of a sign-on, you log in to the data source using a logon specified for the IBM Cognos Service and the user does not require a separate database sign-on. In a live environment, it is advisable to use individual database sign on.

External Name Space - 此项要求使用相同的 BI 登录凭证,这用于认证外部认证名称空间。用户必须先登录到名称空间,然后才能登录到数据源,而且该名称空间应当是启用的。

External Name Space − It requires the same BI logon credentials that are used to authenticate the external authentication namespace. The user must be logged into the name space before logging in to the data source and it should be active.

signons

所有数据源还都支持为组中的每个人或个人用户、组或角色定义数据源登录凭证。如果数据源要求执行数据源登录,但你没有办法访问此数据源的登录信息,系统中会在你每次访问数据源时提示你登录。

All the data sources also support data source sign-on defined for everyone in the group or for individual users, group or roles. If the data source requires a data source sign-on, but you don’t have the access to a sign-on for this data source, you will be prompted to log on each time you access the data source.

IBM Cognos 还支持立方体级别的安全性。如果你正在使用立方体,可以在立方体级别设置安全性。对于 Microsoft Analysis Service ,可以在立方体级别角色中定义安全性。

IBM Cognos also supports security at cube level. If you are using cubes, security may be set at the cube level. For Microsoft Analysis Service, security is defined at the cube level roles.

Cognos - Packages

在本章中,我们将讨论如何使用 COGNOS 创建包。

In this chapter, we will discuss how to create a package using COGNOS.

How to Create a Package?

在 IBM Cognos 中,你可以为 SAP BW 或 Power Cube 数据源创建包。包包含在“公共”文件夹或“我的”文件夹中,如以下屏幕截图中所示。

In IBM Cognos, you can create packages for SAP BW or power cube data sources. Packages are available in the Public folder or in My folder as shown in the following screenshot.

public folders

在部署包后,将对该包应用默认配置。你可以配置包以使用不同的设置,也可以修改现有包的设置。

Once a package is deployed, the default configuration is applied on the package. You can configure a package to use different settings or you can modify the settings of the existing package.

如要配置包,您应拥有管理员权限。

To configure a package, you should have administrator privilege.

在“公共”文件夹中找到包,单击“操作”选项卡下的“更多”按钮,如下面的屏幕截图所示。

Locate the package in the Public folder, click on More button under the Action tab as shown in the following screenshot.

more button

单击“修改包配置”,然后单击“选择分析”。当创建新分析时,选择要为此包使用的默认分析。单击“确定”,并根据需要更改包设置,然后单击“完成”。

Click on Modify the package configuration and Click Select an analysis. Select the default analysis to be used for this package when a new analysis is created. Click OK and change the package settings as required and click Finish.

modifying package

Creating a New Package

在“包”选项卡“公共”文件夹中,您还可以使用 IBM Cognos 连接创建新包。

In the Package tab, Public folder, you can also create a new Package using the IBM Cognos connection.

new package

选择要在包中使用的的数据源,然后单击“确定”。

Select the data source that you want to use in the package and click OK.

Scheduling Reports in IBM Cognos

您还可以根据自己的业务需求在 IBM Cognos 中安排报表。安排报表可让您保存刷新时间。您可以定义各种安排属性,如频率、时区、开始和结束日期等。

You can also schedule the reports in IBM Cognos as per your business requirements. Scheduling a report allows you to save the refresh time. You can define various scheduling properties like frequency, time zone, start and end date, etc.

要安排报表,请选择该报表,然后转到“更多”按钮,如下面的屏幕截图所示。

To schedule a report, select the report and go to More button as shown in the following screenshot.

schedule report

您有一个添加新安排的选项。选择“新安排”按钮,如下面的屏幕截图所示。

You have an option to add a new schedule. Select the New Schedule button as shown in the following screenshot.

new schedule

您可以在“安排”选项卡下选择以下选项:

You can select the following options under the Schedule tab −

  1. Frequency

  2. Start and End

  3. Priority

  4. Daily Frequency, etc.

定义安排属性后,可以通过单击底部的“确定”按钮将其保存。禁用“安排”选项可让您使安排处于非活动状态,但该安排会为报表保存。您可以随时取消此选项,以再次启用该安排。

When the scheduling properties are defined, you can save it by clicking the OK button at the bottom. Disabling the Schedule options allows you to make the schedule inactive but the schedule will be saved for the report. You can remove this option any time to enable the schedule again.

schedule

要编辑现有安排,请选择该报表,然后转到“更多”。您可以修改现有安排或永久删除该安排。

To edit an existing schedule, select the report and go to More. You can modify an existing schedule or remove the schedule permanently.

edit an existing schedule

Cognos - Framework Manager

在本章中,我们将讨论什么是 Framework Manager,以及其各种其他组件。

In this chapter, we will discuss regarding what a Framework Manager is and about its various other components.

What is a Framework Manager?

IBM Cognos Framework Manager 用于创建从一个或多个数据源派生的元数据的业务模型。它是一种基于 Windows 的工具,用于以包的形式向 Cognos BI 发布业务模型,这些包可用于分析报告和分析。

IBM Cognos Framework Manager is used to create business model of metadata derived from one or more data sources. It is a Windows based tool which is used to publish the business models to Cognos BI in the form of packages which can be used for analytical reporting and analysis.

在 Framework Manager 中启动新项目之前,您必须了解 BI 报告要求,这有助于确定数据策略、元数据、报表包交付等。这有助于确定 Framework Manager 中需要哪些数据源才能在 BI 报表中获得所需数据。在 Framework Manager 中启动新项目之前,您应考虑以下因素:

Before you start a new project in Framework Manager, it is necessary that you go through BI reporting requirements that helps you to identify data strategies, metadata, report package delivery, etc. This helps you to identify which data sources are required in the Framework Manager to get the required data in the BI report. You should consider the following factors before starting a new project in the Framework manager.

  1. Data Sources required to meet BI needs.

  2. Types of DW system

  3. Data refresh in Data Warehouse

  4. BI Reporting- Daily, Weekly, or monthly.

Metadata Modeling

元数据模型被定义为从数据库导入的数据库对象(表、列和对象之间的关系)的集合。当您运行报表时,BI Cognos 门户中发布的元数据会根据查询生成 SQL 语句。

A Metadata model is defined as the collection of database objects (tables, columns and relationship between objects) imported from the database. When you run the report, metadata published in BI Cognos portal generates a SQL statement according to the query.

metadata modeling

IBM Cognos Framework Manager 可以隐藏数据源中的数据复杂性,还可以更改向用户显示数据的方式。它提供了一个视图,让 BI 用户可以轻松理解并执行分析和报告。

The IBM Cognos Framework manager can hide the complexity of data in the data source and also alter the way how data is shown to users. It provides a view that is easy for BI users to understand and perform analysis and reporting.

IBM Cognos Framework Manager User Interface

此屏幕截图显示了 IBM Cognos BI Framework Manager 用户界面。

The following screenshot shows the IBM Cognos BI Framework Manager User Interface.

user interface

以下对此屏幕截图的各种组件进行了详细说明,以帮助您更好地理解:

Following are the various components of the above screenshot that are explained in detail for better understanding −

  1. Project Viewer − This pane on left side allows you to access all the existing projects in a tree format.

  2. Project Info − This is the center pane that is used to manage objects of an existing project. This has three tabs: Explorer, Diagram and Dimension.

  3. Properties − This pane at the bottom is used to set the value of different properties of an object in a project.

  4. Tools − This pane on the right side provides you various important useful tools. You can perform a search, or display an object and its dependent objects, changing project language, etc.

Importing Metadata from a Relational Database

要从关系数据库导入元数据,请将数据库对象映射到 Framework Manager 对象。在 Framework Manager 中,您可以导入所有对象或可以选择特定对象,如表、列、函数、存储过程、视图等。

For importing Metadata from a Relational Database, you map the database objects to the Framework manager objects. In the Framework Manager, you can import all the objects or you can select particular objects like tables, columns, functions, stored procedures, views, etc.

仅支持用户定义的存储过程。

Only user defined Stored procedures are supported.

Database Objects

Framework Manager Objects

Column

Query Item

View

Query Subject

Synonym

Query Subject

Procedure

Query Subject

Table

Query Subject

Function

Project Function

要创建元数据模型,请从操作菜单运行元数据向导。选择数据源连接并单击下一步按钮。选中您要导入的对象的复选框。

To create a metadata model, run metadata wizard from the Action menu. Select a data source connection and click the Next button. Select the check boxes for the objects 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 appears with a number.

For example − 当您在项目中看到 QuerySubject 和 QuerySubject1 时。然后单击导入。

For example − When you see QuerySubject and QuerySubject1 in your project. Then click Import.

querysubject

将显示包括未导入对象的列表和导入对象的计数的导入统计信息。

Import statistics including a list of objects that could not be imported and a count of objects that were imported are shown.

下一步是单击完成按钮。

The next step is to click on the Finish button.

导入元数据后,您必须针对以下区域检查已导入的元数据:

After importing Metadata, you must check the imported Metadata for the following areas −

  1. Relationships and Cardinality

  2. Determinants

  3. Usage property for query items

  4. Regular Aggregate property for query items

Importing Metadata from Cognos 8 Model

在 Framework Manager 中,您还可以从现有 Cognos 8 模型导入元数据。要从 Cognos 8 模型导入元数据,请转到 Actions → Run Metadata wizard

In the Framework Manager, you can also import metadata from an existing Cognos 8 Model. To import Metadata from the Cognos 8 model, go to Actions → Run Metadata wizard.

单击 Cognos 8 模型,然后单击下一步按钮。从 Cognos 8 模型导航到 .cpf 文件,然后单击下一步。

Click on the Cognos 8 Model and then the Next button. Navigate to the .cpf file from Cognos 8 Model and the click on Next.

选中您要导入的对象的复选框,然后单击下一步,然后单击完成。

Select the check boxes for objects you want to import and then click on Next and then on Finish.

Modeling Relational Metadata

导入元数据后,下一步是验证对象以满足报告要求。您可以选择的报告中出现的对象并对其执行测试。可以通过创建元数据模型的两个视图来

Once you import the metadata, next is to validate the objects for reporting requirement. You can select the objects that appear in the report and test them. You can create two views of the Metadata Model −

  1. Import View

  2. Business View

导入视图显示从数据源导入的元数据。为了按照 BI 报告验证数据,您可以执行以下步骤:

The Import view shows you the metadata imported from the data source. To validate the data as per your BI reporting, you can perform the following steps −

  1. Ensure that the relationships reflect the reporting requirements.

  2. Optimize and customize the data retrieved by the 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.

使用业务视图在元数据中提供信息。您可以在业务视图中执行计算、集合和应用过滤器,并轻松允许用户构建报告。您可以添加业务规则,例如自定义计算和过滤器,从而定义用户可以检索的信息。

Business view is used to provide the information in metadata. You can perform calculations, aggregations and apply filters in Business view and easily allow users to build the report. You can add business rules such as custom calculations and filters that define the information users can retrieve.

通过为每个用户组创建独立的视图,并反映您的用户所熟悉的业务概念,来组织模型。

Organize the model by creating separate views for each user group that reflect the business concepts familiar to your users.

Cognos - Relationships in Metadata Model

关系用于创建元数据模型中多个对象上的查询。关系可以是双向的,若不创建关系,则对象就是元数据模型中没有用处的独立实体。

Relationships are used to create queries on multiple objects in a metadata model. Relationships can be bidirectional and without creating relationship, objects are individual entities with no use in metadata model.

元数据模型中的每个对象都使用数据源中的主键或外键进行连接。您可以在元数据模型中创建或删除关系以满足业务要求。

Each object in metadata model is connected using primary or foreign key in the data source. You can create or remove relationships in the metadata model to meet the business requirements.

有一些可用的关系,其中一部分包括:

There are different relationships which are possible, some of them are −

  1. One to One − When an instance of one query subject is related to another instance. For example: Each customer has one customer id.

  2. One to Many − This relationship occurs when one instance of query subject relates to multiple instances. For example: Each doctor has many patients.

  3. Many to Many − This relationship occurs when many instances of a query subject relates to multiple instances. For example: Each patient has many doctors.

Cardinality Concept

它被定义为两个查询主题中每个主题的相关行的数目。基数以下列方式使用:

It is defined as the number of related rows for each of the two query subjects. Cardinality is used in the following ways −

  1. Loop Joins in Star schema

  2. Optimized access to data source

  3. Avoid double counting fact data

当使用关系型数据库作为数据源时,可以考虑以下规则来定义基数 −

While using the Relational database as a data source, Cardinality can be defined considering the following rules −

  1. Primary and Foreign keys

  2. Match query item names represent uniquely indexed columns

  3. Matching query item names

定义基数的最常用方法是使用主键和外键。若要查看已导入的关键信息,请右键单击查询主题 → 编辑定义。您可以从数据源中导入多对多关系、可选关系和外连接。

The most common ways to define Cardinality is by using the primary and foreign key. To view the key information that was imported, right click on the query subject → Edit Definition. You can import many to many relationships, optional relationships, and outer joins from the data source.

Relationship Notation in Metadata Model

在 Framework manager 中,关系由 Merise notation 表示。该符号的第一部分表示此关系的连接类型。

In the Framework manager, a relation is represented by Merise notation. The first part of this notation represents the type of join for this relationship.

  1. 0..1 represents zero or one match

  2. 1..1 represents one to one match

  3. 0..n represents Zero or no matches

  4. 1..n represents One or more matches

  5. 1 − An inner join with all matching rows from both objects.

  6. 0 − An Outer join with all objects from both, including the items that don’t match.

Creating or Modifying the Relationships

在元数据导入中创建一个关系,或者组合无连接的逻辑相关对象。您可以在对象之间手动创建关系,也可以基于选定条件自动定义对象之间的关系。

To create a Relationship or to combine logically related objects which are not joined in metadata import. You can manually create relationship between objects or can automatically define relationship between objects based on selected criteria.

若要创建关系,请使用 CTRL 键选择一个或多个查询项目、主题或维度。然后转到 Action Menu → Create Relationship

To create a Relationship, use CTRL key to select one or more query items, subjects or dimensions. Then go to Action Menu → Create Relationship.

如果这是个有效关系,Framework manager 将创建此关系的快捷方式。然后您可以单击确定按钮。

If this is a valid Relationship, the Framework manager wants to create a shortcut to the relationship. You can then click on the OK button.

f sales

在元数据导入后创建关系后,您还可以在 Framework manager 中修改该关系或基数。

Once you create a relationship after the metadata import, you can also modify the relationship or Cardinality in the Framework manager.

若要编辑关系,请单击关系,然后从 Action menu → click Edit Definition 中选择。

To edit a Relationship, click a relationship and from Action menu → click Edit Definition.

Relationship Expression tab → Select Query items, Cardinalities and Operators 中选择。

From the Relationship Expression tab → Select Query items, Cardinalities and Operators.

relationship defination

若要创建附加连接,请转到 Relationship Expression tab → New Link and Define New Relationship

To create an additional Join, go to the Relationship Expression tab → New Link and Define New Relationship.

若要测试此关系,请转到 Relationship SQL tab → rows to be returned → Test

To test this Relationship, go to Relationship SQL tab → rows to be returned → Test.

relationship sql tab

单击确定按钮。

Click on OK button.

Creating a Relationship Shortcut

关系快捷方式定义为指向现有关系的指针,并重用现有关系的定义。如果对源关系进行任何更改,则会自动在快捷方式中更新更改。关系快捷方式还用于解决查询主题之间的模棱两可的关系。

A Relationship shortcut is defined as the pointer to an existing relationship and to reuse the definition of an existing relationship. When you make any change to the source Relationship, they are automatically updated in shortcuts. Relationship shortcuts are also used to resolve ambiguous relationship between query subjects.

只要您创建关系并满足以下这两个条件,Framework Manager 就会询问您是否要创建关系快捷方式。

The Framework Manager asks whether you want to create a relationship shortcut whenever you create a relationship and both these conditions are true.

  1. At least one end for the new relationship is a shortcut.

  2. A relationship exists between the original objects.

转到 Action Menu → Create Relationship

Go to Action Menu → Create Relationship.

如果这是有效的关系,则 Framework manager 希望创建到该关系的快捷方式。单击是。将显示一个列表,其中列出了所有关系,这些关系的一端是模型对象,而另一端是另一个模型对象或到另一个模型对象的快捷方式。

If this is a valid Relationship, Framework manager wants to create a shortcut to the relationship. Click YES. A list appears of all relationships in which one end is a model object and the other end is either another model object or a shortcut to another model object.

单击确定。

Click OK.

Create a Query Subject

查询主题定义为具有一对固有关系的查询项目集合。可以使用 Framework Manager 使用查询主题自定义他们检索的数据。

A query subject is defined as a set of query items that have an inherent relationship. A query subject can be used to customize the data they retrieve using a Framework Manager.

以下是 Framework Manager 中的查询主题类型 −

The following are the query subject types in a Framework Manager −

  1. Data Source Query Subject − These are based on the Relational metadata defined by the SQL statements and are automatically created for each table and view when you import metadata into model. Note − The data source query subject references the data from only one data source at a time, but you can directly edit the SQL that defines the retrieve data to edit the query subject.

  2. Model Query Subjects − They are not directly created from a data source but are based on the query items defined in other query subjects or dimensions. Using the model query subject, it allows you to create more abstract and business view of data source.

  3. Stored Procedure Query Subjects − They are created when a Procedure is imported from a Relational data source. IBM Cognos Framework Manager only supports user defined Stored Procedures and system stored procedures are not supported.

new querysubject

How to create a Data Source Query Subject?

来自 Actions Menu → Create → Query Subject

From Actions Menu → Create → Query Subject.

action menu

输入新查询主题的名称。

Enter the name of a new Query Subject.

单击 Data Source → OK to open new Query Subject wizard

Click on Data Source → OK to open new Query Subject wizard.

data source

按照步骤操作直到出现完成按钮 → 完成

Follow the steps till the Finish button appears → Finish

右键单击 Query Subject → Edit Definition 。单击 SQL tab → Available database objects box, drag objects to the SQL box

Right click on Query Subject → Edit Definition. Click on the SQL tab → Available database objects box, drag objects to the SQL box.

您还可以插入数据源引用、插入宏、嵌入计算并嵌入筛选器。

You can also insert a data source reference, insert a macro, embed a calculation and embed a filter.

从列表中选择操作,然后单击确定。

Select the actions from the list and click OK.

query information

Purpose

Action

Granularity Control

Determinants Tab

To test query subject

Test Tab

To view SQL

Query Information Tab

To view system tables from data source

Show System Objects check box

Edit SQL

当您编辑任何关系数据源,创建或查询关系数据库时,将在后台使用 SQL。您可以使用以下选项:

When you edit any Relation database source, create or query a Relation database, then SQL is used in the background. You can use the following options −

  1. Cognos SQL

  2. Native SQL

  3. Pass through SQL

要编辑模型查询主题的 SQL,请从查询信息选项卡复制代码,并粘贴到新的数据源查询主题。有可能将模型查询主题转换为数据源查询主题。

To edit SQL of the model query subject, copy SQL from query Information tab and paste to the new data source query subject. It is possible to convert a model query subject to data source query subject.

  1. Click Data Source query subject and Action menu → Edit Definition.

  2. Click on SQL button, drag objects or type in SQL you want.

  3. Click OK.

edit sql

Change Type of SQL

在定义数据源查询主题时,可以选择要使用的 SQL 类型。在考虑 SQL 类型时应考虑以下因素:

You can select the type of SQL to be used when you define data source query subject. These factors should be considered while considering type of SQL −

SQL Type

Advantage

Disadvantage

Cognos SQL

Improved performance Work on all supported database

Non Standard SQL not supported

Native SQL

Performance Optimized Specific to Database

SQL doesn’t work on different database. You can’t use SQL that data source doesn’t support for subqueries.

Pass Through SQL

Any SQL supported by database

No option for Framework Manager to optimize performance automatically

另请注意,不能更改基于 OLAP 数据源的查询主题的 SQL 类型。

Also note that it is not possible to change the type of SQL for query subjects based on the OLAP data sources.

要更改 SQL 类型,请转到要更改的查询主题。

To change SQL type, go to Query subject you want to change.

转到 Actions menu → Edit Definition and go to Query Information button

Go to Actions menu → Edit Definition and go to Query Information button.

sql settings tab

转到 Options → SQL Settings tab

Go to Options → SQL Settings tab.

要更改 SQL 类型,请单击“SQL 类型列表”。然后,单击“确定”。

To change the type of SQL, click on SQL Type List. Then, click OK.

Cognos - Query Studio

Query Studio 被定义为在 Cognos 8 中创建查询和报表的基于 Web 的工具。它还用于运行简单的查询和报表。

Query Studio is defined as a web based tool for creating queries and reports in Cognos 8. It is also used to run simple queries and reports as well.

在 Query Studio 中,可以执行以下功能:

In Query Studio, the following functions can be performed −

  1. Viewing Data − Using Query Studio, you can connect to data source to view the data in a tree hierarchy. You can see query subject, query item details, etc.

  2. Creating BI Reports − You can use Query studio to create simple reports by using the data source. You can also refer existing reports to create a new report.

  3. Changing Existing Reports − You can also change existing reports by editing report layout – Add charts, titles, headings, border styles, etc.

  4. Data Customization in Report − You can apply various customizations in reports- Filters, Calculations and aggregations to perform data analysis, drill up and drill down, etc.

Cognos - Ad-hoc Reports

使用即席报表,用户可以创建查询或报表,用于即席分析。即席报表功能允许用户在数据仓库中的事实表和维度表中创建简单查询和报表。

Using ad-hoc reporting, a user can create queries or reports for ad-hoc analysis. Ad-hoc reporting feature allows business users to create simple queries and reports on the top of fact and dimension table in data Warehouse.

Cognos BI 中的 Query Studio 提供以下功能:

The Query Studio in Cognos BI, provides the following features −

  1. View data and perform ad-hoc data analysis.

  2. Save the report for future use.

  3. Work with data in the report by applying filters, summaries and calculations.

  4. To create ad-hoc report using query studio, login to IBM Cognos software and click on Query my data.

ibm cognos software

选择报表包。下次访问此页面时,您将在近期使用的包中看到您的选择。点击包名称。

Select the report package. Next time you visit this page; you will see your selection under the recently used packages. Click on the package name.

select package

在下一个屏幕中,您可以添加维度元素、筛选和提示、事实和计算等等。

In the next screen, you can add Dimension elements, filters and prompts, facts and calculation, etc.

insert data

您应按此顺序插入对象。要在报表中插入对象,您可以使用底部的插入按钮。

You should insert the objects in this order. To insert object in the report, you can use Insert button at the bottom.

  1. Insert and filter dimension elements

  2. Insert filters and prompts

  3. Insert facts and calculations

  4. Apply finishing touches

  5. Save, run, collaborate, and share

顶部为工具栏,您可以在其中创建新报表、保存现有报表、剪切、粘贴、插入图表、向上和向下钻取等。

At the top, you have the tool bar, where you can create a new report, save existing report, cut, paste, insert charts, drill up and down, etc.

new report

将所有对象都插入到报表中后,您可以在顶部单击运行选项()。

When you insert all the objects to a report, you can click on the Run option () at the top.

Cognos - Report Types

您可以在 Cognos Query Studio 中使用不同的报告类型,以满足业务需求。您可以在查询工作室中创建以下类型的报告−

You can use different report types in the Cognos Query Studio to meet the business requirements. You can create the following report types in the Query Studio −

List Reports − 这些报告用于显示您的整个客户群,如下面的屏幕截图中所示。

List Reports − These reports are used to show your entire customer base as shown in the following screenshot.

report types

Crosstab Reports − 这些用于显示产品和地区不同轴的销量数量。

Crosstab Reports − These are used to show quantity sold with product and region on different axis.

Charts − 您可以插入图表以图形化地显示数据。您可以将图表与交叉表或列表报告相结合。

Charts − You can insert charts to show data graphically. You can combine a chart with a Crosstab or also with a list report.

Cognos - Creating a Report

您可以通过从查询工作室中的数据源中插入对象来创建新报告。您还可以更改现有报告,并使用不同的名称保存它。

You can create a new report by inserting objects from the data source in the Query Studio. You can also change an existing report and save it with different name.

您可以转至主页上的查询我的数据选项来打开查询工作室,或者转至 Launch → Query Studio

You can open Query Studio by going to Query my data option on the home page or you can go to Launch → Query Studio.

query studio

在下一个屏幕中,系统将提示您选择一个包以将对象添加到报告中。您可以选择最近使用的包,或者框架管理器中创建的任何其他包。

In the next screen, you will be prompted to select a package to add objects in the reports. You can select a recently used package or any other package created in the Framework Manager.

navigate

您可以看到查询项列在左侧。您可以添加数据并保存报告。

You can see Query items listed on the left side. You can add data and save the report.

query items

Cognos - Open an Existing Report

您可以在查询工作室中打开现有报告,并在进行更改后使用不同的名称保存它。

You can open an existing report in the Query Studio and save it with a different name after making changes.

要打开现有报告,请找到并单击您要打开的报告的名称。

To open an existing report, locate and click the name of the report you want to open.

报告将在查询工作室中打开。您可以使用“使用查询工作室打开”来在 Cognos 连接中识别查询工作室报告。

The report opens in the Query Studio. You can use the Open with Query Studio to identify a Query Studio report in the Cognos Connection.

或者,您可以启动查询工作室并转到顶部的打开选项。

Or you can launch Query Studio and go to open option at the top.

ibm cognos query studio

在可用文件夹的列表中搜索报告 → 确定

Search the report in the list of Available folders → OK

available folder

Cognos - Add Data to a Report

您可以从数据源中添加对象。每个对象都有一个代表图标,并且可以将以下所有对象插入报告:

You can add objects from a data source. Each object has a representative icon and can insert all the following objects to a report.

add data
add data to report

Cognos - Saving a Report

当您在 Query Studio 中保存报表时,它会保存查询定义。它在保存报表时不会保存数据。当您在过去一周内保存的报表时,该报表中的数据会反映数据源中的最新更改。

When you save a report in the Query Studio, it saves the query definition. It doesn’t save the data while saving the report. When you run a report saved a week back, the data in that report reflects the recent changes in the data source.

要保存报表,请单击顶部的保存图标。

To save a report, click on the Save icon at the top.

saving a report

在下一个屏幕中,输入名称、描述和您想要保存报表的路径 → 确定。

In the next screen, enter the name, description and location where you want to save the report → OK.

save the report

Saving a Report with a different Name and Location

您可以使用另存为选项以不同的名称或在不同路径中保存报表,如下面的屏幕截图中所示。

You can use Save as option to save a report with different name or at a different location as shown in the following screenshot.

save a report

Specify a name and location − 若要包括描述,请在描述框中输入您要添加的信息。

Specify a name and location − To include a description, type the information you want to add in the Description box.

save as tab

单击确定。

Click OK.

Cognos - Run a Report

查询工作室中的报告在您从报告中的数据源更新数据时运行。当您打开现有报告或对报告进行任何更改时,查询工作室将再次运行该报告。

A report in the Query Studio runs when you update data from data source in the report. When you open an existing report or make any changes to a report, Query Studio again runs the report.

您可以使用以下选项来运行报告−

You can use the following options to run a report −

  1. Run with Prompt − You can run a report using a user prompt. When you run the report, you are prompted to select the value.

  2. Run with all Data − The Run with all data command runs the report using the full data source. Running a report can take a long time. If you plan to make several changes to a report, run the report in preview mode to save time and computer resources by limiting the rows of data that your report retrieves.

  3. Preview Report with no Data − You can use the preview option when you want to see how the report will look like. This is useful when you want to make formatting changes.

在 Query Studio 中打开所需的报表。从“运行报表”菜单中选择运行报表的选项 −

Open the report that you want in Query Studio. From the Run Report menu, choose how to run the report −

若要使用全部数据运行报表,请单击“使用全部数据运行”,如下面的屏幕截图所示。

To run the report using all the data, click Run with All Data as shown in the following screenshot.

run a report

若要使用有限数据运行报表,请单击“使用有限数据预览”。

To run the report using limited data, click Preview with Limited Data.

preview with limited data

如果报表所基于的程序包包含设计过滤器,则性能会得到改善。

If the package that the report is based on contains a design filter, performance is improved.

若要使用无数据运行报表,请单击“使用无数据预览”。

To run the report using no data, click Preview with No Data.

Run a Report in PDF, XML, and CSV format

您可以以 PDF、XML 或 CSV 格式运行报表。若要以不同格式运行报表,请选中报表并单击“使用选项运行”。

You can run a report in PDF, XML or in a CSV format. To run a report in different formats, select the report and click on Run with options.

select the report

选择您希望其中运行报表的格式。您可以从以下格式中进行选择。选择格式,然后单击底部的“运行”,如下面的屏幕截图所示。

Select the format in which you want to run the report. You can choose from the following formats. Select the format and click Run at the bottom as shown in the following screenshot.

select the format

Cognos - Printing a Report

您还可以打印报表以获取纸质副本。您可以在运行报表时直接输入打印机位置,或者您可以以 PDF 格式运行报表,然后稍后打印此报表的副本。

You can also print a report to get a copy on paper. You can directly enter the Printer location while running the report or you can run the report in a PDF format and later you can take a printout of the report.

若要直接打印报表,请选择该报表并单击“使用选项运行”。

To take the print of the report directly, select the report and click on Run with options.

在“寄送模式”中,选择打印报表并输入位置,如下面的屏幕截图所示。

In the Delivery mode, select print the report and enter the location as shown in the following screenshot.

delivery mode

Cognos - Report Studio

Report Studio 是报表开发者用来基于多个数据源创建多页复杂报表的一款基于网络的工具。您可以创建销售报表、库存报表、账户报表、资产负债表等。

Report Studio is a web-based tool that is used by report developers to create multi pages, complex reports on top of multiple data sources. You can create sales reports, inventory reports, account statements, balance sheets, etc.

How to Create a Report in Report Studio?

若要使用 Report Studio 创建报表,您应很好地了解用户界面。Report Studio 的用户界面被划分为两部分 −

To create Reports in Report Studio, you should have a good understanding on user interface. Report Studio user interface is divided into two parts −

  1. Explorer Bar on the Left Side.

  2. Work area for report design.

report studio

上面的屏幕截图包含三个主要模块,如下所示 −

The above screenshot has three major blocks, which are as follows −

  1. Insertable Object Pane − The Insertable Objects pane contains objects that you can add to a report. These objects can be added by dragging them to the work area. It can contain − Source tab (That contains item from the package). Data Items (Queries created in the report). Toolbox (different objects like graphics that can be added to the report)

  2. Properties Pane − The Properties pane lists the properties that you can set for an object in a report. To get the help, select the property and use keyboard key F1.

  3. Work Area − The work area is known as the area where the report is designed.

How to Open Report Studio?

在主页上,转到 Launch → Report Studio → Select a Package 或在 IBM Cognos 欢迎页中,单击“创作高级报表”以打开 Report Studio。

On the home page, go to Launch → Report Studio → Select a Package or in the IBM Cognos Welcome page, click on Author advanced reports to open Report Studio.

open report studio
select a package

在 Report Studio 主界面中,您可以选择创建新报表或打开现有报表。

On the home screen of Report Studio, you have an option to create a new report or open an existing report.

home screen of report studio

系统会提示您选择要创建的报表类型。您可以选择不同的报表类型。

You will be prompted to select the type of report you want to create. You have the option to select different report types.

Cognos - Report Templates

在 Report Studio 中,您可以创建不同类型的报表。它们能让您以不同的格式呈现数据,如列表报表可用于显示客户信息。

In Report Studio, you can create different types of reports. They allow you to present the data in different formats like a list report can be used to show the customer information.

The following reports can be created in Report Studio

The following reports can be created in Report Studio

List Report

该报表用于以详细格式显示数据。数据显示在行和列中,并且每列包含数据项的所有值。

This report is used to show the data in detailed format. Data is shown in rows and columns and each column contains all the values of a data item.

Quarter

Order number

Quantity

Revenue

Q4

101035

105

$4,200.00

101037

90

$8,470.80

101044

124

$11,479.92

101052

193

$15,952.42

101064

58

$5,458.96

101065

78

$7,341.36

101081

145

$5,800.00

101092

81

$7,623.72

101093

50

$4,706.00

Crosstab

与列表报表相似,交叉表报表也会以行和列方式显示数据,但数据是紧凑而非详细的。在行和列的交叉点,您显示汇总数据。

Like list report, a cross tab report also shows the data in row and columns, but the data is compact and not detailed. At the intersection points of rows and columns, you show the summarized data.

crosstab

Chart

您可以使用 Report Studio 创建多种图表类型,包括柱形图、条形图、面积图与折线图。您还可以创建结合这些图表类型的自定义图表。

You can use the Report Studio to create many chart types, including column, bar, area, and line charts. You can also create custom charts that combine these chart types.

chart

Map

您还可以在 Report Studio 中使用地图来呈现特定地区、国家或位置的数据。

You can also use maps in the Report Studio to present data for a particular region, country or a location.

A map report consists of three parts

A map report consists of three parts

  1. Region Layer

  2. Point Layer

  3. Display Layer

map

Repeater

在运行报表时,可以使用迭代器在报表中添加重复项。要添加迭代器,请从工具箱中将迭代器拖动到工作区中。

Repeaters are used to add repeat items in a report while running the report. To add a Repeater, drag a repeater from the tool box to work area.

repeater

Cognos - List Report

列表报表显示按行和列排列的数据,每个单元格显示数据库中的数据,您还可以在列表报表中添加自定义计算。

A list report that shows the data in rows and columns and each cell shows the data in the database or you can also add custom calculations in a list report.

要创建一个新列表报表,请转到新建 → 空白,如下面的屏幕截图中所示。

To create a new list report, go to New → Blank as shown in the following screenshot.

blank

当您选择一个列表报表时,您将在 Report Studio 中获得报表以下结构。您必须将对象从左侧的包拖动到报表结构中。

When you select a list report, you get the following structure of the report in the Report Studio. You have to drag the objects from the package on the left side to the report structure.

report structure

您还可以编辑将出现在运行报表后显示的报表标题。

You can also edit the title of the report that will appear once you run the report.

product
sales report by customer

您可以在顶部使用不同的工具来进行报表格式设置。要保存报表,请单击保存按钮。要运行报表,请单击运行报表。

You can use different tools at the top for the report formatting. To save a report, click on the save button. To run a report, click on Run report.

run report

在保存报表后,您可以选择将其保存在“公共文件夹”或“我的文件夹”中。

Once you save the report, you have an option to save it in the Public folder or My folder.

public folder

当您单击“运行”选项时,可以选择不同的格式来运行报表。

When you click on the Run option, you can select different formats to run the report.

select different formats
report is running
sales report

Cognos - Crosstab Report

系统将提示您选择要创建的报告类型。您可以从不同的报告类型中进行选择。

You will be prompted to select the type of report you want to create. You have option to select from different report types.

blank

选择交叉表作为报告类型并单击确定。

Select Crosstab as type of the report and click OK.

交叉表报告的结构将按以下屏幕截图所示打开。

The structure of a Crosstab report is opened as shown in the following screenshot.

structure of crosstab report

在可插入对象窗格中的源选项卡上,单击要添加到交叉表的 data 项目并将其拖动至行或列。

In the Insertable Objects pane, on the Source tab, click the data item you want to add to the crosstab and drag it to the Rows or Columns.

source tab

黑色条表示您可以放置 data 项目的位置。重复上述步骤以插入其他 data 项目。

A black bar indicates where you can drop the data item. Repeat the above given steps to insert additional data items.

您可以将维度添加到行或列,并将度量值添加到交叉表,将要度量值拖动至度量值。

You add dimensions to rows or columns and to add measures to the crosstab, drag the measures you want to Measures.

revenue

当您运行报表时,将生成具有一个边缘的交叉表报表。

When you run the report, a crosstab report is generated that has one edge.

Formatting a Crosstab

您还可以设置交叉表格式,以使其外观符合要求。当您为所有行、列、数据单元格或交叉表指定格式时,该格式将自动应用于您添加的任何新项目。

You can also format the crosstab to give them appearance as per the requirement. When you specify formatting for all rows, columns, fact cells, or the crosstab, the formatting is automatically applied to any new items you add.

Crosstab Style order

当您应用诸如字体颜色等样式、行和列、交叉点时,将按以下顺序应用这些样式。

When you apply styles such as font color, rows and columns, intersections this is applied in the following order.

  1. Crosstab fact cells

  2. Fact cells in the outermost rows

  3. Fact cells in the innermost rows

  4. Fact cells in the outermost columns

  5. Fact cells in the innermost columns

  6. Crosstab intersections

若要设置交叉表的格式,请点击交叉表中的任何位置。点击属性窗格标题栏中的选择祖先按钮,然后点击交叉表,如下图所示。

To do formatting of crosstab, click anywhere in the Crosstab. Click the select ancestor button in the title bar of the Properties pane and then click Crosstab as shown in the following screenshot.

ancestor button

在属性窗格中,点击所需的属性,然后指定值。例如,如果您要指定背景颜色,请点击背景颜色,然后选择要使用的颜色。

In the Properties pane, click the property you want and then specify a value. For example, if you want to specify a background color, click on Background Color and choose the color you want to use.

properties pane

您还可以右键点击行或列并点击选择成员实际单元格。在属性窗格中,点击所需的属性,然后指定值。

You can also right-click the row or column and click Select Member Fact Cells. In the Properties pane, click the property you want and then specify a value.

select member

Cognos - Creating a Chart

在 Report Studio 中,您可以创建多种图表类型,如柱形图、条形图、面积图、折线图或结合这些图表类型的自定义图表。

In Report Studio, you can create many chart types like column, bar, area, line charts or a custom chart that combines these chart types.

chart types
insert chart

在“来源”选项卡中,展开查询。

In the Source tab, expand the query.

  1. Drag Revenue to the Measure (y-axis) drop zone.

  2. Drag Current year to the Series drop zone.

  3. Drag Order to the Categories (x-axis) drop zone.

drag objects

按照上面屏幕截图中显示内容拖动对象。

Drag the objects as shown in the above screenshot.

edit text

使用顶部的工具栏保存图表。如前一主题中所述,将其保存到 Public 或 My Folder。运行报告以表格格式查看结果。

Save the chart using the tool bar at the top. Save it to Public or My Folder as mentioned in the previous topic. Run the report to see the result in a chart format.

您还可以在 Cognos Report Studio 中创建一个 Repeater 表或地图报告。

You can also create a Repeater table or a map report in Cognos Report Studio.

Cognos - Report Functions

Cognos 报告中可以使用各种报表函数。

There are various Report functions that can be used in a Cognos report.

其中一些不同的报表函数包括 −

Some of these different report functions include −

_days_between

此函数用于返回一个正数或负数,代表两个 datetime 表达式之间的天数。如果 timestamp_exp1 < timestamp_exp2,则结果将为负数。

This function is used to return a positive or a negative number representing the number of days between the two datetime expressions. If a timestamp_exp1 < timestamp_exp2 then the result will be a –ve number.

How to use

_days_between(timestamp_exp1, timestamp_exp2)

_days_to_end_of_month

此函数用于返回一个数字,表示由 datetime 表达式 timestamp_exp 表示的月份中剩余的天数。

This function is used to return a number representing the number of days remaining in the month represented by the datetime expression timestamp_exp.

How to use

_days_to_end_of_month(timestamp_exp)

_first_of_month

此函数用于返回一个 datetime,它是 timestamp_exp 表示的月份的第一天。

This function is used to return a datetime that is the first day of the month represented by timestamp_exp.

_add_days

此函数用于返回在 timestamp_exp 中添加 integer_exp 天所产生的 datetime。

This function is used to return the datetime resulting from adding integer_exp days to timestamp_exp.

How to use

_add_days(timestamp_exp, integer_exp)

_add_months

此函数用于返回在 timestamp_exp 中添加 integer_exp 月所产生的 datetime。

This function is used to return the datetime resulting from adding integer_exp months to timestamp_exp.

How to use

_add_months(timestamp_exp, integer_exp)

_add_years

此函数用于返回在 timestamp_exp 中添加 integer_exp 年所产生的 datetime。

This function is used to return the datetime resulting from adding integer_exp years to timestamp_exp.

How to use

_add_years(timestamp_exp, integer_exp)

_age

此函数用于返回一个数字,它是从今天 YYYYMMDD 格式(年、月、日)中的日期中减去 timestamp_exp 而获得的。

This function is used to return a number that is obtained from subtracting timestamp_exp from today’s date in YYYYMMDD format (years, months, days).

How to use

_age(timestamp_exp)

_day_of_week

此函数用于返回星期几(1 到 7 之间),其中 1 是星期几的第一天,如 integer_exp(1 到 7 之间,1 为星期一,7 为星期日)所示。请注意,在 ISO 8601 标准中,星期一为第 1 天。在北美,星期日为星期的第一天为第 7 天。

This function is used to return the day of week (between 1 and 7), where 1 is the first day of the week as indicated by integer_exp (between 1 and 7, 1 being Monday and 7 being Sunday). Note that in ISO 8601 standard, a week begins with Monday being day 1. In North America where Sunday is the first day of the week being day 7.

How to use

_day_of_week(timestamp_exp, integer_exp)

_day_of_year

此函数用于返回 date_exp 中的年第几天(1 到 366)的序数。也称为儒略日。

This function is used to return the ordinal for the day of the year in date_ exp (1 to 366). Also known as the Julian day.

How to use

_day_of_year(timestamp_exp)

像这些一样,还有其他各种可用的报表函数。

Like these, there are various other Report functions as well that can be used.

Cognos - Report Validation

这用于确保您的报告不包含任何错误。当升级在较旧版本的 Cognos 中创建的报告时,会自动对其进行验证。

This is used to ensure that your report doesn’t contain any error. When a report created in the older version of Cognos is upgraded it is automatically validated.

若要验证报告,请转到 Tools 菜单并单击 Validate 按钮,如下图所示。

To validate a report, go to the Tools menu and click on the Validate button as shown in the following screenshot.

tools
validation response

有不同的 Validation 级别 −

There are different Validation levels −

  1. Error − To retrieve all errors returned from the query.

  2. Warning − To retrieve all errors and warnings returned from the query.

  3. Key Transformation − To retrieve important transformation steps.

  4. Information − To retrieve other information related to query planning and execution.

validation options

Cognos - Report Run with Options

您可以使用不同的选项运行报告。要设置报告选项,请转至运行选项。

You can run the report with different options. To set the report options, go to Run options.

You get different options

You get different options

  1. Format − You can select from different format.

run options
  1. To select Paper size − You can select from different paper sizes, orientation.

  2. Select Data mode − All data, limited data, and no data.

  3. Language − Select language in which you want to run the report.

  4. Rows per page and prompt option, etc.

run option tab

Cognos - Report Administration

报告管理允许您向不同用户授予报告级别的权限。您可以定义诸多其他属性,如输出版本、权限、常规属性等等。

Report Administration allows you to give permissions to different users on the report level. You can define various other properties like output versions, permissions, general properties, etc.

要打开报告属性和权限选项卡,请转至 IBM Cognos 主页中的更多选项。

To open Report Properties and the permissions tab, go to More Options in the IBM Cognos home page.

report properties

您可以在更多选项中选择下列动作−

You can select the following actions in more options −

available actions

在权限选项卡,您可以指定此条目的访问权限。默认情况下,条目从父级获取其访问权限。您可以用明确为此条目设置的权限覆盖这些权限。

In the permission tab, you can specify access permissions for this entry. By default, an entry acquires its access permissions from a parent. You can override those permissions with the permissions set explicitly for this entry.

permissions

您还可以在更多选项中移动、复制或删除报告。您可以创建报告的快捷方式条目或报告视图。

You can also move, copy or delete a report in More Options. You can create a shortcut entry or report view of the report.

Cognos - Filters

使用过滤器来限制报告中所需的数据。可以在 Cognos 报告中应用一个或多个过滤器,报告会返回符合过滤器条件的数据。您可以根据要求在报告中创建多个自定义过滤器。

Filters are used to limit the data that you want in your report. You can apply one or more filters in a Cognos report and the report returns the data that meet the filter conditions. You can create various custom filters in a report as per the requirement.

  1. Select the column to filter by.

  2. Click the drop down list from the Filter button.

  3. Choose Create Custom Filter.

  4. The Filter Condition dialog displays.

create custom filters

在下一个窗口中,定义过滤器的参数。

In the next window, define the filter’s parameters.

  1. Condition − click the list arrow to see your choices (Show or Don’t show the following values).

  2. Values − click the list arrow to see your choices.

  3. Keywords − allows you to search for specific values within the values list.

  4. Values List − shows the field values which you can use as filter values. You can select one or many. Use the arrow button to add multiple values.

filter condition

选择一个值,然后单击指向右边的箭头以将该值移入选定栏。您可以使用 Ctrl 键一次添加多个值。在定义好筛选器后单击确定。

Select a value and click the right pointing arrow to move the value into the selected column. You can use the Ctrl key to add multiple values at tone time. Click OK when the filter is defined.

Note - 您可以在查询资源管理器页面(而非页面资源管理器)中查看筛选器。您可以转至查询资源管理器并查看筛选器。

Note − You can view filters in the Query Explorer page and not the page explorer. You can go to the query explorer and view the filters.

query explorer

Deleting a Filter

可以通过以下步骤删除筛选器 -

A filter can be deleted by using the following steps −

  1. Go to the Query Explorer as shown in the above screenshot

  2. Click on Query and Locate the Detail Filters pane in the upper right side of the window as shown in above screenshot

  3. Select the filter that you want to delete and press the delete button

  4. You can also cut/copy a filter

deleting filter

Cognos - Custom Calculations

您可以根据业务要求向报告中添加自定义计算。借助运算符,可以添加不同的计算,例如如果要将一个新值薪水*0.2 添加作为奖金。

You can add custom calculations to your report as per the business requirement. With the help of operators, different calculations can be added like if you want to add a new value salary*0.2 as a Bonus.

在报告中创建计算 -

To create Calculations in a Report −

  1. Select the item in the report.

  2. Click the insert calculation button and select the calculation to perform.

Note - 不适用于您选择项的计算将显示为灰色。

Note − Calculations that are not applicable to the items you selected are greyed out.

insert calculations

若要更改加到报告中的运算符的顺序或计算项的名称,请单击“自定义”。计算会作为您的报告中的新行或新列显示。

To change the order of the operands or the name of the calculated item added to the report, click Custom. The calculation appears as a new row or a column in your report.

custom

Drilling

向下钻取和向上钻取用于通过在信息级别之间移动来执行分析。向下钻取用于查看更详细的信息直至最低级别,而向上钻取用于比较结果。

Drill up and drill down is used to perform analysis by moving between levels of information. Drill down is used to see more detailed information to lowest level and drill up is used to compare the results.

要在单行或单列中向下钻取或向上钻取,将指针悬停在标签文本上,直到出现带加号 (+) 和插入符状向下钻取向上钻取图标的图标,文本也出现下划线,然后单击。

To drill down or up in a single row or column, pause the pointer over the label text until the icon with the plus sign (+) and caret drill down drill up icon appears and the text is underlined, and then click.

要同时收起或展开某行和某列的数据,请点击该行和该列交叉格中的值,然后再次点击。

To drill down or up in both a row and column simultaneously, click on the value at the intersection of the row and the column, and then click again.

Cognos - Analysis Studio

Analysis Studio 用于关注对企业重要的项目。您可以进行比较、趋势分析和其他分析,例如绩效最好和最差的分析,还能与其他人共享您的分析。

Analysis Studio is used to focus on the items that are important for the business. You can do comparisons, trend analysis and analysis like top and bottom performers and also allow you to share your analysis with others.

Analysis Studio 不仅可由商业智能分析员使用,还可由理解业务并希望使用历史数据查找业务查询答案的商业用户使用。

Analysis Studio is not only used by BI Analysts but also by business users who understand business and want to find answers to business queries using historical data.

您可以使用 Analysis Studio 来比较和处理数据,以便了解数据之间的关系及其相关重要性。无论您是希望评估收益增长还是识别绩效最好的人员,Analysis Studio 都会提供您为分析所需的筛选、计算和排序支持。

You can use Analysis Studio to compare and manipulate data to understand the relationships between data and its relative importance. Whether you want to assess revenue growth or to identify top performers, Analysis Studio provides the filtering, calculating, and sorting support you need for analysis.

Interface

Analysis Studio 由多部分构成,这些部分将显示在下列区域中,并且也会得到详细解释。

The Analysis Studio consists of several areas that are shown in the following areas and are explain in detail as well.

interface
  1. Insertable Object Pane − The Source tab of the Insertable Objects pane contains the source tree for the package selected for the analysis.

  2. Information Pane − The Information pane shows the name, level, attributes (if any), and aggregation associated with the selected item in the source tree, as well as any additional information provided by the data modeler.

  3. Properties Pane − You can use Properties pane to make several changes and apply them at the same time, instead of running different commands.

  4. Work Area − This area contains the crosstab or charts to perform the analysis. You can display analysis in the form a Crosstab, chart or a combination of both.

最后还有 Overview Area

And lastly there is the Overview Area as well.

Cognos - Create an Analysis

要在 Analysis studio 中创建分析,您必须选择一个包作为数据源。您可以创建一个新分析,或者使用现有的分析作为参考来创建新分析,方法是先更改它的名称再保存它。

To create an analysis in the Analysis studio, you have to select a package as data source. You can create a new analysis or use an existing analysis as reference to create a new analysis by changing its name before saving it.

要创建一个分析 − 从 Public 文件夹中选择您想要使用的包。转到 Report Studio,如以下屏幕截图所示。

To create an Analysis − Select the Package you want to use from the Public folder. Go to Report Studio as shown in the following screenshot.

create an analysis

在新的对话窗口中,选择 Blank Analysis 或 Default Analysis。

In a new dialog window, select a Blank Analysis or Default Analysis.

  1. Blank Analysis − A blank analysis starts with a blank crosstab in the work area.

  2. Default Analysis − A default analysis uses the default analysis for the package as defined in Cognos Connection or the first two dimensions in the data source for the crosstab rows and columns and the first measure in the data source for the crosstab measure.

选择后,单击 OK。Analysis Studio 将开始运行。您可在分析中使用的项目会列在可插入对象窗格中。

After selecting, click OK. The Analysis Studio starts. The items that you can use in the analysis are listed in the Insertable Objects pane.

analysis studio

Cognos - Save an Analysis

要保存分析,您可以单击顶部的保存按钮,如以下屏幕截图所示。

To save an analysis, you can click on the save button at the top as shown in the following screenshot.

save analysis

输入分析的名称和位置 → 然后单击 OK。

Enter a name of the analysis and location → then click OK.

Cognos - Open Existing Analysis

要打开现有的分析,找到您想要打开的分析的名称并单击它。它将在 Analysis Studio 中打开。

To open an existing Analysis, locate the name of the analysis that you want to open and click it. It is opened in Analysis Studio.

open existing analysis

您可以根据要求进行任何更改。保存分析。

You can make any changes as per the requirement. Save the analysis.

在现有分析中工作时,您还可以打开一个新分析,单击工具栏上的新建按钮。新分析将维护可插入对象窗格中源树的状态并维护分析项选项卡中的任何项目。

You can also open a new analysis while working in an existing analysis, click the new button on the toolbar. The new analysis maintains the state of the source tree in the Insertable Objects pane and maintains any items on the Analysis Items tab.

Cognos - Event Studio

Cognos Event Studio 是一款基于 Web 的工具,可让您创建和管理代理以监控数据并在数据满足预定义阈值时执行任务。

Cognos Event Studio is a Web-based tool that allows you to create and manage agents to monitor data and perform tasks when the data meets predefined thresholds.

Events

您可以指定事件条件以执行任务。事件被定义为数据包中的查询表达式。

You can specify an event condition to perform a task. An event is defined as query expression in a data package.

当记录与事件条件匹配时,它将导致代理执行任务。代理运行时,它将检查数据是否有任何事件实例。

When a record matches the event condition, it causes an agent to perform tasks. When an agent runs, it checks the data for any event instances.

Event Instance

代理监控数据,每个事件实例都会被检测到。遵循任务执行规则以确定代理是否将执行该任务。任务频率定义了任务应执行一次还是针对每个事件实例重复执行。

An agent monitors data, each event instance is detected. Task execution rules are followed to determine if an agent will perform the task. Task frequency defines that a task should be performed once or repeated for each event instance.

event instance

Event List

您可以根据执行的任务对事件进行分类。事件列表显示由代理执行的所有事件。不同的事件分类包括 -

You can categorize the event as per the task performed. The event list shows all the events that are executed by an agent. Different event categorization includes −

  1. New

  2. Ongoing and Changed

  3. Ongoing and Unchanged

  4. Ceased

事件密钥用于确定事件是否为新的、正在进行但已更改的、正在进行且未更改的或已停止的。Event Studio 将在每次代理运行中检测到的事件实例与上次运行中检测到的事件实例进行比较。为了确保正确匹配事件实例进行比较,您必须定义事件密钥。事件密钥是唯一定义事件实例的数据项的组合。

An event key is used to determine whether an event is new, ongoing but changed, ongoing and unchanged, or ceased. Event Studio compares the event instances detected in each agent run with those detected in the previous run. To ensure it correctly matches the event instances for comparison, you must define an event key. The event key is the combination of data items that uniquely defines an event instance.

Agent

代理运行会检查事件的发生情况。代理对符合执行规则的事件执行任务。

An agent runs to check occurrences of the event. An agent performs a task for events that meet the execution rules.

Tasks

任务可用于通知用户有关业务事件的变更。用户可以根据事件采取适当的措施。

A task can be used to notify users about a change in business event. Users can take appropriate actions as per the event.

您可以为以下功能创建任务:

You can create a task for the following functions −

  1. Add an Item

  2. Send an Email

  3. Publish a new item

  4. Run a Job

  5. Run an import

  6. Run an Export and many more.

Cognos - Notification Methods

代理可以使用不同的通知方法通知企业用户。代理可以通过以下方式通知业务用户:

An agent can use different notification methods to notify business users. An agent can notify business users by −

  1. An email to business users.

  2. Publishing a news item to a folder frequently used by users.

Email to Business Users

您可以使用报告任务或电子邮件任务通过电子邮件通知人们。为了帮助您确定使用哪种方法,您应该了解它们的不同之处。

You can notify people by email using either a report task or an email task. To help you decide which method to use, you should understand how they differ.

您可以使用报告任务或电子邮件任务 -

You can use either a report task or an email task −

  1. To send a single email text message.

  2. To attach a single report in the specified output formats.

  3. If you attach only one HTML report and leave the body field empty, the report appears in the message body.

  4. To add links to a single report for the specified output formats.

News Item Published

在其中,您可以在文件夹中发布新闻项目/标题,其内容可以在 Cognos Navigator 端口和任何文件夹视图中查看。当商业用户单击标题时,可以打开该内容或将其作为网页查看。

In this, you can publish a news item/headline to a folder whose content can be viewed in a Cognos Navigator portlet and in any folder view. When a Business user clicks on the headline, it can open the content or view it as a web page.