We can use repository variables in three places :
- in BI Server
- in BI Presentation Service
- in Delivers
Syntax
VALUEOF("NQ_SESSION.Variable Name")
1)In BI Server:
Connection Pool
The picture below show a repository variable call but you can use in the same way the session variable syntax.
Opaque View / Select Statement
In the bookshel Version 10.1.3.2, it's written that Only repository variables can be used in the definition. An error will generate if a session variable is used in the view definition.
With the version 10.1.3.4, a warning is generated:
WARNINGS: GLOBAL: The repository variable, NQ_SESSION.MYYEAR, has no value definition.
But BI Server process it without problem.
-------------------- SQL Request: SET VARIABLE QUERY_SRC_CD='Report',SAW_DASHBOARD='/users/administrator/_portal',SAW_DASHBOARD_PG='MyYear', SAW_SRC_PATH='/users/administrator/MyYear/Answers',MYYEAR='2001';SELECT TIMES_VIEW.calendar_year saw_0 FROM Test ORDER BY saw_0 +++Administrator:2e0000:2e0008:----17/12/2009 06:19:16 -------------------- General Query Info: Repository: Star, Subject Area: Test, Presentation: Test +++Administrator:2e0000:2e0008:----17/12/2009 06:19:16 -------------------- Logical Request (before navigation): RqList distinct TIMES_VIEW.calendar_year as c1 GB OrderBy: c1 asc +++Administrator:2e0000:2e0008:----17/12/2009 06:19:16 -------------------- Execution plan: RqList <<150282>> [for database 3023:156:orcl SH,31] distinct TIMES_VIEW.calendar_year as c1 GB [for database 3023:156,31] Child Nodes (RqJoinSpec): <<150293>> [for database 3023:156:orcl SH,31] (select time_id, calendar_year from times where calendar_year > VALUEOF(NQ_SESSION.MYYEAR)) as T6563 OrderBy: c1 asc [for database 3023:156,31] +++Administrator:2e0000:2e0008:----17/12/2009 06:19:16 -------------------- Sending query to database named orcl SH (id: <<150282>>): select distinct T6563.calendar_year as c1 from (select time_id, calendar_year from times where calendar_year > 2001) T6563 order by c1
2) Presentation Services
Logical SQL in Answers
OBIEE - Logical Sql:
VALUEOF(NQ_SESSION."Variable Name")
Other places
You can call a server variable by using this syntax :
biServer.variables['VariableName']
Example in a dashboard text object:
3)In Delivers
@{NQ_SESSION.Variable Name}
No comments:
Post a Comment