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

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

2 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. 3 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 . Application Developers and Report Authors using Cognos WebQuery.Cognos Query 1 Introduction This document is primarily intended for Designers.

adding business information and rules. Each NewsItem is associated with a foundation query or a New Query wizard. Cognos Architect is used to create a business model based on the available data sources and the activities of the organization. To make the information from the Architect model available to Cognos Query users. modify. Cognos Query is part of an enterprise reporting solution. Ex: Wipro – Confidential Page 4 of 11 . and create queries and publish them on the Web. the data must be organized and packaged.Cognos Query 4 Cognos Query Cognos Query is an ad hoc query tool used to explore. The Architect model includes packages to meet the information requirements of specific groups. To deliver the information in a meaningful way. An Organization maintains several data sources to support the information requirements of various groups. and distributing those packages to Cognos Query users. packaging portions of the model. It uses Architect for metadata management. Typical storage methods include relational databases and data warehouses. The publish process creates NewsItems in a specific NewsBox. Metadata management involves retrieving metadata from data sources. it has to be published as a package to Upfront. 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.

B. Wipro – Confidential Page 5 of 11 . A and B are taken as inputs for Architect. A. Data from relational business data or metadata repository. User class and access privileges are defined in access manager C. D. calculations and prompts are added and package can be created and published in Cognos upfront.Cognos Query 5 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 . Joins are defined and Business model is created and package is published. Impromptu catalogs & metadata from SQL server are taken and a business model is created using Cognos Architect. The published package is available in Cognos upfront as a link to end user. Filters. The published package can be viewed in upfront using Cognos Query.

An Architect model is used to publish queries to Upfront. The Architect model has 3 different layers . which is Cognos portal on the web.Cognos Query 6 Cognos Architect Architect is a Business Intelligence metadata management tool. in the database layer the required tables and their corresponding columns are pulled from database. Architect model provides a central location for data warehouse’s metadata as well as creating a reusable environment for calculations.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. columns. as well as SQL statements and user-defined functions. and other database objects may be included. EX: As shown below. such as relational databases or Impromptu HotFiles. Tables. filters. or may be retrieved by using stored procedures. for Cognos Query. Wipro – Confidential Page 6 of 11 . user-defined functions. joins. The data may exist in multiple sources. prompts and display properties. or SQL statements.

Architect generates objects in the business layer based on the objects in the data access layer. and relationships). Wipro – Confidential Page 7 of 11 . business rules (calculations. filters. which can be viewed as an entityrelationship diagram. and enumeration values). EX: As shown below. and display rules (styles.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. Based on the requirement business layer can be modified to reflect users’ reporting and querying requirements. It consists of the business model (entities. and prompts). 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. attributes.

Custom packages usually refer specific portions of the business layer. 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. 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.Cognos Query Package Layer The package layer contains 2 packages • • Default package and Custom package Default package references every object in the business layer. Wipro – Confidential Page 8 of 11 .

the network is unable to return the results quickly enough. As a web delivered application. Because the Query tool relies on the way in which a user has defined the filters. Also. Cognos query can suffer from the vagaries of an individual’s internet connection and even suffer from poor performance delivered by local ISPs. or 1 month in order to obtain your results. • Poorly constructed queries. 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. network or server speeds and traffic have improved and user can enjoy greater success. This can be done using the option in (Advanced > Properties > Query Time Out).Cognos Query 7 Best Practices-Cognos Query There are many reasons why Web Query may not be as fast as expected. If you require data for 6 months and the query times out. Increase the query timeout limit for queries you know take a long time to run. try searching for 3 months at a time. The default is 180 (seconds). Use smaller search criteria. by not running the Web Query right away and waiting until a later time or date. It can be increased up to 360 or more depending on the length of your query. Users Wipro – Confidential Page 9 of 11 . It is an internet hosted application and can suffer from both global and local network and internet speeds. and even on the way in which the user has joined tables together it can be adversely affected by poor construction practices. • • Remove any unnecessary filters. • Transient Internet or Network conditions. Quite often. 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. • Use specific date fields for search criteria. 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. network overloads may mean that although the query is running. • • The query will be faster if filters have been applied at the indexed column.

Both are used for adhoc reporting. Other features: Sorting. 2 namespaces say database namespace and Business namespace are created and the package is published. 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. • Export the query. Cognos query will take time to export the report to Excel. the query execution time can be defined using the option Advanced>properties->Query Time out limit.Cognos Query have to try to choose the field they believe to have the most unique values to filter first. Wipro – Confidential Page 10 of 11 . • Over-utilization of the query service. PDF formats. If the user clicks on the ‘Export’ button again and again then it will degrade the performance of the export. Query Runtime: In Cognos Query. 8 Comparison of Cognos Query with Cognos Report net Query Studio: Cognos Query works the same way as Report net Query studio. Instead of 3 different layers. Where as in Cognos Reportnet the model is created using Framework manager. 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. the run time can be limited in framework manager before publishing the package. There may be too many users submitting queries for the current hardware to handle the volume of traffic. In Cognos Report net Query studio. Grouping and calculations works the same way in Cognos Query and Report net Query studio. 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.

Wipro – Confidential Page 11 of 11 .Cognos Query 9 Author’s Profile Sreevidhya Ramamoorthy is a Project Engineer from Enterprise Solutions-Data Warehousing group at Wipro Technologies.ramamoorthy@wipro. contact sreevidhya.com. For further information or specific clarifications.