Upload
murugan-raja
View
232
Download
0
Embed Size (px)
Citation preview
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
1/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 1/22
Lesson 1: Creating OBIEE Metadata for OLAP 11g Cubes
Purpose
This tutorial covers the creation of Oracle Business Intelligence Enterprise Edition (OBIEE) metadata for access to OracleDatabase 11g OLAP Option data and calculations by using the Oracle OLAP 11g Analytic Workspace Manager Plug-in forOBIEE.
Time to Complete
Approximately 15 minutes.
Topics
This tutorial covers the following topics :
Overview
Prerequisites
Enable the OBIEE Plug-in for AWM
Generate the OBIEE Metadata for Oracle OLAP
Create the OBIEE Metadata Repository
More information
Viewing Screenshots
Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all
screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note:Alternatively, you can place the cursor over an individual icon in the following s teps to load and view only the screenshotass ociated with that step. You can hide an individual screenshot by clicking it.
Overview
What isOracle OLAP?
Oracle OLAP is an integrated component of Oracle Database 11gthat enables companies to easily gain ins ights intobusiness performance. It offers:
Exceptional query, calculation and data preparation performance
Rich analytic capabilities
Simple user model that reflects bus iness usage
Open access to any SQL tool
Native multidimensional object types in Oracle database are provided by Oracle OLAP Cubes. Cubes are made up ofMeasuresand organized by Dimensions.
Measuresrepresent factual data, such as sales, cost, profit, and margin. Measures may be stored or calculated at querytime. Stored meas ures are loaded and s tored in the database. The values for calculated measures are computeddynamically by the OLAP calculation engine at query time. Common calculations include measures such as ratios,differences, time-series, indicies, moving totals, and averages. Calculations do not require disk storage space, and theydo not extend the processing time required for data maintenance.
Dimensionsidentify and categorize your measure data. They shape measures by forming the edges of the measures.Examples of dimensions include product, geography, time, and distribution channel. Dimension hierarchiesare optionalbut are common in OLAP systems. A hierarchy is a logical structure that groups like members of a dimension together forthe purpose of analysis. A dimensions structure is organized hierarchically based on parent-child relationships. Theserelationships enable navigation between levels, and aggregation from child values to parent values.
Cubesprovide a convenient way of collecting similar measures of the same dimensionality. It is not uncommon for many
measures to have the same shape, and so by defining their shape (and other shared characteristics) for a cube, you cansave time when building your OLAP data model.
To access OLAP cubes and leverage the OLAP calculation engine, a SQL tool -- such as OBIEE -- uses the built-in SQLinterface to OLAP. Oracle OLAP cube data is made directly accessible to SQL by a set of relational views. These viewsrepresent an OLAP cube as a star schema with the following characteristics:
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t2http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#rhttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t4http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t2http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t1http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#phttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#o7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
2/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 2/22
- A cube view plays the role of a fact table.
- Dimension views or hierarchy views play the role of dimension tables.
The star design exposed by OLAP cubes is very similar to traditional table-based star models. The dimension views form aconstellation around one or more cube views. However, there are two key differences:
- A fact tables in a s tar schema stores detail data (called leaves), while a cube view reveals all summ ary levelsdefined in the OLAP cube.
- Calculations in a cube are simply exposed as columns in the cube view, and the computation for theequations occurs in the OLAP engine.
Note: The OLAP data for this tutorial was created using steps found in the Building OLAP11g Cubestutorial. For informationabout the OLAP model used in this tutorial, and for step-by-step ins tructions on how to create OLAP 11g cubes , click the link.
Understanding OBIEE Metadata
In order to use any BI end-user tool that depends on its own metadata layer (which is the case with OBIEE), the metadatarepository mus t describe how queries should be cons tructed agains t the relational data sources. With Oracle OLAP data, youmust complete the same metadata administrative tasks that are required for any relational source.
At the highest level, an OBIEE Metadata Repos itory includes three layers of information:
1. First, a Physicallayer is defined. The metadata layer identifies the source data.
2. Second, a Business Model and Mappinglayer is defined. This metadata layer organizes the physical layer intological categories and records the appropriate metadata for access to the source data.
3. Finally, the Presentation layer is defined. This metadata layer exposes the business model entities for end-useraccess.
http://www.oracle.com/technology/obe/olap_cube/buildicubes.htm7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
3/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 3/22
By using the OBIEE Plug-in for AWM, the three metadata layers for an OBIEE repository are created for you.
To learn more about Oracle Business Intelligence Enterprise Edition, see More information.
What is the OBIEE Plug-in for AWM?
Analytic Workspace Manager (AWM) is the adminis trative tool us ed for managing Oracle OLAP data. The OBIEE Plug-in forAWM allows you to quickly create an OBIEE repos itory that will a llow the OBIEE Server (and therefore any OBIEE client,including Dashboards, Answers, Delivers and the MS Office Plug-in) to query Oracle Database 11g OLAP cubes.
By using the OBIEE Plug-in for AWM, creating the metadata repos itory is a sim ple four-step proces s:
1. Choose one or more OLAP Cubes in AWM and generate the OBIEE-ready metadata.
2. Save the metadata to the System Clipboard (or to a file).
3. Copy and paste the metadata into the OBIEE Administration tool.
4. Add an OBIEE security policy that leverages the unique aggregation properties of OLAP Cubes .
In this less on, you use the OBIEE Plug-in to automatically generate the OBIEE repos itory UDML code and security policycontent. You s imply copy and paste this content into the BI Administrator tool, and you are ready to query your OLAP data withOBIEE tools.
The completed metadata repository provides access an OLAP cube in the sample schema: the SALES_CUBE in theSALESTRACK analytic workspace. This AW is part of the OLAPTRAIN sample schema.
A completed repos itory -- which is the ultimate goal of this lesson -- is available for download in the Related informationsection.
Back to Topic Lis t
Prerequisites
Before starting this tutorial, you should:
1. Install Oracle Database 11g with the OLAP Option (Patch level 11.1.0.7 or higher), and Analytic Workspace Manager (AWM11g), which is included with the OLAP Option.
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#thttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#rhttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#r7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
4/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 4/22
2. Download and install both components of the sam ple schema following the instructions in Installing the Oracle OLAP 11gSample Schema.
Notes: The Sample Schema installation package includes two parts:
1. Installing the base OLAPTRAIN schem a
2. Installing the SALESTRACK analytic workspace in the OLAPTRAIN schema
3. Have access to or have Installed Oracle Business Intelligence Suite Enterprise Edition 10gRelease 3 (version 10.1.3.4).
Note: You need a general unders tanding of BI EE administration. This tutorial only addresses adm inistrative task that areassociated with setting up access to OLAP 11g data.
4. Download the Oracle Business Intelligence Enterprise Edition Plug-in for Analytic Workspace Manager.
The plug-in file, and readme instructions are located on OTN at the Oracle OLAP Downloadspage. Go to the SampleSchemas & Code section to download the plug-in and view the readme file.
Back to Topic Lis t
Enable the OBIEE Plug-in for AWM
As referenced in the OBIEE Plug-in for AWM readmefile (see the Prerequisites section), download the OBIEE Plug-in for AWM(obieeplugin.jar) into a plugin subdirectory below the AWM installation directory.
Note: Do not copy the obieeplugin.jarfile into the same s ubdirectory as the awm.jarfile.
AWM will recognize the new plug-in the next time it is s tarted once the Enabled Plugins option is s elected in the Configurationdialog.
To enable the Plug-ins option in AWM, perform the following s teps.
1. Open AWM 11g.
2. On the main menu, select Tools> Configuration.
3. In the Configuration window, select the Enable pluginsoption.
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#thttp://www.oracle.com/technology/products/bi/olap/olap_downloads.html#softwarehttp://www.oracle.com/technology/products/bi/olap/11g/samples/schemas/readme.html7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
5/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 5/22
4. Also in the Configuration window, double-cl ick in the Value box of the Plugin directoryoption.
Result: the Open window appears.
5. In the Open window, navigate to and s elect the directory location for the OBIEE plugin file. For example:
Then, click Open.
The Configuraion window dis plays the plugin directory path:
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
6/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 6/22
6. Click OK.
7. Exit and restart AWM.
Back to Topic
Generate the OBIEE Metadata for Oracle OLAP
To generate the required metadata code for OBIEE using the AWM plugin, perform three s imple steps: A) Choose one or
more OLAP Cubes ; B) Launch the plugin from the right-mouse menu; C) Generate the metadata by clicking a button.
Perform the following s teps to generate OBIEE Metadata for the SALES CUBE in the sample schema.
1. If you have not yet created a databas e connection for the sample (OLAPTRAIN) schem a in AWM, follow theseinstructions. Otherwise, move to step 2.
A. Right-click Databasesand s elect Add Database to tree.
B. Enter Oracle11gin the Description field and :1521: in the ConnectionInformation field.
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t17/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
7/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 7/22
C. Click Create.
2. To log in:
Click the Plus s ign (+) next to your database connection.In the Connect to database window, enter olaptrainfor the Username, and enter the password that youspecified when you installed the sam ple schema.
Then click OK.
3. In the AWM navigation pane, expand Schemas > OLAPTRAIN > Analytic Workspaces > SALESTRACK > Cubes.
Result: the navigator window should look like this:
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
8/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 8/22
4. Right-click on SALES_CUBE and s elect Export to OBIEE Administratorfrom the pop-up menu.
5. In the Export Analytic Workspace To OBIEE Administrator window, note that SALES_CUBE is automatically
selected.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
9/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 9/22
Notes:
You can select other cubes here as well, if required.You may provide nam es for the three BI EE metadata layers in the Export tab (or accept the defaults)
6. Click the Optionstab. Here, you specify whether to use Cube and Dimension descriptions or object names in theOBIEE repository.
Select the Descriptionsoption.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
10/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 10/22
7. Finally, when you generate the required OLAP metadata, you can export to:
The System ClipboardA File
A. Since you will copy the metadata directly to the BI EE Adminis trator tool, select Export to Clipboard.
Result: A confirmation window appears.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
11/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 11/22
8. SelectYesto view the system clipboard contents.
Result: A metadata docum ent for the SALES_CUBE appears in the System Clipboard window.
The Plug-in creates a single document that contains:
Instructions (commented out using a # symbol)Text for the Security Filter (commented out using a # symbol)UDML Code for the physical, business model, and presentation catalog layers
In the next topic, you pas te the appropriate contents of metadata document into an OBIEE repos itory.
Note: leave the System Clipboard window open.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
12/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 12/22
Back to Topic
Create the OBIEE Metadata Repository
To create the OBIEE metadata repository for your OLAP cube, you:
1. Create a new repository (or open an existing one) in the BI Administrator tool.
2. Paste the contents of the metadata document into the any box of the metadata repository.
3. Add a security policy to the repository.
Follow these s teps to create theOBIEE metadata repository for the SALES_CUBE:
1. Open the BI Adminstration tool and create a new repos itory.
Name the new repository file Sales_Cube .
2. Right-click in any of the repository panes and select Pastefrom the pop-up menu.
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#t27/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
13/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 13/22
Result: All three of the repos itory layers are populated.
3. Drill on the SALESTRACK Sales Cubenode in all three of the reposi tory panes , and then drill down on the following nodes in
each pane to view the metadata components:
The Physical database contains OLAP Dimens ion views, Hierarchy Views, and Cube views.The Business model is fully configured with Logical Tables, Logical Table Sources, and OBIEE Dimension objects.The Presentation catalog represents Dimensions, Levels, Cubes, and all the Measures of the Cube.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
14/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 14/22
4. Savethe repos itory. When prompted to check global consis tency, select No.
Notes:
Because the Dimension and Cube views contain both leaf andaggregate level data, it's important that OBIEE add filters to
the SQL that is used to query these views. These filters specify the desired level of summarization for any query.
In order to make s ure that the correct summarization level for each dimension always apply in every query -- even in caseswhere a dimension is not included in a query -- a security filter is added to the Cube View. This approach is characterized bythe following:
OBIEE security filters are appl ied automatically to queries, forcing a join between the Dimension (or Hierarchy) Viewsand the Cube Views.
As a result, a star join is forced, caus ing the level filters to be applied to every query.
These s ecurity filters are s imilar to Oracle Database VPD; they are filters that are automatically applied to any queryagainst the secured table.
A security filter can be applied to a user or a group. In this example, a new group is created, and users of the repos itory mustbe ass igned to this group.
In the following s teps, you will:
Create a new User GroupCreate a new security policy, using the security filter that was generated for you by the AWM / OBIEE plug-inAdd a new User to the group
5. To create a the new User Group:
A. From the main menu, selectManage > Security.
B. In the Security Manager window, selectAction > New > Group.
C. In the Group window, enter OLAPUSERSas the name, and then click Permissions.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
15/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 15/22
6. To create the security policy:
A. In the Us er/Group Perm issions window, select the Filterstab and click the Addbutton at the bottom of thewindow.
B. In the Browse window, select the Business Modeltab, and then drill on the SALESTRACK Sales Cubenode.
Note: Here, you will add the filter to the logical table repres enting the Cube in the bus iness m odel.
C. Select theSales Cubelogical table. Notice that the Select button in the right pane is enabled.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
16/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 16/22
D. Click Select.
Result: the User/Group Permiss ions window now looks like this:
E. Edit the text of the bus iness m odel by clicking the elipses button(...) next to the Business Model Filter box.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
17/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 17/22
Result: The Express ion Builder - Security Filter window appears, as shown here:
F. Toggle back to AWM. Select and copy the text of the security filter that was generated by the AWM plug-in, asshown below.
Important:
Take care notto include the comment character (# symbol) in your selection, but do include theopening and closing quote marks (").Use Ctrl+C for the copy action.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
18/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 18/22
G. Toggle back to the BI Administrator and paste the filter text into the Expression box. The Expression Builder- Security Filter window should now look like this:
H. To save the security filter and the User Group:
Click OKin the Expression Builder window.Click OKin the User/Group Permissions window.Click OKin the Group window
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
19/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 19/22
7. To add a new User:
A. In the Security Manager window, select Action > New > User.
B. In the User window:
Enter olaptrainin the User name boxSpecify the pass word you created for the olaptrain user in the Password and Confirm Pass word boxesSelect the OLAPUSERSgroup option
C. Click OKto save the user.
7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
20/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 20/22
8. Perform the following:
A. Dismiss the Security Manager window and click Saveto save the repos itory.
B. ClickYesto check global consis tency.
Result: The Consistency Check passes with two informational 'warnings'.
C. Close the Cons istency Check Manager window.
You are done, and are now ready to access the OLAP Sales Cube us ing any of the OBIEE user tools ,including BI Answers and BI Dashboards.
9. Finally, close the applications by doing the following:
A. Exit the Oracle BI Admins tration Tool.
B. Close the System Clipboard window.
C. Close the Export Analytic Workspace window.
D. Exit Analytic Workspace Manager.
Note: The first topic in the next lesson (Lesson 2: Querying OLAP 11g Data Us ing Oracle BI Answers), shows you how todeploy the repos itory that you just created.
Back to Topic Lis t
The following report from Oracle BI Answers illustrates the optimal SQL to leverage OLAP aggregations. The SQL queryleverages the security filter that the AWM / OBIEE plug-in generated.
BI Answers Report
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#thttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/QueryData.htm7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
21/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm 21/22
SQL Query for the Report (automatically generated by OBIEE)
In the SQL query:
Calculated measures are simply selected as columns . The data is computed in the OLAP calculation engine and pass edthrough the cube view.
Level conditions are applied to all four dimensions, even though only three dimensions are in the SELECT statement(Geography, Product, and Time).
Level conditions are applied at the lowes t selected level for each dimension in the query: REGION, DEPARTMENT, and
QUARTER.Since the channel dim ension is omitted from the SELECT statement, the 'ALL_CHANNELS' level condition isautomatically applied to the query for that dimens ion. This feature ensures that OLAP cube aggregations are leveraged.
Note: for information on how to manually create SQL queries agains t OLAP 11g data, see Querying OLAP 11g Cubes.
Back to Topic Lis t
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#thttp://www.oracle.com/technology/obe/olap_cube/querycubes.htm7/23/2019 Creating OBIEE Metadata for OLAP 11g Cubes
22/22
4/14/13 Creating OBIEE Metadata for OLAP 11g Cubes
More Information
For a completed repository for this lesson, download Sales_Cube_OBE.zip. In the File Download window, selectthe C:\\server\repository folder as the des tination, and click Save. Then, unzIpthe archive, which contains the repos itory file (.rpd).
The following IDs and passwords are used with this completed repository:
Admin ID/pas sword: Administrator/Adminis tratorUser ID/Password: olaptrain/oracle
For hands-on practice with BI Answers agains t this OLAP data model, click Querying OLAP 11g Data UsingOracle BI Answers.
To see a demonstration of BI Answers against this OLAP data model, click Fast Answers to Tough QuestionsUsing Simple SQL.
To learn more about Oracle Business Intelligence Enterprise Edition, refer to additional OBEs on the OTNWebsite. From this page, select Business Intelligence Start> Oracle BI Enterprise Edition
Back to Topic Lis t
Place the cursor over this icon to hide all screenshots.
http://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/createbieemetadata.htm#thttp://otn.oracle.com/obehttp://www.oracle.com/technology/products/bi/olap/11g/demos/olap_sql_demo.htmlhttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/QueryData.htmhttp://st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/Files/Sales_Cube_OBE.zip