If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Parameter Maps

Started by tulasisri, 12 Nov 2015 05:09:16 AM

Previous topic - Next topic

tulasisri

Hi folks,

I have doubt on parameter maps in framework manager.

1) What is parameter maps, why we use PM in FM, and how it will reflect to the reporting layer (to reports).

2) Based on existing model I have been developing the new model, on the existing model it has parameter map named as DefaultSnapshotDate, defalut value is "1" key value is "snapshot dt key" and value is "LastSnapshotDate".

Snapshot Dt Key col we have in table but LastSnapshotDate is a query item which is created one and exp is "(cast_varchar(CAST(Maximum( [table View].[TM_LATST_SNPSHT_INFO].[SNPSHT_DT] ) as Date),2)) "

Can any one please explain me that how this parameter map is working, and how it will reflect to reporting layer?

I have seen so many vedios and posts but I couldn't understand the "what" and "use" of parameter maps.
Thank you for reading.

bus_pass_man

It's too bad that you've seen so many videos and posts but can't understand the "what" and "use" of parameter maps.  Have you tried the Cognos documentation and the sample models as well?  They might be useful sources of information.

I'm not quite sure what your stumbling block is, however, so I can't determine what to write to explain them other than an overview.

Parameter maps are used as lookup tables to dynamically substitute values in place of a key. They are commonly used in conjunction with macros in expressions.

The sample models demonstrate a basic form of parameterization where the locale of the user is looked up and a value put into a macro which will form an object reference to a database column which has strings which are in the locale's language.

If you open the expression editor for a query item you might see an expression such as this, which is business view.order method.order method type. in the great outdoors warehouse sample model.

#'[Sales and marketing data].[SLS_ORDER_METHOD_DIM].[ORDER_METHOD_'+ $Language_lookup{$runLocale}+ '] '#

In the tips you will see something like this. You will see the tip display whatever the resolved value for your run locale.

[Sales and marketing data].[SLS_ORDER_METHOD_DIM].[ORDER_METHOD_EN]

What is happening is that language_lookup is taking the runLocale session parameter as a parameter.  The value returned by that is feed to the parameter map.  In this case it is one of the en, en-us, en-gb, en-bw, en-ca etc.  Each of those keys has EN as the value.

It is then concatenated with two different strings: [Sales and marketing data].[SLS_ORDER_METHOD_DIM].[ORDER_METHOD_ and ] .  They dynamically resolve to an object reference.

The use of parameter maps is only limited to your imagination.

Many cases you might want to have a macro use a table rather than the values of a parameter map as you could edit and update the table and thus not need to republish the package.

tulasisri

Sry, it's not bad.. having a doubt is not a bad thing. Actually I'm new to cognos as well as I'm a fresher so i'm trying to understand with real world example and also I dont have any exp on real world examples if I have exp may be I can understand very easily....Now i'm going to create an new model, without having correct knowledge on this I cant create so that's why have asked you..what is parameter map and creation I have seen in vedios that's fine but my question is how it will reflect to our report/reporting layer..

bus_pass_man

Well a good start would be to read what I wrote yesterday.  On retrospect, I think it's a not half bad prĂ©cis.  The answer to your question is in there.

Study the sample models and fiddle around with them and work with them in reports. Think through ways you could use them. Work with the existing stuff which you have inherited, such as the query item-based parameter map which you mention.

Getting your hands dirty is really the only way you'll end up groking the material.  That holds for not just parameter maps but everything in life.

On that Philosophic note,

Hope that helps.




cognostechie

#4
Quote from: tulasisri on 13 Nov 2015 01:30:07 AM
Sry, it's not bad.. having a doubt is not a bad thing. Actually I'm new to cognos as well as I'm a fresher so i'm trying to understand with real world example and also I dont have any exp on real world examples if I have exp may be I can understand very easily....Now i'm going to create an new model, without having correct knowledge on this I cant create so that's why have asked you..what is parameter map and creation I have seen in vedios that's fine but my question is how it will reflect to our report/reporting layer..

Ok, here is a real example. In US, we have a number called Social Security Number (SSN) which is a number assigned by the Government and every individual's information and identity is stored in a centralized manner by that number. This number is confidential and if somebody knows it, they can potentially harm that individual so the idea is to hide it from regular users but at the same time show it to the Director level people. In order to do this, Cognos has to determine who is running the report and then decide whether to show that number to that user or not. The SSN is a column in the D_Employee table and in the Database Layer, there is a Query Subject for D_Employee. In Cognos, user groups are defined and every user belongs to some group.

So, I create a Parameter Map which will determine which user groups should see the data of SSN column.

Ex: 

Parameter Map Name = SSN_Access

Key                                     Value
--------------------------------------------

HR Director Group                Show
HR Clerical  Group                Hide
Purchase Clerical Group        Hide
Senior Management             Show

Now there is a macro in Cognos which tracks the user name of the person running the report and which group he/she belongs to. Macro is called 'CSVIdentityName'. This macro will check all groups to which the user belongs and if the group is 'HR Director Group' then the value
of the SSN will be shown in the report.

Normally, you will have a Business Layer where you will have a Query Subject for EMPLOYEES and a Query Item for SSN because SSN is a column in the database. So, the expression of the query item would be something like [Database Layer].[D_Employee].[SSN].  This will show the value of SSN to all users but that's not what we want so we will replace this expression with this:

Case #sq(CSVIdentityName(%SSN_Access))#

  When '''Show''' then [Database Layer].[D_Employee].[SSN] 

  Else ''

End


Hope that helps