Friday, February 28, 2014

Request Variables

A request variable lets you override the value of a session variable but only for the duration of a database request initiated from a column prompt. You can create a request variable as part of the process of creating a column prompt.


Request Variables are used to update Session Variables in the scope of a logical sql.

And, with a little more precision, a request variable is:

  •  A variable that is defined within the Presentation Services;
  •  A variable whose scope (page or dashboard) is that of the associated dashboard prompt that defines the request variable and its value;
  •  A variable whose name should not match that of a repository variable or a security system session variable; and
  •  A variable that overrides the value of the corresponding session variable (should it exist) for the purpose of BI Server request parsing and physical SQL construction for all requests that are issued from dashboard pages that fall within the scope of the variable’s definition.
Note, using a request variable does not change the actual value of a session variable – neither temporarily nor permanently.  It simply appears to change the value for certain purposes during the execution of a request.

You will find it in a OBIEE logical Sql in its SET VARIABLE part.
For instance :
SET VARIABLE MyYear='2000';SELECT Calendar."Calendar Year" saw_0 FROM SH ORDER BY saw_0
Its aim is to set an OBI server session variable :
  • either System
  • or Non System
  • and without security sensitivity

Syntax

SET VARIABLE MyVariable=MyVale;Logical SQL
For:
  • a string: SET VARIABLE MyVariable='MyString'
  • a date: SET VARIABLE MyDateVariable=date '2013-05-01'
  • a timestamp: SET VARIABLE MyTimeStampVariable=timestamp '2013-05-01 12:12:12'

What is the scope of a request variable in Presentation Service ?

By using a dashboard prompt to define the request variable, the scope of the request variable (as a presentation variable) depends on the dashboard prompt scope (that you can find in the dashboard prompt definition)

Reference: 


No comments:

Post a Comment