Querying OLAP Data Using Oracle BI Answers
Lesson 2: Querying OLAP 11g Data Using Oracle BI Answers
This tutorial covers querying Oracle Database 11g OLAP Option
data and calculations using Oracle BI Answers.
Approximately 30 minutes.
This tutorial covers the following topics:
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.
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
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).
|
| 4. |
Download the OLAP11g_OBE.zip file which contains a complete, predefined repository of this
lesson.
Unzip the repository file (.rpd) into the following location: C:\<OracleBI_Installation_Location>\server\repository
|
Back to Topic List
Before you can access the repository for your OLAP 11g data,
you must identify it as the default repository in the NQSConfig.ini file.
To modify the confiig file appropriately,
perform the following steps:
1. |
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, locate the [ REPOSITORY ] section
of the config file, as shown here:

The sample paint.rpd repository, which is shipped
with the BI Enterprise Edition, is listed as the default repository.
|
2. |
Modify the config file as follows:
| a. |
Make a copy of the repository statement. |
| b. |
Comment out the paint.rpd
repository statement by adding a # (pound) symbol
at beginning of the line. |
| c. |
Modify the copied repository statement
to specify either:
- olaptrain.rpd as the default repository (if
you completed the previous lesson)

- OLAP11g_OBE.rpd as the default repository
(if you downloaded the predefined repository)

|
|
| 3. |
Save the NQSConfig.ini file, and close the Editor.
|
| 4. |
Stop, and then restart, the Oracle BI Server
service.
This step causes the BI Server to automatically read the new repository. |
Back to Topic List
To access the OLAP 11g Cubes repository as a Subject Area in BI
Answers and create an analytic report, perform the following steps:
Back to Topic List
Open the OLAP 11g Cubes Subject
Area
| 1. |
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:
Then, click Log In.
Notes: If you logged in using the Oracle BI Presentation Services method,
go to step 3. If you logged in using the BI Answers URL method, go to
step 4.
|
| 3. |
In the Presentation Server window, click the Answers
link.
Result: Oracle BI Answers appears in the browser.
|
| 4. |
In the Subject Areas box, click the OLAP 11g Cubes
link, shown here:
Result: The OLAP 11g Cubes presentation catalog is loaded, and the
subject area appears in the Answers selection pane.
|
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, Time, Geography,
and Product.
Result: the dimension columns that you defined for the Presentation
layer appear.
|
| b. |
Drill on
Sales, Forecasts, and Targets.
Result: the stored and calculated measures appear in the folders
that you defined for the Presentation layer.
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. |
|
| c. |
Under the
Geography node, click Region.
Result: Geography {Region} is added to
the Criteria tab.
|
| d. |
Under the Sales node, select the
Sales measure. |
The resulting display should look like this:
|
| 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.
|
| 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 2007 by entering CY2007 in the Value
box. Then click OK.
Result: the following filter critera now appears:
|
| 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 CY2007. The following
results appear:
The query automatcially returns data for the lowest level in the drill
path.
|
| 10. |
Once again, click the Criteria tab.
BI Answers records changes to the query in the Filter section. You
can modify, save, or remove any filter.
Save the filter on Calendar Year, as follows:
| a. |
In the Filters section:
- First delete the Region
and Country filters by clicking the Delete
icon [X] next to each. The resulting display
looks like this:
- Then, click the Save Filter button.
|
| b. |
In the Save Filter window:
- Click My Filters
- Enter CY2007 as the name, and Calendar
Year 2007 as the description.
- 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:
Then, click the Remove All (Columns) button:
|
| 12. |
Then, from the Sales measure folder:
 |
Sales |
 |
Sales YTD % Chg Pr Year |
 |
How is Sales YTD |
The resulting Criteria display looks like this:
|
| 13. |
Apply the same filter to the Time dimension that you created previously,
by using the saved filter:
| a. |
Click the CY2007 item under My Filters.
Result: the Apply Saved Filter window appears.
|
| b. |
In the Apply Saved Fitler window,
select the Apply contents of filter ... option,
and click OK.
Result: The filter is added to the query criteria:
|
|
| 14. |
Modify the Sales YTD % Change Prior Year measure to show two decimal
places.
| a. |
Click the Column Properties tool under
Sales YTD % Chg Pr Year, as shown below.
|
| b. |
In the the Data Format tab of
the Column Properties window:
- Select the Override Default Data Format option.
- Select 2 as value for the Decimal Places option.
- 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 % Change Prior Year 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 = CY2007); Product = "Department"; Channel =
"All Channels"
|
| 16. |
Click the CY2007 link in the table to drill down.
The results should now look like this:
Again, all measure data is computed perfectly.
|
| 17. |
Next, click the Q1-CY2007 link in the table to drill
down. The table should now look like this:
Notice that Sales YTD % Change shows the Cameras and Camcorders product
department is under-performing in both January and February.
|
| 18. |
Click the Cameras and Camcorders link in Feb-2007
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, by creating the appropriate metadata 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
Back to Topic List
Place the cursor over this icon to hide all screenshots.
|