Kirk Wiseman, VP of Training for PerformanceG2
In Cognos 8.4, it is now possible to use existing IBM Cognos 8 packages and reports as a data source in Cognos Transformer. This has made building data sources that much easier since any Cognos 8 report can be leveraged in Transformer, improving development time and ensuring that the data is all coming from the same underlying data source.
When using IBM Cognos 8.4 as a data source for Transformer, use the following guidelines to achieve efficient cube build times:
- If filtering and/or calculations are required, use Cognos 8 reports as the data source
- Create separate data sources in Transformer for each required dimension as well as for measures
- Include foreign keys found in fact tables to transformer modelers
- Avoid unnecessary local data processing on IBM Cognos 8 servers
Use IBM Cognos 8 Reports when Filters and/or Calculations are Required
While you can request that the IBM Cognos Framework Manager modeler include certain filters and calculations in an IBM Cognos 8 package, this requires extra maintenance on the Framework Manager modeler’s part. Instead, Transformer modelers can use list reports that incorporate filters/prompts and calculations as needed. If prompts are used in the report, Transformer modelers can control which filters are applied when the PowerCubes are built.
Regardless of whether the work is done in the Framework Manager model or in a report, the net gain remains the same; where supported, processing will be pushed to the database and the load on Transformer will be reduced. If filters/prompts are used, then Transformer will deal with a reduced record set, thereby decreasing build times.
Using reports allows for a greater degree of control to meet requirements and removes the need for additional development support.
Create Separate Queries in Transformer
When using a package as a data source in Transformer, individual queries should be created based on the data sources for the cube; one for each required dimension and one or more for the measures depending on how many underlying fact tables there are and what the business need is.
When using a report as a data source, either use separate list reports, again, one for each dimension and one or more for the measures, or create separate list report queries in one report. Then in Transformer, a query is created for each of the separate list reports or separate list queries within a single report.
Expose Fact Table Foreign Keys in the Package
Typically, foreign keys found in the tact table are not presented in the fact query subjects in a Cognos 8 FM model. Either they are not included in the model query subject, or they are hidden form the user. For most ad hoc query users or report authors, they provide little benefit and can cause confusion. To prevent confusion to the larger authoring audience, security can be used to expose the keys to a select group of authors only. For example, only Transformer modelers. In certain cases such as with Tranformer modelers, there is a clear benefit to exposing the foreign keys to the users. It will be more efficient to create a measures data source in Transformer that takes its keys from the actually fact table, rather than from its related dimension tables. In this way, the query will go against one table in the data source, rather than several. The database may rewrite the query to be more efficient before executing it, but a a general rule of thumb, the cleaner the SQL Cognos submits to the database, the more likely an efficient query will be run at the database layer which takes advantage of database optimization.
Avoid Unnecessary Local Data Processing on IBM Cognos 8 Servers
Certain query scenarios may require data processing on IBM Cognos 8 servers. In some of these cases, performance is not an issue and may even be required to produce a result set where a database vendor does not support the query. However, there are cases where local processing can adversely affect query performance and in turn, affect PowerCube build times. A typical example of this is when a function that is not supported by the database vendor is used in a calculation. This will cause a retrieval of the entire data set from the database and then perform the calculation locally on the Cognos 8 servers. To rectify the situation, use an equivalent function that is supported by the database vendor.
To see if local processing is occurring for a slow performing query, there are a couple of troubleshooting techniques. One is to look at the Cognos SQL generated for the query and compare it to the Native SQL. This can be done in Framework Manager or in Report Studio. Actions being performed in the Cognos SQL and not in the Native SQL indicate that processing is done locally. Another technique is to set query processing to Database Only. In Framework Manager this setting is found in the properties of the Data Source objects and is called Query Processing. In Report Studio, the setting is found in the properties of the query and is called Processing. When the setting is set to Database Only, an error will be generated in cases where the query can not be fully pushed to the database. The error will typically identify the offending time preventing the push to the database.
NOTE: This is based upon the IBM Best Practices Document which can be found at: http://www.ibm.com/developerworks/data/library/cognos/modeling/transformer/page512.html?ca=drs-
Contact the Blogger