Professional Documents
Culture Documents
Querying OLAP Data Using Oracle BI Answers
Querying OLAP Data Using Oracle BI Answers
Time to Complete
Approximately 30 minutes.
Topics
This tutorial covers the following topics:
Overview
Prerequisites
Identify the OLAP 11g Repository
Query OLAP Data
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 steps to load and view only the
screenshot associated with that step. You can hide an individual screenshot by clicking it.
Overview
In the previous lesson, Creating BI EE Metadata for OLAP 11g Cubes, you used the Oracle BI Administration tool to create a
repository that contains the appropriate metadata to describe OLAP 11g sample data.
In this lesson, you will use the repository that you previously created to query the OLAP 11g data. Using BI Answers, you
learn how to select, display, and navigate through your OLAP data.
Note: If you did not complete the previous lesson, you can download a completed repository. See the Prerequisites section.
Back to Topic List
Prerequisites
Before starting this tutorial, you should:
Have successfully completed the Lesson 1: Creating BI EE Metadata for OLAP 11g Cubes.
Or...
1.
Install Oracle Database 11g with the OLAP Option (Patch level 11.1.0.7 or higher).
2.
Download and install both components of the sample schema following the instructions in Installing the Oracle
OLAP 11g Sample Schema.
Notes: The Sample Schema installation package includes two parts:
1. Installing the base OLAPTRAIN schema
2. Installing the SALESTRACK analytic workspace in the OLAPTRAIN schema
3.
Have access to or have Installed Oracle Business Intelligence Suite Enterprise Edition 10g Release 3 (version
10.1.3.4).
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
1/15
4/14/13
4.
Download and unzip a complete, predefined repository for this lesson: Sales_Cube_OBE.zip.
Note: In the File Download window, select the <drive>:\<OracleBI_Installation_Location>\server\repository folder
as the destination. Then click Save.
Back to Topic List
Using an edit tool such as MS Notepad, open the NQSConfig.ini file. It is located in the following directory:
<drive>:\<OracleBI_Installation_Location>\server\Config\
Then, scroll down to the [ REPOSITORY ] of the config file.
The sample repository (samplesales.rpd), which is shipped with the BI Enterprise Edition, is listed as the default
repository.
2.
b.
Comment out the samplesales.rpd repository statement by adding a # (pound) symbol at beginning of the
line.
Modify the copied repository statement to specify either:
c.
- Sales_Cube.rpd as the default repository (if you completed the previous lesson)
- Sales_Cube_OBE.rpd as the default repository (if you downloaded the predefined repository)
3.
4.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
2/15
4/14/13
This step causes the BI Server to automatically read the new repository.
Back to Topic List
Using the Start menu, select Programs > Oracle Business Intelligence > Presentation Services.
Note: If BI EE Server is not on the local comupter, you can access the login screen by using the following URL in
your browser:
http://<hostname>:9704/analytics/saw.dll?Answers
Result: The Oracle Business Intelligence login screen appears in your browser.
2.
In the log In screen, enter olaptrain as the User ID, and oracle as the Password, as shown below:
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
3/15
4/14/13
3.
In the Subject Areas box, click the SALESTRACK Sales Cube link, shown here:
Result: The Sales Cube presentation catalog is loaded, and the subject area appears in the Answers selection
pane.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
4/15
4/14/13
Back to Topic
Query OLAP Data
Using BI Answers, you query the OLAP data in the same way you would any data source. BI Answers generates SQL queries
directly against the OLAP cubes by way of the cube views, as described in the previous lesson.
To use BI Answers:
Simply open the desired folder in the selection pane, and click on the item that you want to view. Each item is displayed
as a column in the Criteria tab.
Additionally, filters may be applied to any selected column, and various formatting criteria may be applied.
Finally, click the results tab to execute the query and display the data.
Follow these steps to create and modify queries against the sample OLAP data:
1. Using the Answers selection pane, perform the following:
a. Drill on Channel, Geography, Product, and Time.
Result: the dimension columns that you defined for the Presentation layer appear.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
5/15
4/14/13
When you select the measures and dimension levels that you want:
The query is written against the OLAP cube views
The OLAP engine retrieves stored data and solves all of the selected calculations at the requested level of detail.
6/15
4/14/13
2. Click the Results tab (or the Display Results button). Sales for the Geographical regions appears in the display.
Note: the Sales values are automatically returned for the "All" level in the other three dimension, as follows: Channel = "All
Channels"; Product = "All Products"; Time = "All Years". The correct level of aggregation for these dimensions is returned
because of the level-aware OLAP cube metadata that is part of the repository.
3. In the Results tab, drill on Europe. Sales data for the European countries are returned.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
7/15
4/14/13
4. In the Answers selection pane, drill on Time and select Calendar Year. The Results display should now look something
like this:
5. Click the Criteria tab, then click the Filter tool for Time.
6. Select the year 2009 by entering CY2009 in the Value box. Then click OK.
8/15
4/14/13
7. Under the Columns section of the Criteria tab, drag the Time tile before Sales, like this:
8. Click the Results tab. The report should look like this:
9. In the row for France, drill on CY2009. The following results appear:
The query automatcially returns data for the lowest level in the drill path.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
9/15
4/14/13
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
10/15
4/14/13
- Click OK.
Result: the saved filter is added to the My Filters folder:
11. In order to start a new query, click the Remove Filters button:
12. From the BI Answers navigation pane, click on the following items (in the order specified):
All Regions (from Geography)
Calendar Year (from Time)
Department (from Product)
Then, from the Sales Cube measure folder:
Sales
Sales Ytd Pr Yr Pct Chg
How is Sales Ytd
The resulting Criteria display looks like this:
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
11/15
4/14/13
13. Apply the same filter to the Time dimension that you created previously, by using the saved filter:
a.
b.
In the Apply Saved Fitler window, select the Apply contents of filter ... option, and click OK.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
12/15
4/14/13
14. Modify the Sales Ytd Prior Year % Change measure to show two decimal places.
a.
Click the Column Properties tool under Sales Ytd Pr Yr Pct Chg, as shown below.
b.
- Click OK.
15. Click the Results tab to view the data.
Notes:
The How is Sales Ytd measure is a custom OLAP calculation that returns a text value based on
performance of the Sales Ytd Prior Year % Change measure. If the percent change in YTD Sales is above
15%, "Outstanding" is returned. If the percent change is between 0 - 15%, "On track" is returned. If the
percent change is negative, "Needs Improvement" is returned.
The stored and calculated OLAP data is returned, with each measure result correctly computed for the
selected dimension levels. In this case: Geography = "All Regions"; Time = "Calendar Year" (where year =
CY2009); Product = "Department"; Channel = "All Channels"
16. Click the CY2009 link in the table to drill down. The results should now look like this:
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
13/15
4/14/13
17. Next, click the Q1-CY2009 link in the table to drill down. The table should now look like this:
Notice that the How is Sales measure shows the Cameras and Camcorders product department is under-performing in
both January and February. The the Sales Ytd Prior Year % Change measure provides the data points.
18. Click the Cameras and Camcorders link in Feb-2009 to drill down. The table should now look like this:
Notice that the Cameras and Accessories product category is the problem area in the selected time period.
As you can see, the power and performance of the Oracle OLAP11g Option is easily accessible to Oracle BI Answers, and
all other Oracle BI EE tools. In addition, creating the appropriate metadata is quick and easy, as described in Creating BI
EE Metadata for OLAP 11g Cubes.
19. After you finish experimenting with the data, simply close the browser to exit BI Answers.
Back to Topic
More Information
To see a demonstration of BI Answers against this OLAP data model, click Fast Answers to Tough Questions
Using Simple SQL.
The OLAP data used in this tutorial was created using steps found in the Building OLAP11g Cubes tutorial. For
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
14/15
4/14/13
The OLAP data used in this tutorial was created using steps found in the Building OLAP11g Cubes tutorial. For
information about the OLAP 11g data model, and how it was created, click the link.
To learn more about Oracle Business Intelligence Enterprise Edition, refer to additional OBEs on the OTN Web
site. From this page, select Business Intelligence Start > Oracle BI Enterprise Edition
Back to Topic List
Place the cursor over this icon to hide all screenshots.
st-curriculum.oracle.com/obe/db/11g/r1/olap/biee/querydata.htm
15/15