Variables in OBIEE Part 2


Session Variable:

Session variable is similar to the dynamic repository variable in that they obtain values from initialization block. The difference is session variable scope is limited to the user session. 
Session initialization block will run every time if a new user logged in

There are two types of session variables available

  1. System Session variable
  2. Non system session variable
System session variable :

System variables are OBIEE reserved variable. Example for system session variable is USER. 
USER variable holds username always.

Non System Session Variable: 

 Non system session variable can be initialized using initialization block. Like system session variable the scope of non system session variable is limited to session.  Non system variables are commonly used for security implementation.

For eg:
 if we want the region of a user, we can create initialization block to get region as Non System Session Variable.
Sample query to be used:
select Region from region where user='VALUEOF(NQ_SESSION.USER)';
'VALUEOF(NQ_SESSION.USER)' : Is a system session variable and will give the logged user id/name. 

If we want to hold multiple values in a variable the OBIEE is providing an option called  Row-wise initialization Block.

Row-wise initialization Block:

You can use the row-wise initialization option to initialize a variable with a list of values.

eg:

in the above example variable USER_KEY will hold all the usr_key of logged user. 




Comments

Popular posts from this blog

Difference between Global Filter and Dashboard Prompt