obiee rpd variables - online tutorials ( books &...

21
OBIEE RPD Variables Understanding and Creating Repository Variables A repository variable has a single value at any point in time. Repository variables can be used instead of literals or constants in expression builders in the Administration Tool. The Oracle BI Server will substitute the value of the repository variable for the variable itself in the metadata. This section includes the following topics: Static Repository Variables Dynamic Repository Variables Creating Repository Variables Static Repository Variables The value of a static repository value is initialized in the Variable dialog box. This value persists, and does not change until an Oracle BI Administrator decides to change it. Example Suppose you want to create an expression to group times of day into different day segments. If Prime Time were one of those segments and corresponded to the hours between 5:00 PM and 10:00 PM, you could create a CASE statement like the following:

Upload: ledan

Post on 26-Mar-2018

226 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

OBIEE RPD Variables

Understanding and Creating Repository Variables

A repository variable has a single value at any point in time. Repository variables can be used instead of literals or constants in expression builders in the Administration Tool. The Oracle BI Server will substitute the value of the repository variable for the variable itself in the metadata.

This section includes the following topics:

Static Repository Variables Dynamic Repository Variables Creating Repository Variables

Static Repository Variables

The value of a static repository value is initialized in the Variable dialog box. This value persists, and does not change until an Oracle BI Administrator decides to change it.

Example

Suppose you want to create an expression to group times of day into different day segments. If Prime Time were one of those segments and corresponded to the hours between 5:00 PM and 10:00 PM, you could create a CASE statement like the following:

CASE WHEN "Hour" >= 17 AND "Hour" < 23 THEN 'Prime Time' WHEN... ELSE...END

where Hour is a logical column, perhaps mapped to a timestamp physical column using the date-and-time Hour(<<timeExpr>>) function.

Rather than entering the numbers 17 and 23 into this expression as constants, you could use the Variable tab of the Variable dialog box to set up a static repository variable named prime_begin and initialize it to a

Page 2: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

value of 17, and create another variable named prime_end and initialize it to a value of 23.

Using Variables in Expression Builders

After created, variables are available for use in expression builders. In an expression builder, click on the Repository Variables folder in the left pane to display all repository variables (both static and dynamic) in the middle pane by name.

To use a repository variable in an expression, select it and double-click. The expression builder will paste it into the expression at the active cursor insertion point.

Variables should be used as arguments of the function VALUEOF( ). This will happen automatically when you double-click on the variables to paste them into the expression.

For example, the following CASE statement is identical to the one explained in the preceding example except that variables have been substituted for the constants.

CASE WHEN "Hour" >= VALUEOF("prime_begin")AND "Hour" < VALUEOF("prime_end") THEN 'Prime Time' WHEN ... ELSE...END

NOTE:  You cannot use variables to represent columns or other repository objects.

Dynamic Repository Variables

You initialize dynamic repository variables in the same way as static variables, but the values are refreshed by data returned from queries. When defining a dynamic repository variable, you will create an initialization block or use a pre-existing one that contains a SQL query. You will also set up a schedule that the Oracle BI Server will follow to execute the query and periodically refresh the value of the variable.

Page 3: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

NOTE:  When the value of a dynamic repository variable changes, all cache entries associated with a business model that reference the value of that variable will be purged automatically.

Each query can refresh several variables—one variable for each column in the query. You schedule these queries to be executed by the Oracle BI Server.

Example

Dynamic repository variables are very useful for defining the content of logical table sources. For example, suppose you have two sources for information about orders. One source contains recent orders and the other source contains historical data.

You need to describe the content of these sources on the Content tab of the Logical Table Source dialog box. Without using dynamic repository variables, you would describe the content of the source containing recent data with an expression such as:

Orders.OrderDates."Order Date" >= TIMESTAMP '2001-06-02 00:00:00'

This content statement will become invalid as new data is added to the recent source and older data is moved to the historical source. To accurately reflect the new content of the recent source, you would have to modify the fragmentation content description manually. Dynamic repository values can be set up to do it automatically.

Another suggested use for dynamic repository values is in WHERE clause filters of logical table sources, that are defined on the Content tab of the Logical Table Source dialog box.

The values of dynamic repository variables are set by queries defined in Variable Initialization blocks. When defining a dynamic repository variable, you create an initialization block or use a preexisting block that contains a query. You also set up a schedule that the Oracle BI Server will follow to execute the query and periodically refresh the value of the variable.

Page 4: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

A common use of these variables is to set filters for use in Oracle BI Presentation Services. For example, to filter a column on the value of the dynamic repository variable CurrentMonth, set the filter to the Variable CurrentMonth.

Creating Repository Variables

To create a repository variable

1. From the Administration Tool menu bar, choose Manage > Variables.

2. In the Variable Manager dialog box, from the menu bar, choose Action > New > Repository > Variable.

3. In the Variable dialog box, type a Variable name.

Names for all variables should be unique. The names of system session variables are reserved and cannot be used for other types of variables.

4. In the Variables dialog box, select the type of variable: Static or Dynamic.

The name of the dialog box changes to reflect the type of variable that you select.

5. (Dynamic repository variables) Use the Initialization Block drop-down list to select an existing initialization block that will be used to refresh the value on a continuing basis.

6. (Dynamic or static variables) To add a Default initializer value, perform one of the following steps:

To use the Expression Builder, click the ellipsis button to the right of the Default initializer work space.

Type the value into the Default initializer text box.

Page 5: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

For static repository variables, the value you specify in the Default initializer window persists. It will not change unless you change it. If you initialize a variable using a character string, enclose the string in single quotes ( ' ).

7. Click OK.

OBIEE Session Variables

Understanding and Creating Session Variables

Session variables are similar to dynamic repository variables in that they obtain their values from initialization blocks. Unlike dynamic repository variables, however, the initialization of session variables is not scheduled. When a user begins a session, the Oracle BI Server creates new instances of session variables and initializes them.

Unlike a repository variable, there are as many instances of a session variable as there are active sessions on the Oracle BI Server. Each instance of a session variable could be initialized to a different value.

Session variables are primarily used when authenticating users against external sources such as database tables or LDAP servers. If a user is authenticated successfully, session variables can be used to set filters and permissions for that session.

This section includes the following topics:

Using System Session Variables Using Nonsystem Session Variables Creating Repository Variables

Using System Session Variables

System session variables are session variables that the Oracle BI Server and Oracle BI Presentation Services use for specific purposes. System

Page 6: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

session variables have reserved names, that cannot be used for other kinds of variables (such as static or dynamic repository variables and nonsystem session variables).

NOTE:  When you use these variables for Oracle BI Presentation Services, preface their names with NQ_SESSION. For example, to filter a column on the value of the variable LOGLEVEL set the filter to the Variable NQ_SESSION.LOGLEVEL.

Table   34  describes the available system session variables.

Table 34. System Session Variables

Variable Description

DISPLAYNAME Used for Oracle BI Presentation Services. It contains the name that will be displayed to the user in the greeting in the Oracle BI Presentation Services user interface. It is also saved as the author field for catalog objects. For internal Oracle BI repository users (nondatabase users), this variable is populated with the user's full name.

EMAIL Contains the user's default email address for use with Answers. If the delivery option of Answers is enabled, an email device using this address will be created for the user upon first log in. Users can override this address by changing their account settings in Oracle BI Presentation Services.

GROUP Contains the groups to which the user belongs. These are used by both the Oracle BI Server and Oracle BI Presentation Services.

When a user belongs to multiple groups, separate the group names with semicolons. Do not delimit text (for example, do not surround the text with single or double quotes). Use a Varchar column in a database table to contain the group memberships.

Page 7: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

For example, if a user belonged to groups called Sales US, Sales UK, QA and Dev, and Doc, the text entered into a Varchar data type column in a database table would be:

Sales US;Sales UK;QA and Dev;Doc

Note: The Oracle BI Presentation Services Administrator needs to make sure that the names of Presentation Services groups are different from any user IDs that will be used to log on to Oracle BI Presentation Services. If a user and a Presentation Services group share the same name, the user will receive an Invalid Account message when attempting to log on to Oracle BI Presentation Services.

LAST_SYNCH_TIME and THIS_SYNCH_TIME

These two variables are set and tracked by Oracle BI Presentation Services to manage the synchronization of Oracle BI Disconnected Analytics. For more information, refer to Oracle Business Intelligence Disconnected Analytics Administration and Configuration Guide.

LOGLEVEL The value of LOGLEVEL (a number between 0 and 5) determines the Logging level that the Oracle BI Server will use for user queries.

This system session variable overrides a variable defined in the Users object. If the Administrators Users object has a Logging level defined as 4 and the session variable LOGLEVEL defined in the repository has a value of 0 (zero), the value of 0 applies.

PORTALPATH Used for Oracle BI Presentation Services. It identifies the default dashboard the user sees when logging in (the user can override this preference after logged on).

REQUESTKEY Used for Oracle BI Presentation Services. Any users with the same nonblank request key will share the same Presentation Server cache entries. This tells Oracle BI Presentation Services that these users have

Page 8: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

identical content filters and security in the Oracle BI Server. Sharing Presentation Server cache entries is a way to minimize unnecessary communication with the Oracle BI Server.

SKIN Determines certain elements of the look and feel of the Oracle BI Presentation Services user interface. The user can alter some elements of the user interface by picking a style when logged on to Oracle BI Presentation Services. The SKIN variable points to an Oracle BI Presentation Services folder that contains the nonalterable elements (for example, graphics such as GIF files). Such directories begin with sk_. For example, if a folder were called sk_companyx, the SKIN variable would be set to companyx.

USER Holds the value the user enters as his or her logon name.

WEBGROUPS Specifies additional groups specific to Oracle BI Presentation Services, if any. The use of Presentation Services groups provides a mechanism for more granular content control.

Using Nonsystem Session Variables

The procedure for defining nonsystem session variables is the same as for system session variables.

A common use for nonsystem session variables is setting user filters. For example, you could define a nonsystem variable called SalesRegion that would be initialized to the name of the user's sales region.

You could then set a security filter for all members of a group that would allow them to view only data pertinent to their region.

NOTE:  When you use these variables for Oracle BI Presentation Services, preface their names with NQ_SESSION. For example, to filter a column on the value of the variable SalesRegion set the filter to the Variable NQ_SESSION.SalesRegion.

Page 9: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

Creating Session Variables

Use the this task to create a session variable.

To create a session variable

1. From the Administration Tool menu bar, choose Manage > Variables.

2. In the Variable Manager dialog box, from the menu bar, choose Action > New > Session > Variable.

3. In the Session Variable dialog box, type a variable name.

Names for all variables should be unique. The names of system session variables are reserved and cannot be used for other types of variables.

4. For session variables, you can select the following check boxes:

Enable any user to set the value

Check box that allows you to set the session variables after the initialization block has populated the value (at user login) by calling the ODBC store procedure NQSSetSessionValue(). For example, this allows non-Oracle BI Administrators to set this variable for sampling.

Security Sensitive

Check box that identifies the variable as sensitive to security for virtual physical databases (VPD). When filtering cache table matches, the Oracle BI Server looks at the parent database of each column or table that is referenced in the logical request projection list. If the physical database source is a VPD, the Oracle BI Server matches a list of security-sensitive variables to each prospective cache hit. Cache hits would only occur on cache entries that included and matched all security-sensitive variables.

5. Use the Initialization Block drop-down list to select an initialization block that will be used to refresh the value on a continuing basis.

Page 10: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

6. To add a Default initializer value, perform one of the following steps:

To use the Expression Builder, click the ellipsis button to the right of the Default initializer work space.

Type the value into the Default initializer text box.

7. Click OK.

Useful OBIEE Resources

Helpful Oracle BI Resources

Oracle Technology Network (OTN)

Documentation: http://www.oracle.com/technology/documentation/bi_ee.html

Downloads: http://www.oracle.com/technology/software/index.html

Tutorials: http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/index.html

Blogs/Forums

Rittman Mead:http://www.rittmanmead.com/articles/

http://www.rittmanmead.com/category/oracle-bi-suite-ee/

Business Intelligence – Oracle (various blogs on OBIEE and Hyperion):

Page 11: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

http://oraclebizint.wordpress.com/category/obi-ee-plus/

  

Specific Topics

Exploring the New OBIEE 10.1.3.4 Samples Sales Application and Data:http://www.rittmanmead.com/2008/10/14/exploring-the-new-obiee-10134-samples-sales-application-data/

How to Prep Excel spreadsheet to use as a datasource:

http://obiee101.blogspot.com/2008/06/obiee-excel-import-prepping-data.html

How to Configure Write Back:

http://oraclebizint.wordpress.com/2007/09/20/oracle-bi-ee-101332-write-back-option-budgetingplanning/

Migrating OBIEE Content:

http://www.rittmanmead.com/2008/04/28/migration-obiee-projects-between-dev-and-prod-environments/

Enabling Change Password in OBIEE:

http://obidba.wordpress.com/2009/09/11/enable-change-password-for-obiee/

Enabling SSO Authentication for OBIEE:

On Windows: http://sranka.wordpress.com/2008/06/06/enabling-sso-authentication-for-obiee/

Page 12: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

On Linux: http://obidba.wordpress.com/2009/09/04/oracle-single-sign-on-for-obiee/

Modeling a Bridge Table (M:M between two dimension tables):

http://www.rittmanmead.com/2008/08/28/the-mystery-of-obiee-bridge-tables/

Drill through from Essbase to a Relational source:http://oraclebizint.wordpress.com/2009/01/21/oracle-bi-ee-10134-essbase-connectivity-conforming-dimensions-and-federation-drill-through-to-a-relational-database/

Multiple Hierarchies in One Dimension:http://oraclebizint.wordpress.com/2007/11/30/oracle-bi-ee-101332-one-dimension-multiple-hierarchies/ How to add Session or Repository Variables in a Title or Narrative View:http://shivabizint.wordpress.com/2008/10/02/oracle-bi-ee-variables-overview/ How to use nqcmd to purge and seed cache:http://majendi.blogspot.com/2006/09/all-about-cache.html  Configure Database Images to Display in a Report:http://oraclebizint.wordpress.com/2007/12/10/oracle-bi-ee-101332-displaying-blob-images-using-plsql-gateway/  Integrating OBIEE with SharePoint Server (MOSS + OBIEE):http://www.artofbi.com/index.php/2009/09/integrating-sharepoint-with-obiee/

 White Paper on Implementing Essbase as a Datasource:http://www.oracle.com/technology/products/bi/pdf/OBIEE-Essbase-Modeling-Guide.pdf

Integrating Oracle BI Answers and Oracle Portal:

http://www.rittmanmead.com/2007/09/07/integrating-oracle-bi-answers-and-oracle-portal/

Page 13: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

Integrating OBIEE into External Applications and Portals:

http://oraclebizint.wordpress.com/2008/01/28/oracle-bi-ee-101332-integration-into-external-applicationsportals/

Migrating Requests/Dashboards/RPD using Content Accelerator Framework:

 Download http://download.oracle.com/technology/products/bi/files/OracleBIEE_CAFV1_Setup.zip

Documentation http://www.oracle.com/technology/products/bi/pdf/oraclebiee-cafv1-usage-instructions.pdf

CAF: http://oraclebizint.wordpress.com/2009/04/16/oracle-bi-ee-10134-content-accelerator-framework-v1-free-utility-released-migrating-reportsdashboardsrpd/

Migrating Repository objects via NQUDML.exe utilityhttp://www.rittmanmead.com/2008/04/28/migration-obiee-projects-between-dev-and-prod-environments/

Multiple RPDs and Presentation Services in the same BI Server instance:

http://debaatobiee.wordpress.com/2009/10/01/multiple-rpd-multiple-presentation-service-instance-on-single-bi-server/

OBIEE Delivers Configuration

OBIEE Write-back

The first step is to enable write-back on the table columns you require to be updated, in the table design view open the column properties, Column Format tab, and from the ‘Value Interaction’ drop down list select ‘Write-Back’. 

Page 14: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

Once you have set the write-back property on the columns, click the write-back icon in the top left corner of the design pane, this is where you set the path to the template that provides the SQL to update the table, and edit the text for the command button to action the write-back. 

Save your table with the amended settings and preview the results, the fields with write-back enabled now have a text box type appearance. Now you need to create the xml template to be used, once created this resides in OracleBI\web\msgdb\customMessages; the templates appear to be the main cause of problems experienced with write-back. This is the template I have used with this table: 

<?xml version="1.0" encoding="utf-8" ?><WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1"><WebMessageTable lang="en-us" system="WriteBack" table="Messages"><WebMessage name="OBI_Security"><XML><writeBack connectionPool="OBI Security"><insert></insert><update>UPDATE tbl_UserAssignments SET UserID='@{c1}', VariableID='@{c2}', Value='@{c3}' WHERE ID='@{c4}'</update></writeBack></XML></WebMessage></WebMessageTable></WebMessageTables>

The final part of this journey into write-back is to put this to some use, in this case, an admin page for maintaining values assigned to variables held in a relational db table. This brings us to what appears to be a problem

Page 15: OBIEE RPD Variables - Online Tutorials ( Books & Videos)dbmanagement.info/Books/MIX/OBIEE_RPD_Variables_session... · Web viewIntegrating OBIEE into External Applications and Portals:

point, inserting rather than updating a record. To ease this we decided to seed a row with ‘Add record’ type messages and write a trigger to update the table, on update, with these messages.