You are on page 1of 11

Cognos Query

TIPS AND GUIDELINES COGNOS Query

Author(s) Reviewed by

Name Sreevidhya R.V. Aditya MSS, Prabhakar Mohanarangam

Account / Business Group EXEL/Retail, CPG & Distribution Exel/Retail, CPG & Distribution

Wipro Confidential

Page 1 of 11

Cognos Query

TABLE OF CONTENTS
1 2 3 4 5 6 7 8 9 Introduction ..................................................................................................... 3 Purpose ........................................................................................................... 3 Target Audience ...............................................................................................3 Cognos Query .................................................................................................. 4 How components work with Cognos Query...........................................................5 Cognos Architect...............................................................................................6 Best Practices-Cognos Query.............................................................................. 9 Comparison of Cognos Query with Cognos Report net Query Studio:..................... 10 Authors Profile............................................................................................... 11

Wipro Confidential

Page 2 of 11

Cognos Query

Introduction
This document is primarily intended for Designers, Application Developers and Report Authors using Cognos WebQuery.

Purpose
This document aims to Develop and use best practices and information related to Cognos WebQuery Provide guidelines to the development team as a central source of information.

Target Audience
This document is written for professional Cognos WebQuery developers to help them with Designing web queries using Cognos Architect, which are easy to maintain and enhance.

Wipro Confidential

Page 3 of 11

Cognos Query

Cognos Query

Cognos Query is an ad hoc query tool used to explore, modify, and create queries and publish them on the Web. Cognos Query is part of an enterprise reporting solution. It uses Architect for metadata management. Metadata management involves retrieving metadata from data sources, adding business information and rules, packaging portions of the model, and distributing those packages to Cognos Query users. Cognos Query provides an easy to use and understand interface for non technical Web Intelligence users to run queries against a database and to create reports and perform data analysis. An Organization maintains several data sources to support the information requirements of various groups. Typical storage methods include relational databases and data warehouses. To deliver the information in a meaningful way, the data must be organized and packaged. Cognos Architect is used to create a business model based on the available data sources and the activities of the organization. The Architect model includes packages to meet the information requirements of specific groups. To make the information from the Architect model available to Cognos Query users, it has to be published as a package to Upfront. The publish process creates NewsItems in a specific NewsBox. Each NewsItem is associated with a foundation query or a New Query wizard. Ex:

Wipro Confidential

Page 4 of 11

Cognos Query

How components work with Cognos Query

Based on organization structure and security requirements user classes and access privileges are created in access manager and signon information are added to data source folders . Impromptu catalogs & metadata from SQL server are taken and a business model is created using Cognos Architect. Filters, calculations and prompts are added and package can be created and published in Cognos upfront. The published package can be viewed in upfront using Cognos Query. A. Data from relational business data or metadata repository. B. User class and access privileges are defined in access manager C. A and B are taken as inputs for Architect. Joins are defined and Business model is created and package is published. The published package is available in Cognos upfront as a link to end user.

D.

Wipro Confidential

Page 5 of 11

Cognos Query

Cognos Architect

Architect is a Business Intelligence metadata management tool. Architect model provides a central location for data warehouses metadata as well as creating a reusable environment for calculations, filters, prompts and display properties.

An Architect model is used to publish queries to Upfront, which is Cognos portal on the web, for Cognos Query. The Architect model has 3 different layers .They are Data access layer Business layer Package layer

Data Access Layer The data access layer contains the metadata that describes how to retrieve data from the physical environment. Tables, columns, joins, and other database objects may be included, as well as SQL statements and user-defined functions. The data may exist in multiple sources, such as relational databases or Impromptu HotFiles, or may be retrieved by using stored procedures, user-defined functions, or SQL statements.

EX: As shown below, in the database layer the required tables and their corresponding columns are pulled from database.

Wipro Confidential

Page 6 of 11

Cognos Query

Business Layer The business layer describes the business view of the corporate data as well as the information that your report authors and query designers require. It consists of the business model (entities, attributes, and relationships), which can be viewed as an entityrelationship diagram, business rules (calculations, filters, and prompts), and display rules (styles, and enumeration values). Architect generates objects in the business layer based on the objects in the data access layer. Based on the requirement business layer can be modified to reflect users reporting and querying requirements.

EX: As shown below, in the business layer the columns in the table are renamed with business/logical names to make it more intelligible for the business to understand what data the column has.

Wipro Confidential

Page 7 of 11

Cognos Query

Package Layer The package layer contains 2 packages Default package and Custom package

Default package references every object in the business layer. Custom packages usually refer specific portions of the business layer. Each package may be targeted for one or more Cognos product

Ex: As shown below, a custom package Customer Analysis has been created and published to Cognos upfront.

Once the package is published in Upfront a link will be created in upfront as shown below and it can be used by user to view the report.

Wipro Confidential

Page 8 of 11

Cognos Query

Best Practices-Cognos Query

There are many reasons why Web Query may not be as fast as expected. It is an internet hosted application and can suffer from both global and local network and internet speeds. Following are some suggestions for actions which can be taken to improve the speed of Cognos Web Query Remove any 'Sorts' in the query design. The query server has to do this work in the background and a sort is very easy to apply in MSExcel if you are exporting the report. Remove any unnecessary filters. Increase the query timeout limit for queries you know take a long time to run. This can be done using the option in (Advanced > Properties > Query Time Out). The default is 180 (seconds). It can be increased up to 360 or more depending on the length of your query. Use specific date fields for search criteria. For example if there is a date field column then filter can be applied at the date field and search 'Between' two dates as opposed to using Year and Month filtering. The query will be faster if filters have been applied at the indexed column. Use smaller search criteria. If you require data for 6 months and the query times out, try searching for 3 months at a time, or 1 month in order to obtain your results. Transient Internet or Network conditions. As a web delivered application, Cognos query can suffer from the vagaries of an individuals internet connection and even suffer from poor performance delivered by local ISPs. Also, network overloads may mean that although the query is running, the network is unable to return the results quickly enough. Quite often, by not running the Web Query right away and waiting until a later time or date, network or server speeds and traffic have improved and user can enjoy greater success. Poorly constructed queries. Because the Query tool relies on the way in which a user has defined the filters, and even on the way in which the user has joined tables together it can be adversely affected by poor construction practices. Users

Wipro Confidential

Page 9 of 11

Cognos Query

have to try to choose the field they believe to have the most unique values to filter first. Over-utilization of the query service. There may be too many users submitting queries for the current hardware to handle the volume of traffic. Users should not click the 'Run Query' button more than once. Doing so submits the query multiple times and overloads the LIU Web Query server. Export the query. Cognos query will take time to export the report to Excel, PDF formats. If the user clicks on the Export button again and again then it will degrade the performance of the export.

Comparison of Cognos Query with Cognos Report net Query Studio:

Cognos Query works the same way as Report net Query studio. Both are used for adhoc reporting. Model creation: In Cognos query model is created using a Cognos Architect in which the data is retrieved from database and the required columns are put in database layer and business logical names are given in Business layer and the package is created in package layer. Where as in Cognos Reportnet the model is created using Framework manager. Instead of 3 different layers, 2 namespaces say database namespace and Business namespace are created and the package is published. Publishing Package: Package created using Cognos Architect can be published in Cognos upfront where as the package created using Framework manager can be published in Cognos Reportnet portal. Query Runtime: In Cognos Query, the query execution time can be defined using the option Advanced>properties->Query Time out limit. In Cognos Report net Query studio, the run time can be limited in framework manager before publishing the package. Other features: Sorting, Grouping and calculations works the same way in Cognos Query and Report net Query studio.

Wipro Confidential

Page 10 of 11

Cognos Query

Authors Profile

Sreevidhya Ramamoorthy is a Project Engineer from Enterprise Solutions-Data Warehousing group at Wipro Technologies. For further information or specific clarifications, contact sreevidhya.ramamoorthy@wipro.com.

Wipro Confidential

Page 11 of 11

You might also like