Tuesday, January 31, 2017

Content deployment in Cognos Environments

Keywords: Deploy, Deployment, Export, Import, Content Store

     Outside of a Proof of Concept, any environment where an application like Cognos is installed, it is wise to have at least two instances, one for development and one for production. In these cases you will have to deploy reports and other content from development to production and vice-versa.  There are multiple ways this can be done depending on your needs.

Deployment through the Cognos Portal: 
     This is the recommended and preferred method and works for all requirements. You will be using the deployment wizard to do this:
  • Login to your production environment and launch "IBM Cognos Administration" from Cognos Portal.
  • Click on "Configuration" tab and "Content Administration" in the left pane.
  • From the toolbar item, click "New Export"
  • Enter a name of the export and a description (optional) and click Next
  •  Next, select the desired deployment method: You can choose to export the entire content store or only selected folders or packages.
  • If you pick the entire content store, you can optionally include user account information to have the same security settings as in the production environment
  • In the next step, entire a name for the archive. This will be the file name when the export completes.
  • If you are exporting the entire content store, cognos requires you to encrypt the archive using a password. Enter a password:
  •  After this step, review the settings, save and run the export.
  • Check the activities in IBM Cognos Administration to make sure export runs and completes successfully.
  • Login to the production cognos server and navigate to: <cognos install directory>\deployment folder.
  • Find the zip file with the name you entered in the Export wizard.
  • Copy this file to the development environment.
  • Now login to the Development environment and navigate to Content Administration.
  • Create a "New Import" from the toolbar icon
  • Select the archive that you just copied over and click next.
  • Select the desired settings and click Finish.
  • Now your content from production environment will be imported.
  • Go to "Current Activities" in the "Status" tab of "IBM Cognos Administration" and make sure the import completes successfully.

Monday, May 2, 2016

Cognos Framework Manager Design Best Practices - 1

This proven design is based on using a data warehouse as the data source. 4 Layers are implemented as namespaces in Framework Manager as follows:

Database Layer:
A replica of the source database. Use the Metadata Import wizard to get tables into this namespace.
Do not meddle with the data source queries created by the import as this will adversely affect query performance for end users.
The other tasks that need to be done in this layer are:
a. Set usage correctly – “identity” for surrogate keys, “fact” for sumable numbers, otherwise set to “attribute”.
b. Create 1:N relationship from each dim to fact. I prefer to do this manually rather than allow the Metadata Import wizard to do it incorrectly. Only inner joins, not outer joins!!!
c. Add Determinants on dimensions only, no determines on facts. Top down approach – group by from the top down to unique for surrogate key at the bottom.

Modelling Layer:
Here we create queries that reference data source queries from the Database layer. At a minimum, create identical query subject in the Modelling layer for each data source query in the Database layer. You can also rename queries and its items to your hearts content. If you’ve got a well designed data warehouse as the data source you should not have to rename all the items. The one thing I do is take out the word “Dim” and “Fact” from the query subject names to make them more user friendly.
Relationships are duplicated/recreated in this layer from the Database layer. If sub dimensions or sub facts queries are created then additional relationships need to be added that do not exist in the Database layer.
Other tasks you can do in this layer
a. business calculations eg gross margin, gross margin %
b. amounts in standard currencies
c. folders inside query subjects to organise query items rather than just seeing a big long list of item
d. hide items eg surrogate keys
e. set default formats for numbers and dates

DMR Layer (Optional):
This is where we create multi-dimensional ROLAP cubes containing dimension hierarchies and measures.

Presentation Layer:
Contains star schema groups (right click on each fact in the Modelling layer and and each measures dimension in the Dimensional layer to create and cut and paste into this layer).
Optionally, create namespaces or folders to separate relational objects from dimensional objects. I like to create two namespaces, “Query” and “Analysis”. Query is for the SQL fact based star schema groups and Analysis is for the Dimensional star schema groups

Governor Settings in Cognos

Governor Settings in Cognos:

Governor settings are used to reduce system resource requirements and improve performance. You set governors before you create packages to ensure the metadata in the package contains the specified limits. All packages that are subsequently published will use the new settings. There are a number of governors that you can set. Governor settings in the model can be overridden by governor settings in Report Studio

For Example,

Report Table Limits - You can control the number of tables that a user can retrieve in a query or report

Data Retrieval Limits - You can control the number of rows that are returned in a query or report

Query Execution Time Limits - You can limit the time that a query can take 

Large Text Items Limit - You can control the character length of BLOBS (binary large objects) that a user can retrieve in a query or report

Allow Enhanced Model Portability at Run Time - You can use a separate but structurally similar data source at run time. The database schema must be the same between the two data sources.

Allows Usage of Local Cache - Select this governor to specify that all reports based on this model should use cached data.

Outer Joins - You can control whether outer joins can be used in your  query or report.

Cross-Product Joins - You can control whether cross-product joins can be used in your query or report.

Use With Clause When Generating SQL - You can choose to use the With clause with Cognos SQL if your data source supports the With clause.

Suppress Null Values for Dimensional Data Sources - This governor is supported for SAP BW data sources only. It does not work with relational or OLAP data sources.