OBIEE Labsteps
OBIEE Labsteps
D46077GC10
Edition 1.0
February 2007
D49384
Author
Jim Sarokin
Disclaimer
Technical Contributors
and Reviewers
Matt Bedin
Gerry Langton
M. Lea Shaw
Kasturi Shekhar
Krishnan Viswanathan
Kurt Wolff
Editors
Daniel Milne
Atanu Raychaudhuri
Richard Wallis
Graphic Designer
Satish Bettegowda
Validation Testing
Anirban Banerjee
Publishers
Srividya Rameshkumar
Veena Narasimhan
Contents
Practice 1-1 Exploring an Oracle BI Repository ...........................................................1
Solutions 1-1 Exploring an Oracle BI Repository........................................................12
Practice 2-1 ABC Business Scenario..........................................................................15
Practice 2-2 Gather Information to Build an Initial Business Model............................22
Solutions 2-2 Gather Information to Build an Initial Business Model..........................24
Practice 2-3 Creating a Repository and Importing a Data Source..............................25
Solutions 2-3 Creating a Repository and Importing a Data Source ............................34
Practice 2-4 Defining Keys and Joins .........................................................................35
Solutions 2-4 Defining Keys and Joins .......................................................................38
Practice 2-5 Creating Alias and Select Tables............................................................39
Practice 3-1 Creating the Business Model..................................................................45
Solutions 3-1 Creating the Business Model ................................................................52
Practice 3-2 Creating Simple Measures .....................................................................53
Solutions 3-2 Creating Simple Measures....................................................................57
Practice 4-1 Creating the Presentation Layer .............................................................59
Solutions 4-1 Creating the Presentation Layer ...........................................................66
Practice 5-1 Testing the Repository............................................................................67
Solutions 5-1 Testing the Repository ..........................................................................77
Practice 5-2 Checking Consistency ............................................................................79
Solutions 5-2 Checking Consistency ..........................................................................84
Practice 6-1 Enhancing the Product Dimension .........................................................85
Practice 6-2 Creating Multiple Sources for a Logical Table Source (Manual) ............88
Solutions 6-2 Creating Multiple Sources for a Logical Table Source (Manual) ..........92
Practice 6-3 Creating Multiple Sources for a Logical Table Source (Automated) ......93
Solutions 6-3 Creating Multiple Sources for a Logical Table Source (Automated).....97
Practice 6-4 Adding a New Logical Table Source ......................................................98
Solutions 6-4 Adding a New Logical Table Source.................................................. 101
Practice 7-1 Creating Calculation Measures by Using Logical Columns................. 103
Solutions 7-1 Creating Calculation Measures by Using Logical Columns............... 109
Practice 7-2 Creating Calculation Measures by Using Physical Columns............... 110
Solutions 7-2 Creating Calculation Measures Using Physical Columns.................. 114
Practice 7-3 Creating Calculation Measures by Using the Calculation Wizard ....... 115
Solutions 7-3 Creating Calculation Measures by Using the Calculation Wizard ..... 121
Practice 8-1 Creating Dimension Hierarchies .......................................................... 123
Practice 8-2 Creating Level-Based Measures ......................................................... 134
iii
iv
Scenario
Time
1520 minutes
Instructions:
1. Stop the Oracle BI Server service.
a. Double-click the Services icon on your desktop.
b. Right-click the Oracle BI Server service and select Stop.
c. Verify that the status is blank, meaning the service is stopped.
d. Minimize the Services window.
2. Copy the repository for this practice to the appropriate directory.
a. Navigate to E:\Labs.
b. Copy the ClassStart.rpd file.
c. Paste the file in E:\OracleBI\server\Repository.
3. Start the Oracle BI Administration Tool and open the ClassStart repository in Offline mode.
a. Select Start > Programs > Oracle Business Intelligence > Administration.
b. Select File > Open > Offline.
c. In the Open dialog box window, double-click ClassStart.rpd.
d. Log in as Administrator, no password.
4. Examine the properties of the ORCL database object.
a. In the Physical layer, double-click the ORCL database object to view its properties.
b. Click the General tab.
c. What is the database platform type for this database?
d. Click the Features tab. Each database comes with a set of features that determine the SQL
Oracle BI Server will issue for this database. Features can have a Boolean value (on or off),
integer value, or a string value. Scroll to the right to view the Value and Default columns.
The features are specified in the DBFeatures.ini file located in the E:\OracleBI\server\Config
Oracle BI Server Administrator 10g: Build Repositories
directory. A check mark in the Default check box identifies the default SQL features. Default
SQL features that are supported by the database type of the data source are automatically
selected.
e. Click the Connection Pools tab. This tab identifies all of the connection pools associated
with this database.
f. Click the Display Folders tab. Physical layer objects can be organized into display folders.
When there are display folders in the Physical layer, they are listed here.
g. Click Cancel to close the Properties dialog box.
5. Explore the properties of a connection pool object.
a. In the Physical layer, expand the ORCL database object.
b. Double-click the SUPPLIER CP connection pool object.
c. What is the call interface type for this connection pool?
The call interface is the application program interface (API) used to access the data source.
Some databases may be accessed using native APIs, some use ODBC.
d. What is the data source name for this connection pool?
The data source is accessed by Oracle Call Interface (OCI). The data source name, ORCL, is
a tnsnames.ora entry.
e. Click Cancel.
6. Examine the properties of a physical schema and its physical table objects.
a. Expand the SUPPLIER2 schema folder to display the physical table objects in the Physical
layer. These physical table objects map to tables in the physical database.
There are more tables in the physical database. The tables displayed here are the tables that
have been imported into the Physical layer. You learn more about importing tables later in
this course in the lesson titled Building the Physical Layer of a Repository.
b. Expand D1_ORDERS2 to view the physical columns for this table. D1_ORDERS2 is the
fact table in this business model. These columns correspond to the columns in the physical
database.
c. Right-click D1_ORDERS2 and select View Data. The first 100 rows of data for this table
are displayed.
d. Click Close.
e. Double-click the D1_ORDERS2 table object to view its properties.
f. Click the Columns tab to view the columns in this table. This is another way to create, view,
and modify physical columns.
g. Click the Foreign Keys tab.
h. Which tables have join relationships with D1_ORDERS2?
i. Double-click one of the foreign keys. The Physical Foreign Key dialog box opens and
displays the join relationship in the Expression field.
d. Click Cancel.
8. Examine the properties of a logical table in the SupplierSales business model.
a. If necessary, expand the SupplierSales business model in the Business Model and Mapping
layer.
b. What are the logical table objects in the SupplierSales business model?
c. Expand the SalesFacts logical table to view the logical columns for this table. SalesFacts is
the logical fact table in this business model. These columns map to columns in the Physical
layer.
j. Right-click SalesFacts and select Business Model Diagram > Whole Diagram. The Logical
Table Diagram opens and displays the logical join relationships.
k. Double-click the connector between Customers and SalesFacts. The Logical Join dialog box
opens. Notice that there is no join expression in the Expression field and that there is a oneto-many relationship between the Customers logical dimension table and the SalesFacts
logical fact table. You learn more about complex logical joins later in this course in the
lesson titled Building the Business Model and Mapping Layer of a Repository.
a. Expand the Sources folder for the SalesFacts table to display the D1_ORDERS2 logical
table source for this logical table. In this example, there is only one logical table source. It is
possible to have many logical table sources for a single logical table.
b. Double-click the D1_ORDERS2 logical table source to view the properties.
c. Click the General tab.
d. The D1_ORDERS2 logical table source maps to which physical table?
h. Explain why some logical columns have names that are different from the physical columns
to which they map.
i. Click the Content tab. Currently, there is no information in the tab. Later in this course, you
learn how to use this tab to identify aggregation content and fragmentation content.
j. Click Cancel to close the Logical Table Source dialog box.
10. Examine the properties of a logical column in the SalesFacts logical table.
a. Double-click the Dollars logical column to open the properties window. Dollars is a measure
in this business model.
b. Click the General tab. This tab provides general information about the column, like the
column name, the table it belongs to, and a description of the column.
c. Click the Data Type tab.
d. Dollars maps to which physical table and physical column?
f. Double-click the D1_ORDERS2 logical table source in this dialog box. Note that this is
another way to access the Logical Table Source properties dialog box.
g. Click Cancel to close the Logical Table Source properties dialog box.
h. What aggregation rule is applied to the Dollars logical column?
i. Click the Aggregation tab. Note that the default aggregation rule is set to Sum. It is common
for measures in business models to have aggregation rules applied. Open the aggregation rule
Oracle BI Server Administrator 10g: Build Repositories
j. Make sure that the Sum aggregation rule is selected and click Cancel to close the Logical
Column dialog box.
11. Examine the properties of the SupplierSales presentation catalog object.
a. In the Presentation layer, double-click the SupplierSales presentation catalog to open the
Presentation Catalog properties dialog box.
b. Click the General tab. Note that the presentation catalog name is the same as the business
model name. This is because the presentation catalog was created by dragging the business
model from the Business Model and Mapping layer to the Presentation layer. If desired, you
could use this tab to change the name of the presentation catalog. The description appears in
the Answers user interface.
c. Click Permissions to open the Permissions dialog box. This shows permissions for all users
and groups in the repository. Currently, there are no users and groups defined, so the default
is to give everyone read permission for this presentation catalog. You learn more about
setting up security later in this course in the lesson titled Security.
d. Click Cancel to close the Permissions dialog box.
e. Click the Presentation Tables tab to display a list of presentation tables. You can use this
tab to add, remove, edit, or change the display order of the presentation tables.
f. Click the Aliases tab. If you change the name of a presentation catalog, the tool
automatically creates an alias using the previous name. You can use this tab to specify or
delete and alias for a presentation folder.
g. Click Cancel to close the Presentation Catalog dialog box.
12. Examine the properties of a presentation table in the SupplierSales presentation catalog.
a. In the Presentation layer, expand SupplierSales to view the presentation tables.
b. Double-click the SalesFacts table to view the properties.
c. Click the General tab. You could use this tab to change the name of the presentation table. A
description would appear as a tool tip in the Answers user interface.
d. Select the Columns tab to see a list of columns in the SalesFacts presentation table. You can
use this tab to add, remove, edit, or change the display order of the presentation columns.
e. The Dollars presentation column maps to which logical table and logical column in the
Business Model and Mapping layer?
f. Double-click Dollars to open the Presentation Column properties dialog box. This is one
method for viewing and modifying presentation column properties.
g. Click Cancel to close the Presentation Column properties dialog box.
h. Click Cancel to close the Presentation Table properties dialog box.
i. Double-click the SupplierSalesDM presentation catalog.
j. Click the General tab. Note that this presentation catalog also maps to the SupplierSales
business model. Many presentation catalogs can map to a single business model, but each
presentation catalog can map to only one business model.
k. Click Cancel to close the Presentation Catalog dialog box.
13. Examine the properties of a presentation column in the SalesFacts table.
a. Expand the SalesFacts presentation table.
b. Double-click Dollars to open the Presentation Column properties dialog box. Notice that this
is the same dialog box you saw earlier. This is another method for viewing and modifying
presentation column properties.
c. Click Cancel to close the Presentation Column properties dialog box.
d. Click File > Close to close the repository without saving any changes.
e. Leave the Administration Tool open.
14. Modify the NQSConfig.ini file to load the ClassStart repository on Oracle BI Server startup.
a. Navigate to E:\OracleBI\server\Config
b. Double-click NQSConfig.ini to open the file.
c. Scroll to the REPOSITORY section.
d. Modify the file to load the ClassStart repository. Your file should look similar to this:
16. Examine the relationship between the columns in the Presentation layer and the columns
displayed in Oracle BI Answers.
a. In the Administration Tool, select File > Open > Offline.
b. Double-click ClassStart.rpd.
c. Click Yes to open as read-only.
d. Click OK to log in as Administrator, no password.
e. Select Start > Programs > Oracle Business Intelligence > Presentation Services.
f. Log in as Administrator, no password.
g. Click the Answers link to navigate to the Answers start page.
h. What are the names of the subject areas listed on the Answers start page?
i. Which object in the repository corresponds to the SupplierSales subject area in Answers?
j. Size the windows of Answers and the Administration Tool so you can see the two
applications side by side.
k. Click the SupplierSales subject area link on the Answers start page.
l. Expand the Facts table in Answers to see the nested SalesFacts table.
m. Expand the SupplierSales presentation catalog in the Administration Tool. Notice that the
SupplierSales tables listed in Oracle BI Answers have the same names as the tables listed in
the Presentation layer in the Administration Tool.
n. Expand the SalesFacts table in Answers.
o. Expand the SalesFacts table in the Presentation layer in the Administration Tool. Notice that
the column names in the Presentation layer of the Administration Tool are the same as the
columns listed for the SalesFacts table in Answers.
p. Do some more exploration on your own. Examine tables and columns of the SupplierSales
subject area in Answers and notice how they correspond to the Presentation layer. The key
point to understand is this: What you see in Answers is driven by what is defined in the
repository in the Administration Tool.
17. Create a simple request.
a. In Answers, expand the Customers table and select the Region column to add it to the
request criteria in the right pane.
b. Expand Facts > SalesFacts and select the Dollars column to add it to the request.
c. Click the Results tab. The table displays total dollars (sales) for each region.
10
11
5.c.
5.d.
6.h.
7.c.
8.b.
What are the logical table objects in the SupplierSales business model?
Customers, Periods, Products, SalesFacts
9.d.
9.f.
Scroll to the right to view the Physical Table column. Do all columns in the SalesFacts
logical table map to the same physical table?
Yes
9.g.
9.h.
Explain why some logical columns have names that are different from the physical
columns to which they map.
Because the names were changed in the logical (BMM) layer
10.d.
10.e.
10.h.
12
12.e.
The Dollars presentation column maps to which logical table and logical column in the
Business Model and Mapping layer?
SalesFacts.Dollars
16.h.
What are the names of the subject areas listed on the Answers start page?
SupplierSales, SupplierSalesDM
16.i.
Which object in the repository corresponds to the SupplierSales subject area in Answers?
SupplierSales presentation catalog
13
To read the ABC document to become familiar with the business scenario for
the fictitious company used throughout the course
Time
1015 minutes
Background
ABC sells food and non-food items to restaurant chain customers throughout the United States.
ABCs product line includes food, condiments, cookware, clothing, and other miscellaneous
restaurant supplies.
ABC employees currently rely on reports generated by their IT department to analyze sales and
shipment data. These reports are generated monthly and therefore contain static information. ABC is
looking for a way to generate dynamic, interactive reports to analyze this data in order to effectively
manage its orders, monitor sales performance, and increase overall customer satisfaction. ABC
recognizes that it needs a business intelligence solution that will provide its employees with the data
and tools they need to query large data sets, generate reports, analyze data, identify trends, and
monitor business performance.
In order to achieve these goals, ABC has decided to implement an Oracle Business Intelligence
solution. The solution will enable its sales executives and operations managers to answer pertinent
business questions that are important to running the part of the business for which they are
responsible. The desired system will provide timely, up-to-date sales order data and provide sales
and shipment performance monitoring, which will allow ABC to better focus its customer service
efforts. ABC also has the vision of making this data directly available to customers, so they can
better analyze their purchase history and compare it with what is being purchased nationally or
regionally. This initiative is consistent with ABCs commitment to deliver a high quality business
intelligence solution that will set it apart from its competitors and result in additional sales and
revenue.
15
Business Requirements
You are a consultant, hired by ABC to implement this business intelligence solution. From your
initial interviews with ABC managers, you obtain the following information about ABC:
Managers want to use their own information to ask and answer questions about the sales history
of their products, the buying history of their customers, the order fulfillment performance of their
operations group, and the selling performance of the sales force.
The company has little experience in data analysis and they do not expect to hire any data
analysts in the future. They want to be able to ask relevant questions and analyze the results
themselves using an intuitive user interface.
The database has about 350,000 invoice-level records that span the period from January 2, 1998
to April 21, 1999.
To make this kind of information widely available within the enterprise, the business intelligence
solution must have a structure consistent with the way employees think about the business. From
further interviews and an examination of existing sample reports presenting invoice-based data, you
determine the following:
ABC employees think about their business in terms of sales, products and product hierarchies,
time periods, and relationships between customers and the sales force.
ABC employees measure product data at five levels. From the top level to the bottom (most
detailed) level, the product levels are:
1. Total
2. Type
3. Sub-type
4. Generic Product
5. Specific Product
ABC employees measure sales organization data at five levels. These levels mirror
organizational management responsibilities. From the top level to the bottom, they are:
1. Total
2. Region
3. District
4. Sales Representative
5. Customer
ABC employees measure time data at five levels:
1. Total time
2. Year
3. Quarter
4. Month
5. Day
Many existing reports contain data presented at these levels. An example is:
o Total Product sales
o Product Type sales = Cheese
o Product Sub-Type sales = American Cheese
o Generic Product sales = American Cheese Slices
o Specific Product sales = 2 Pack American Cheese Slices 16 Slices
16
In addition to these hierarchies, ABC would like to group and analyze customers using geographical
attributes like Zip Code, City, and State. They also would like to analyze products by characteristics
such as Diet Type and Suppliers.
The most common measures used in reports are dollar sales, units ordered, units shipped, and net
weight shipped. Another important measure for order fulfillment is cuts, the difference between
the units ordered and units shipped. Operations management wants to track this because cuts equate
to lost sales, and operations management is responsible for minimizing cuts.
ABC would like to analyze these measures at all levels of the hierarchies, by the important product
and customer attributes, by the various time periods, and be able to compare performance with
previous years.
17
Source Data
By interviewing ABCs database administrators and examining documents they provide, you learn
that the source data resides in an invoice system on an Oracle database. The core data containing the
business measures is stored in an invoice (orders) table.
In addition to the invoice information, there are various tables that provide information on
customers, the product lines, the time periods, and the relationship between customers and the
companys sales organization.
The relevant data exist in the following tables, which are part of the invoice schema:
18
D1_PRODUCT_TYPE
D1_PRODUCT_SUBTYPE
D1_CUSTOMER2
19
D1_ORDERS2
20
Training Objective
This primary objective of this training is to build the metadata and administer Oracle BI Server to
support the business requirements of the ABC Company. The metadata will allow ABC employees
to build interactive reports and Interactive Dashboards they can use to better analyze, monitor, and
manage their business, and improve overall customer satisfaction.
The recommended strategy for building metadata is to use an iterative approach. Begin by building a
relatively simple repository:
After the initial repository is built and tested, add additional features to the business model:
In the lessons that follow, you follow this strategy to build the metadata that presents the business
model to support the business requirements of the ABC Company. At first, the metadata will include
only the basic set of physical tables needed to support the initial business model. You will add more
tables and complexity in future iterations.
21
Scenario
Before you can begin to build the metadata, you need to gather and analyze
the business requirements of the ABC company. In this practice, you use the
information provided in the ABC document that you read in the previous
practice to determine the structure of the initial business model.
Outcome
Time
1015 minutes
Instructions:
Use the information in the ABC document to help you determine the following information, which
you will need to implement the initial business model.
1. What measures (facts) does ABC wish to report on?
3. Against which attributes (dimensions) does ABC want to analyze their facts?
22
6. Complete the following diagram with your identified facts and dimensions:
(Dimension)
(Dimension)
(Facts)
(Dimension)
23
2.
3.
Against which attributes (dimensions) does ABC want to analyze their facts?
Product, Time (Period), Customer
4.
5.
6.
Complete the following diagram with your identified facts and dimensions:
Time Period
Product
24
Sales
Customer
To create a new repository and import the table schema from an external data
source
Scenario
First, you verify an existing ODBC data source for an Oracle database. Then
you create a new repository and import tables from the SUPPLIER2 schema
into the Physical layer of the repository using the Server Administration Tool.
Outcome
At the end of this lesson you have a new repository file, ABC.rpd, which
contains the D1_CALENDAR2, D1_CUSTOMER2, D1_ORDERS2, and
D1_PRODUCTS tables in the Physical layer.
Time
1015 minutes
Instructions:
1. An ODBC data source is needed to import schema information about a data source into an
Oracle BI Server repository. In this step, you explore an existing ODBC data source for an
Oracle database. The database has already been installed on your machine.
a. On your desktop, double-click the Data Sources (ODBC) icon to open the ODBC Data
Source Administrator.
b. Click the System DSN tab.
c. Double-click the ORCL system data source. The Oracle ODBC Driver Configuration dialog
box opens.
d. Click Test Connection.
e. In the User Name field, verify the name is SUPPLIER2.
f. In the Password field, type SUPPLIER2.
g. Click OK. You should see a Connection successful message.
h. Click OK.
i. Click OK to close the Oracle ODBC Driver Configuration window.
j. Click OK to close the ODBC Data Source Administrator window.
2. Before you import tables from the SUPPLIER2 schema into the Physical layer of the repository,
you examine the tables and columns defined in the database using Oracle Enterprise Manager.
a. Open Internet Explorer and enter the following URL: http://<machine name>:1158>/em.
b. Log in to the ORCL database as SUPPLIER2 / SUPPLIER2, connect as Normal.
3. Examine the SUPPLIER2 schema.
Oracle BI Server Administrator 10g: Build Repositories
25
a.
b.
c.
d.
26
so that only tables that begin with D are visible. The filter is case sensitive.
j. Select the D1_CALENDAR2 table. This automatically deselects any higher-level container
objects in the tree.
k. Use Ctrl + click to select the remaining three tables to import into the Physical layer to build
ABCs initial business model: D1_CUSTOMER2, D1_ORDERS2, and D1_PRODUCTS.
l. Verify that only the check boxes for Tables and Keys are selected. This is the default. The
check boxes allow you to select the information to import. You can import tables, keys,
foreign keys, database views, aliases, synonyms, and system tables. Import tables, aliases,
synonyms, or views only if you plan to generate queries against them. In other words, only
import objects needed to support your business model. However, do not worry if you import
extra objects at this point. You can always delete objects later if they do not support your
business model.
27
m. Scroll to verify that no higher-level container objects are selected, and that only the four
tables for import are selected:
n.
o.
p.
q.
28
instance.
D1_CALENDAR2 is the table containing period information. It contains columns that are
Oracle BI Server Administrator 10g: Build Repositories
29
useful in queries using time periods as criteria for selecting and grouping data.
D1_CUSTOMER2 contains customer information and D1_PRODUCTS contains product
information for the business model.
D1_ORDERS2 contains the invoice-level information needed to create the measures in the
business model.
Per commonly used nomenclature, D1_CALENDAR2, D1_CUSTOMER2, and
D1_PRODUCTS are dimension tables and D1_ORDERS2 is a fact table. In the next
practice, you create keys and joins so that the four tables form a star schema.
7. Examine the connection pool for ORCL data source.
a. Double-click the SUPPLIER CP connection pool object. Recall that you provided this name
for the connection pool during the import process. Connection pools regulate access to the
data source. Every data source must have at least one connection pool. A connection pool
provides connections for multiple concurrent data source requests (queries), reducing the
immediate overhead of connecting to a data source. Connection pools automatically queue
connection requests when they exceed connection pool limits
b. Why would you create more than one connection pool for a single data source?
c. Call interface is the application program interface with which to access the data source;
Oracle Call Interface (OCI) in this example.
d. Maximum connections is the maximum number of connections allowed for this connection
pool. The default is 10. Each connection consumes about 1MB of memory.
e. Data source name is configured to access the database to which you want to connect. This
value was set automatically when you imported the tables into the physical layer.
f. User name and password are also configured automatically during import depending on the
parameters set for the ODBC data source in the ODBC Administrator.
g. Enable connection pooling allows a single database connection to remain open for the
specified time (in minutes) for use by future query requests. Connection pooling saves the
overhead of opening and closing a new connection for every query. If you do not select this
option, each query sent to the database opens a new connection.
h. For more information about connection pool parameters, please consult the Oracle BI Server
Administrator Guide or click the Help button.
i. Click OK to close the Connection Pool dialog box.
8. Examine the properties of the database object in the Physical layer.
a. Right-click the ORCL database object and select Properties. You can also double-click the
object.
b. Click the General tab, if not selected by default. This tab provides general information about
the data source, such as the database name, database type, and so forth.
c. Set the database type to Oracle 10gR1.
30
d. Click the Features tab. This tab lists features that, when selected or deselected, determine the
SQL that Oracle BI Server will issue for this database. This features table is set to the
databases default values during the schema import process. You can turn off any of these
features if you determine there is a reason to do so. Oracle BI Server will adjust the SQL that
it sends to that database accordingly and will compensate for the unchecked features with its
own functionality. Please note that turning a feature on when the default is off may or may
not cause that feature to be used in generated SQL. To use a feature, Oracle BI Server needs
to know how the feature is implemented in that database platform. If it does not know, it will
not use it, even though the feature is selected.
h. Click the Find Again button to display the next feature containing this search string.
i. Is the INTERSECT_ALL_SUPPORTED feature implemented on this database platform?
j. Click the Connection Pools tab. This tab displays all connection pools associated with this
data source. In this example, there is only one connection pool.
k. Click the Display Folders tab. You could use this tab to create folders to organize the
information in the Physical layer.
Oracle BI Server Administrator 10g: Build Repositories
31
b.
c.
d.
e.
f.
tables. It is also possible to update row count for a single physical layer object by rightclicking the object and selecting Update Row Count.
When Update All Row Counts completes, move the cursor over the tables and observe that
row count information is now visible, including when the row count was last updated.
Expand any table.
Move the cursor over the columns for the table and observe that row count information is
now visible.
Right-click any table and select View Data to view the data for the table.
Close the View Data dialog box.
33
4.c.
7.b.
Why would you create more than one connection pool for a single data source?
To give certain users more immediate access to data over other users. You can affect the
immediacy of access to the database by creating multiple connection pools.
8.g.
8.i.
34
To define the primary keys, foreign keys, and joins in the Physical layer
Scenario
You have just created a new repository and imported the initial tables from the
SUPPLIER2 schema into the Physical layer of the repository. Now, you must
define keys and joins that exist on the physical database in the Physical Layer
of the repository. If the imported database joined over primary key-foreign key
relationships and the primary keys and foreign keys were imported into the
repository, the join conditions would be set up automatically. But that is not
always what you want, because foreign key relationships are set in a database
for only one purpose (referential integrity), which may not correspond to the
purpose of the Administration Tool (knowing which joins to include in SQL). In
this database, primary keys, foreign keys, and joins have not been defined in
the database. Therefore, you need to define the keys and join conditions
manually using an objects Properties dialog box and the Physical Diagram
feature of the Administration Tool.
Outcome
Time
1520 minutes
Instructions:
1. In this step, you define joins and keys using the using the Physical Diagram feature of the
Administration Tool.
a. Right-click the ORCL database object and select Physical Diagram > Object(s) and All
Joins to open the Physical Diagram dialog box. Alternatively, you can select the ORCL
database object and then click the Physical Diagram button
on the toolbar.
b. Rearrange the table objects so they are all visible.
c. Click the New Foreign Key button
on the toolbar.
d. Click the D1_CALENDAR2 table, and then click the D1_ORDERS2 table. The Physical
Foreign Key dialog box opens. It matters which table you click first. The join is creating a
one-to-many (1:N) relationship that joins the key column in the first table to a foreign key
column in the second table.
e. Select the columns that join the tables. Select the D1_CALENDAR2.YYYYMMDD
column, and then select D1_ORDERS2.PERIODKEY. Verify that the Expression edit box
(at the bottom) contains the following expression:
D1_CALENDAR2.YYYYMMDD = D1_ORDERS2.PERIODKEY
f. Click OK.
35
g. A prompt appears with the message: A matching table key doesnt exist in table
D1_CALENDAR2. Do you want to create one? Click Yes. This automatically creates a
key on the YYYYMMDD column in the D1_CALENDAR2 table.
h. Observe the 1:N relationship between D1_CALENDAR2 and D1_ORDERS2 represented in
the Physical Diagram view:
i. Repeat the process you just completed and create joins and keys for the other tables. Create
the joins using the following expressions as a guide:
D1_CUSTOMER2.NEWKEY = D1_ORDERS2.CUSTKEY
D1_PRODUCTS.PRODUCTKEY = D1_ORDERS2.PRODKEY
As you create the join links, you will notice that the tool will guess at which columns to
join on the basis of common names. Override the tool when necessary and verify the join
expressions in the Expression edit field.
As you create the joins, the same message appears asking you to create a column as a key
column on the first table, which is necessary to create the relationship to the foreign key
column in the second table. When you see this message, click Yes.
2. Observe the Physical Diagram and verify your work:
a. You may want to adjust the scale of the objects in the Physical Diagram. If so, right-click the
white space in the Physical Diagram window and select Zoom and one of the zoom options.
You can also use right-click to adjust the grid properties and options.
b. Close the Physical Diagram window.
3. Observe some additional options for viewing the physical table diagram.
a. Right-click D1_CALENDAR2 table and select Physical Diagram > Object(s) and Direct
Joins.
b. Observe the Physical Diagram:
36
37
38
Why are ALL of the tables visible in the diagram with D1_Orders2?
All of the tables have a one-to-many relationship with D1_Orders2.
Scenario
You create an Order Date alias that points to the D1_CALENDAR2 table, and
a RegionEast select table. You also practice deploying and undeploying a
view and verifying the results.
Outcome
A new alias table called ORDER_DATE and a select table called RegionEast
Time
1520 minutes
Instructions:
1. Create the ORDER_DATE alias table.
a. Right-click D1_CALENDAR2 and select New Object > Alias. The Alias Physical Dialog
box opens.
b. Name the alias ORDER_DATE.
c. Click the Columns tab. Notice that alias tables inherit all of the column definitions from the
source table.
d. Double-click any of the columns listed to open the Physical Column properties dialog box.
Notice that the column is read-only and cannot be modified.
e. Click Cancel to close the Physical Column dialog box.
f. Click OK to close the Alias Physical Table dialog box. The alias table is added to the
Physical layer. Note the green arrow icon.
2. Create a new column in the source table and observe the results.
a. Right-click D1_CALENDAR2 and select New Object > Physical Column. The Physical
Column dialog box opens.
b. Name the column ALIAS_COLUMN.
39
c. Leave type set to UNKNOWN and click OK. The column is added to the D1_CALENDAR2
source table.
d. Expand the ORDER_DATE alias table and verify that the column was automatically added.
Creation of a new column in a source table automatically creates the same column in all its
alias tables.
m. Click OK.
40
f.
g.
h.
i.
Click OK.
Right-click the RegionEast table and select Update Row Count.
Mouse over the table and verify that there are 56 rows.
View the data and verify that the correct rows are returned (Region column has the expected
value East).
j. Close the View Data dialog box.
4. Before deploying the select table as a view, verify that view deployment is supported for the
database.
a. Double-click the ORCL database object.
b. Click the Features tab.
c. Click Find.
d. In the Find dialog box, type CREATE_VIEW_SUPPORTED and click OK.
41
42
c. Click OK. A message appears indicating that the view was successfully deployed.
43
b. Click Yes. A message appears indicating that the view was successfully undeployed.
c. Click OK.
8. Verify that the view is undeployed on the database.
a. Return to Oracle Enterprise Manager.
b. Click Go to search for all views in the SUPPLIER2 schema.
c. Verify that no objects are found.
44
To create a business model in the Business Model and Mapping layer of the
repository
Scenario
In the previous practice, you created the physical layer of the repository. You
are now ready to begin building the business model in the Business Model and
Mapping layer of the repository. The main purpose of the business model is to
capture how users think about their business using their own vocabulary. The
business model simplifies the physical schema and maps the users business
vocabulary to physical sources. Most of the vocabulary translates into logical
columns in the business model. Collections of logical columns form logical
tables. Each logical column (and hence each logical table) can have one or
more physical objects as sources.
There are two main categories of logical tables: fact and dimension. Logical
fact tables contain the measures by which ABC gauges its business
operations and performance. Logical dimension tables contain the data used
to qualify the facts. This practice assumes that a business model has already
been designed on paper. You know what measures are important to ABC,
what ABC employees compare measures to, and how the company likes to
analyze its data. The goal of this practice is to begin to capture this information
in a business model in the Business Model and Mapping layer of the
repository.
Outcome
In the Business Model and Mapping layer, the SupplierSales business model
with Periods, Customers, Products, and SalesFacts logical tables.
Time
1520 minutes
Instructions:
The business model that ABC has defined is based on Sales, Products, Customers, and Period data.
These data elements will be used to model the initial application. The physical model you are
working with now looks like this:
45
d. Month codes, month names, and year data map to which physical source table?
46
d. Notice also that each logical table has a yellow table icon. In the Business Model and
Mapping layer, this indicates a fact table. Because you dragged each table one at a time, all
table icons are yellow. The icon color for dimension tables changes to white later when you
create logical joins.
If you had dragged all four tables simultaneously from the Physical layer onto the business
model, the logical keys and joins would have been created automatically in the business
model, because the keys and join relationships were already created in the Physical layer.
However, you typically do not drag and drop all physical tables simultaneously, except in
very simple models. In later steps, you manually build the necessary logical keys and joins in
the Business Model and Mapping layer.
5. Rename the logical tables in the business model to make them more meaningful.
a. Double-click the D1_CALENDAR2 table in the SupplierSales business model. The Logical
Table dialog box opens.
b. If necessary, click the General tab.
c. In the Name field, enter Periods.
d. Click OK.
e. Repeat the process and rename the following tables. Alternative methods for renaming
include right-clicking an object and selecting Rename or clicking twice slowly on an object
to highlight the name and make it editable. Please note that logical table names are purely a
business model artifact. They are not necessarily exposed to users.
Table
Rename to:
D1_CUSTOMER2
Customers
D1_PRODUCTS
Products
D1_ORDERS2
SalesFacts
47
CUSTKEY
DWACOSTEXTND
REPCOSTEXTND
CMDOLRS
NULL_FIELD
b. Verify that the SalesFacts table is not selected, before you click the Delete key.
c. Click the Delete key. An alternative method is to right-click one of the selected objects and
click Delete.
d. Click Yes to confirm the delete.
e. Expand the Periods table and then click the first column below. Then use CTRL+click to
select the remaining columns to be deleted.
Columns
TRUE_JULIAN_DAY_NM
DAY_SINCE_JAN_11990
WEEK_NUM_IN_YEAR
WEEKSINCE_JAN11990
NULL_DATE
CHINESE_YEAR through DAGO (including DAGO)
f.
g.
h.
i.
j.
k.
Verify that the Periods table is not selected and then click the Delete key.
Click Yes to confirm the delete.
Expand the Products table.
Right-click the PGCODE column and select Delete.
Click Yes to confirm the delete.
Expand the Customers table and delete the REPNO and FACTOR columns.
7. Rename logical columns to names that can be better understood by end users. The names you
give to logical columns in the business model can be exposed to client tools and end users.
However, it is possible to override logical column names in the Presentation layer.
48
Periods Table
Rename to:
YYYYMMDD
Day
FULL_GREGORIAN_DTE
Date
MONTH_IN_YEAR
Month in Year
DAY_IN_MONTH
Day in Month
DAY_NAME
Day Name
DAY_IN_YEAR
Day in Year
MONTH
Month
MONTHCODE
Month Code
YEAR
Year
SalesFacts Table
Rename to:
ACTLEXTND
Dollars
UNITSHPD
Units Shipped
UNITORDD
Units Ordered
NETWGHTSHPD
Customers Table
Rename to:
NEWKEY
Customer Key
NAME
Customer
ADDRESS
Address
PHONE
Phone
CITY
City
STATE
State
ZIP_CODE
Zip Code
SALESREP
Sales Rep
ROUTECODE
Route Code
DISTRICT
District
REGION
Region
Products Table
Rename to:
GENERICDESCRIPTION
Generic
SPECIFICDESCRIPTIN
Specific
SUPPLIERCODE
Supplier Code
SUBTYPECODE
Subtype Code
TYPECODE
Type Code
PACKAGE_WEIGHT
Package Weight
PACKAGECODE
Package Code
DIETCODE
Diet Code
PRODUCTKEY
ProductKey
8. In this step, you verify the logical table keys. For a business model to be valid, each logical
dimension table must have a logical key. Logical keys can be composed of one or more logical
columns. The logical key defines the lowest level (the most detailed level) of information of any
source in the logical table. In this example, the logical table keys were built automatically when
you dragged the tables from the Physical layer to the business model.
a. Double-click the Customers logical table in the business model.
b. Click the Keys tab.
c. Double-click D1_CUSTOMER2_Key.
d. Verify that the Customer Key column is defined as the key for this table.
Oracle BI Server Administrator 10g: Build Repositories
49
e. Click OK.
f. Click OK.
g. Repeat these steps and verify that the Day column is defined as the logical table key for the
Periods table, and ProductKey is defined as the logical table key for the Products table.
9. In this step, you create the logical table joins. Another requirement for a valid business model is
that the logical tables must be joined via logical joins. Without logical joins, the Administrator
Tool issues a warning that it is unable to load the navigation space for the business model.
Logical joins express the cardinality relationships between the logical tables. Logical fact tables
are always at the many end of these cardinality relationships. Logical joins help Oracle BI
Server understand the relationships between the various pieces of the business model. When a
query is sent to Oracle BI Server, the server figures out how to construct physical queries by
examining how the logical model is structured. Examining logical joins is an integral part of this
process.
a. Right-click the SupplierSales business model and select Business Model Diagram > Whole
Diagram. The Logical Table Diagram window opens.
b. Rearrange the table icons so they are all visible. Right-click the white space and adjust the
zoom factor, if desired.
c. Click the New Complex Join button (the yellow one) on the toolbar.
d. Click the Products table icon first and then click the SalesFact table icon in the Logical
Table Diagram window. The order is important. The second table clicked is the many side
of the relationship. The Logical Join dialog box opens.
e. Leave the default values as they are, but note which properties you can set in the Logical Join
dialog box: name, business model, tables, driving table, join type, and cardinality. Also note
which properties you cannot set: the join expression and the join columns.
f. Do not change the default values and click OK. Typically, when defining logical joins, you
leave the defaults as they are and simply click OK.
g. Repeat the process and create logical joins from the Periods table to the SalesFacts table and
from the Customers table to the SalesFacts table.
h. Check your work in the Logical Table Diagram window:
51
Customer, sales rep, district, and region data map to which physical source table?
D1_CUSTOMER2
2.b.
2.c.
2.d.
Month codes, month names, and year data map to which physical source table?
D1_CALENDAR2
52
Scenario
The SupplierSales business model is now defined in the Business Model and
Mapping layer. In this practice, you review the logical-to-physical table and
column mappings to better understand the relationships that exist between
logical tables and their logical table sources. You then create measures by
setting aggregation rules for logical columns. Then you verify the physical
tables referenced by the business model.
Outcome
Time
1520 minutes
Instructions:
1. In this step, you examine a logical table source (LTS). Each logical table in a business model has
a subfolder called Sources that contains the logical table sources. Logical table sources contain
the mappings from the logical columns in the BMM layer to the physical columns in the Physical
layer. Every logical column maps directly (or indirectly via another logical column) to a column
or columns in the Physical layer.
a. Expand the Sources folder of the SalesFacts logical table. What is the name of the logical
table source for the SalesFacts table?
c. Double-click the SalesFacts logical table source, D1_ORDERS2. The Logical Table Source
dialog box opens.
d. Click the General tab. By default, the logical table source name corresponds to the name of
the physical table that was dragged from the Physical layer, but this name could be changed
to something more meaningful. For this exercise, leave the name as it is. Notice also that the
path to the physical table is identified.
e. Click the Column Mapping tab. If necessary, adjust the column widths and heights, or drag
the entire dialog box window to make it larger or smaller.
53
h. The Content tab is discussed later in this course. Click Cancel to close the dialog box.
2. In this step, you create some measures by defining default aggregation rules on logical columns
defined in the SalesFacts table. Measures are typically data that is additive, such as total dollars
or total quantities. The SalesFacts logical fact table contains the measures in our business model.
You aggregate some of its logical columns by summing.
a. Double-click the Dollars logical column in the SalesFacts table. The Logical Column dialog
box opens.
b. Click the Aggregation tab.
c. Set the default aggregation rule for Dollars to Sum.
d. Click OK.
e. Select Units Shipped, and then use CTRL+click to select Units Ordered and Net Weight
Shipped.
f. Right-click and select Set Aggregation.
g. Set the default aggregation rule to Sum.
h. Click OK. Using this method allowed you to set the same aggregation rule for multiple
columns at once.
54
i. What happens to the logical column icons after you change the default aggregation rule to
Sum?
3. In this step, you check which physical tables are referenced by a business model. In most
situations, there will be tables that are included in the Physical layer that are not included in the
Business Model and Mapping layer. Only the tables referenced in the Business Model and
Mapping layer, that is, only the tables included in logical table sources, are used in queries. All
other physical tables are ignored when Oracle BI Server queries the physical database.
a. Select Tools > Options.
b. Click the General tab.
c. Select Show row count in physical view.
d. Click OK.
e. Select the SupplierSales business model.
f. Click the Physical Diagram icon on the toolbar.
g. The Physical Diagram displays all of the physical tables currently referenced by the
SupplierSales business model. It also displays the row count for any tables with updated row
counts.
h. Double-click the connector between the D1_CUSTOMER2 and the D1_ORDERS2 tables.
i. Which join type is displayed, the physical or logical?
55
56
Expand the Sources folder of the SalesFacts logical table. What is the name of the logical
table source for the SalesFacts table?
D1_ORDERS2
1.b.
1.f.
1.g.
2.d.
2.k.
What happens to the logical column icons after you change the aggregation rule to Sum?
It changes to a summation symbol.
3.i.
3.j.
57
Scenario
You have created the initial SupplierSales business model in the repository.
You now create the Presentation layer of the repository, which allows you to
expose the business model to users in Oracle BI Answers so that users can
build requests to analyze their data.
Outcome
Time
1015 minutes
Instructions:
1. In this step, you create the Presentation layer for the SupplierSales business model. The
Presentation layer has three types of objects: presentation catalog, presentation table, and
presentation column. In Oracle BI Answers, the catalog appears as a subject area, the
presentation table appears as a folder, and the presentation columns appear as columns in the
folders. The ABC repository should still be open in the Administration Tool from the previous
practice.
a. Verify that the Presentation layer is visible. If it is not visible, select View > Presentation.
b. Drag the SupplierSales business model into the Presentation layer. A presentation catalog
appears with the name SupplierSales. When you create a presentation in this manner, the
business model becomes a presentation catalog, the logical tables become presentation tables,
and the logical columns become presentation columns. Please note that all objects within a
presentation catalog must derive from a single business model.
59
b. Click the General tab. You use this tab to create or edit a presentation catalog.
c. Notice that it is possible to change the name of the catalog. For the purpose of these lessons,
leave the name as SupplierSales. This is the name that appears as a subject area in Answers.
Also, as you will see in later lessons, the name of the presentation catalog can be used in the
FROM clause of a logical SQL statement. Short catalog names are therefore desirable. The
tool prevents you from giving a presentation catalog and presentation table the same name,
and it is advisable to avoid using characters ($, %) that may cause illegal SQL syntax with
particular client tools
d. Click the Permissions button. This dialog box is used to assign user and group permissions
to this repository object. Permissions are discussed in more detail in the lesson titled
Security later in this course.
e. Click Cancel to close the Permissions dialog box.
f. The custom display name is used if you are planning to present the name in local languages.
You can ignore this for the purposes of this practice.
g. Notice that the business model is grayed out and cannot be modified. This is because all
objects within a presentation catalog derive from a single business model and cannot span
multiple business models. After the business model is set, it cannot be changed and the tool
prevents you from including objects from other business models.
h. Notice that export logical keys is deselected by default. This is irrelevant to users of
Answers, but may be advantageous to some query and reporting tools. If selected, any
columns in the Presentation layer that are key columns in the Business Model and Mapping
layer will be presented as key columns to an ODBC client and will have a key icon in the
Presentation Layer.
i. Notice that the implicit fact column is not assigned. If you set an implicit fact column, this
column is added to a query when it contains columns from two or more dimension tables and
no measures. It is used to specify a default join path between dimension tables when there are
several possible alternatives.
j. In the Description field, enter something like Analyze Sales and Shipment Data. This
information is visible under the corresponding subject area in Answers. You confirm this in
the next set of practices.
k. Click the Presentation Tables tab.
60
l. Use the Up and Down buttons or drag objects to rearrange the presentation tables into the
following order:
m. Click the Aliases tab. If you change the name of a presentation catalog, the tool
automatically creates an alias using the previous name. You can use this tab to specify or
delete and alias for a presentation folder.
n. Click OK to close the Presentation Catalog properties dialog box.
o. Expand the SupplierSales presentation catalog and notice that the order of the presentation
tables is now changed.
3. In this step, you explore the properties of a presentation table. You can use presentation tables to
hold columns from multiple logical tables, thereby reducing the number of apparent logical
tables. You can also use presentation tables to organize logical columns into smaller groupings,
thereby increasing the number of apparent logical tables. For example, you might have a hundred
measures in a logical fact table. You may want to create multiple presentation tables as
containers for those measures and thus present them in an organized way (for example, all dollar
measures in one folder; all unit measures in another folder). These measure folders could be
nested within a single folder in the Answers user interface.
a. Double-click the Customers presentation table. The Presentation Table dialog box opens.
b. Click the General tab.
c. Notice that, by default, the presentation table name is the same as the logical table name.
With Oracle BI Answers, the name can be anything, except that it should not contain single
quotation marks, double quotation marks, or the % sign. For client tools that generate SQL, it
is advisable to avoid names that might violate valid SQL syntax. For example, avoid SQL
key words, spaces, single and double quotation marks, and other characters such as $ or %. A
presentation table name cannot be the same as the presentation catalog name or any logical
column name in that catalog. Similar to a presentation catalog, changing a presentation table
Oracle BI Server Administrator 10g: Build Repositories
61
name does not have any affect on the logical table name in the Business Model and Mapping
layer. The Alias tab keeps a record of any changes.
d. Type a brief description in the Description field. This will show up as a tool tip in the
Answers UI when the user places the cursor over the object. You confirm this in the next set
of practices.
e. Click the Columns tab.
f. Change the order of the columns, using the Up and Down buttons or by dragging, into the
following order:
Columns
Region
District
Sales Rep
Customer
Address
Phone
City
State
Zip Code
Route Code
Customer Key
63
f. Position the Facts presentation table directly above the SalesFacts presentation table.
7. In this step, you use the duplicate feature to create a new presentation catalog in the Presentation
layer. This new presentation catalog is for ABCs District Managers. District Managers analyze
64
information required to manage their sales district, such as sales dollars and sales reps. District
managers do not need to analyze any information related to ABCs products.
a. Right-click the SupplierSales presentation catalog and select Duplicate. A presentation
catalog folder appears with the name SupplierSales#1.
b. Expand SupplierSales#1 and notice that it contains all of the same objects as the
SupplierSales presentation catalog.
c. Rename the SupplierSales#1 presentation catalog to SupplierSalesDM.
d. Since ABCs district managers do not need to analyze the SupplierSales product information
in their view of the data, delete the Products presentation table from the SupplierSalesDM
presentation catalog.
e. Click Yes to confirm the deletion.
8. Save the repository.
9. Click No when prompted to check global consistency.
10. Leave the repository open for the next practice.
Congratulations! You have successfully built the Presentation layer of a repository.
65
Select the Aliases tab. What is the logical column name (or alias) for this presentation
column?
District
4.k.
4.l.
4.m.
4.o.
Which physical table and column does this presentation column map to?
D1_CUSTOMER2.DISTRICT
66
To test the repository by generating some queries, retrieving the results, and
examining the query log
Scenario
You have finished building the initial business model and now need to test the
repository before continuing your development. You begin by checking the
repository for errors using the consistency checking option. You then test the
repository by running queries using Oracle BI Answers. Finally, you examine
the query log file to verify the SQL generated by Oracle BI Server.
Outcome
Time
2535 minutes
Instructions:
1. In this step, you perform a consistency test to check the repository for inconsistencies. A
consistent repository has met the following requirements:
All logical columns are mapped directly or indirectly to one or more physical columns.
All logical dimension tables have a logical key.
All logical tables have a logical join relationship to another logical table.
There are at least two logical tables in the business model: one is a logical fact table, the
other is logical dimension table; and both tables may map to the same physical table.
There are no circular logical join relationships
A presentation catalog exists for the business model
a. Select File > Check Global Consistency. A message appears indicating that the SupplierSales
business model is consistent and asking if you want to make it unavailable for queries.
b. Click Yes. The Consistency Check Manager opens and displays a Warning message: The
user Administrator belongs to the Administrators Group and has an empty password.
67
68
g. Click Check All Objects. The Consistency Check Manager appears with no messages
displayed, indicating that the repository is consistent.
h. Close the Consistency Check Manager. The SupplierSales business model folder has changed
to available for queries .
from unavailable for queries
i. Save the repository.
j. Click No when prompted to check global consistency because you just checked consistency.
3. In this step, you enable query logging for the Administrator user. To test the repository, you need
to generate some queries, retrieve the results, and examine the query log. You log query activity
at the individual user level. Logging is intended for testing, debugging, and technical support. In
production mode, logging is normally disabled because query logging can impact performance
by producing very large log files.
a. Select Manage > Security.
b. In the left pane, select Users. The Administrator user appears in the right pane.
c. In the right pane, double-click Administrator. The User dialog box opens.
d. Verify that the User tab is selected.
e. In the Logging level field, set the value to 2.
f. Click OK.
g. Select Action > Close to close the Security Manager window. More security-related topics
are addressed in the lesson titled Security.
h. Save the repository.
i. Click No when prompted to check consistency.
j. Select File > Close to close the repository.
k. Select File > Exit to exit the Server Administrator.
4. In this step, you update the Repository and Cache sections of the initialization file,
NQSConfig.ini. An entry in the Repository section of the initialization file instructs Oracle BI
Server to load a specific repository into memory upon startup. If Oracle BI Server detects a
syntax error while loading the repository, it logs the error to the server log file
Oracle BI Server Administrator 10g: Build Repositories
69
70
The log file can contain messages indicating why the server startup failed. For example, if
there were a syntax error in the NQSConfig.INI file, the NQServer.log file would contain
messages about the syntax error. After examining the log messages, if errors were detected,
you would correct the problem and start the server again.
e. Close the NQServer.log file.
7. Start Oracle BI Answers.
a. Verify that the Oracle BI Server and Oracle BI Presentation Server services are started.
b. Select Start > Programs > Oracle Business Intelligence > Presentation Services.
c. Log in as Administrator, no password.
d. Click the Answers link.
e. Verify that the description you entered for the SupplierSales presentation catalog appears
under the SupplierSales subject area. Recall that presentation catalogs appear as subject areas
in Answers.
8. Execute queries to test the SupplierSales business model. In this step, you create a request
showing the dollars for each sales rep in the MidAtlantic district in the year 1999.
a. Click the SupplierSales subject area.
b. Move the mouse over the Customers folder and verify that the description you entered in an
earlier practice appears as a tool tip.
c. Expand the Facts folder and verify that SalesFacts is nested under the Facts folder.
71
d. Expand the Customers table and click the Sales Rep and Sales District columns to add the
columns to the request.
e. Expand the SalesFacts table and click the Dollars column to add it to the request.
g.
h.
i.
j.
k.
l.
m.
In the Column Properties dialog box, click the Data Format tab.
Click Override Default Data Format.
In the Treat Number As field, select Currency.
In the Currency Symbol field, select $.
In the Decimal Places field, select 2.
Check Use 1000s Separator.
Check your work:
72
v. Click the Remove Column icon for the Sales District column so that this column will not
be displayed in the request results.
w. Your request now includes two columns:
x. Click the Results tab to view the results. Verify that the Dollars column is formatted as
expected.
y. Which Sales Rep in the MidAtlantic sales district produced the highest revenue (dollars) in
1999?
9. In this step, you create a request showing the dollars for each sales district in the East region for
the year 1999.
a. Click the Create a new request icon and select the SupplierSales subject area.
b. Create the following request:
73
d. Use Ctrl+click to add the following filters for Year and Region:
e. Click Results.
f. Which sales district in the East region had the highest revenue (dollars) in 1999?
d. Locate the SQL Request section. This section contains the logical SQL issued from
Answers.
e. Which presentation table is Sales District information coming from?
74
i. Locate the General Query Info section, just below the SQL Request section. This section
identifies the repository, subject area, and presentation catalog from which the query was run.
j. Which repository (logical name) was accessed for this query?
m. Locate the Sending query to database named ORCL section, just below the General Query
Info section. This section identifies the physical data source to which Oracle BI Server is
connecting.
n. Which physical tables were accessed for this query?
q. Which logical column maps to the physical column with the aggregation rule?
75
v.
w.
x.
y.
Congratulations! You have successfully used the Consistency Check Manager, Oracle BI
Answers, and the query log to test and verify the repository.
76
Which Sales Rep in the MidAtlantic sales district produced the highest revenue (dollars) in
1999?
Paula Madison
9.f.
Which sales district in the East region had the highest revenue (dollars) in 1999?
Yankee
10.e.
10.f.
10.g.
10.h.
10.i.
10.k.
10.l.
10.n.
10.o.
10.p.
10.q.
Which logical column maps to the physical column with the aggregation rule?
SalesFact.Dollars
77
10.r.
10.s.
10.t.
10.u.
78
Scenario
You have successfully tested the business model and made it available for
querying by end users. In this practice, you modify your business model to
generate an inconsistent business model, to further understand the
requirements for troubleshooting and correcting an inconsistent business
model.
Time
1015 minutes
Instructions:
1. Before modifying the repository, stop the Oracle BI Server service.
a. Double-click the Services icon on your desktop.
b. Right-click Oracle BI Server and select Stop.
c. Verify that Oracle BI Server stopped by checking that the Status column displays no value.
d. Minimize the Services window.
2. Make a copy of the ABC.rpd file.
a. Navigate to E:\OracleBI\server\Repository.
b. Right-click ABC.rpd and select Copy.
c. Right-click anywhere in the right pane and select Paste.
d. Rename the copied file ABC_CHECK.rpd.
3. Open the ABC_CHECK repository in offline mode.
a. Double-click ABC_CHECK.rpd to open the repository file.
b. Log in as Administrator, no password.
c. In the title bar, verify that you have opened ABC_CHECK.rpd.
4. Modify the business model to generate an inconsistent business model due to a missing logical
join.
a. In the Business Model and Mapping layer, right-click SupplierSales and select Business
Model Diagram > Whole Diagram.
b. Select the join connection between the Periods and SalesFacts logical tables.
c. Right-click and select Delete to create a condition in the business model where an undefined
join condition exists.
d. Click Yes to confirm the delete.
e. Close the Logical Table Diagram window.
Oracle BI Server Administrator 10g: Build Repositories
79
f. In the Business Model and Mapping layer, right-click SupplierSales and select Check
Consistency. The Consistency Check Manager appears and displays an error message for the
SupplierSales business model. The error description explains that Oracle BI Server could not
load the navigation space for the subject area SupplierSales because the logical table,
Periods, does not join to any other logical table.
g. Click Close.
h. Use the Business Model Diagram to repair the logical join. Recall that you need to create a
complex join, not a foreign key join.
i. Check consistency and verify that the business model is consistent again.
5. Modify the business model to generate an inconsistent business model due to the fact that a
logical column is not mapped to a physical column.
a. Expand the SupplierSales business model.
b. Expand the Customers table and its corresponding Sources folder.
c. Double-click the D1_CUSTOMER2 logical table source.
d. Click the Column Mapping tab.
e. Verify that both Show mapped columns and Show unmapped columns are selected.
f. To which physical table and physical column is the Customer logical column mapped?
80
e.
f.
g.
h.
i.
81
i. Why dont you see the error message relating to SupplierSalesDM having leading or trailing
spaces in it?
83
To which physical table and physical column is the Customer logical column mapped?
table = D1_CUSTOMER2, column = NAME
6.d.
7.i.
Why dont you see the error message relating to SupplierSalesDM having leading or
trailing spaces in it?
The consistency check from the Business Model and Mapping layer checks only for errors
associated with the subject area that you have selected, such as finding logical columns
that are not mapped to physical sources, checking for undefined logical join conditions,
and determining if physical tables referenced in a business model are not joined to tables
referenced in the business model. Global consistency checks verify the entire repository.
84
To import normalized tables that contain additional product information into the
Physical layer of the repository
Scenario
There are product tables that store detail information about ABCs products.
You want to add these tables to the Product dimension in the Business Model
and Mapping layer. You import these tables into the repository and create
keys and foreign key joins for the tables.
Outcome
Time
510 minutes
Instructions
1. Verify that Oracle BI Server is stopped.
a. Open the Services window.
b. Locate Oracle BI Server and verify that it is stopped and the Status field has no value.
c. Minimize Services.
2. Start the Server Administrator and open the ABC.rpd repository in offline mode.
a. Select Start > Programs > Oracle Business Intelligence > Administration.
b. Select File > Open > Offline.
c. Double-click ABC.rpd.
d. Verify that User is Administrator and that the Password field is blank.
e. Click OK.
3. In this step, you import additional product tables that store product code, pricing, and supplier
information. The product dimension is an example where information has been stored physically
in a normalized table structure. Data warehouse design writers such as Ralph Kimball refer to
this as snowflaking a dimension. Many database administrators regard this as good database
design, so this is a very common practice. Thus far, you have only included the information in
the root product table in the logical subject area. After import, you can include information from
the other product tables.
a. Select File > Import > From Database.
b. Select the ORCL data source.
c. Verify that SUPPLIER2 is the user name and enter SUPPLIER2 as the password.
d. Click OK. The Import dialog box opens. This may take a few moments.
Oracle BI Server Administrator 10g: Build Repositories
85
g.
h.
i.
j.
Verify that the Tables and Keys check boxes are selected.
Click Import. Wait for the import process to complete.
Click Close to close the Import dialog box.
Verify that the tables were imported into the Physical layer.
86
87
To add the information from the price list table to the Product dimension
Scenario
You have imported the product tables that store detail information about ABCs
products into the Physical layer of the repository and configured keys and joins
for the tables. Thus far, the Product dimension in the Business Model and
Mapping layer includes only information from the root product table:
D1_PRODUCTS. You are ready to add the information from the price list table
to the Product dimension, and while doing that, simplify the data structure (in
effect, creating a denormalized logical table).
Outcome
In the Business Model and Mapping layer, the D1_PRICELIST physical table
is added to the existing logical table source for the Product dimension and the
Price logical column is added to the Product dimension and mapped to the
appropriate physical table.
Time
5 minutes
Instructions:
1. In this step, you add the information from the price list table to the existing logical table source
for the Product dimension. There are two methods to add multiple sources for an existing logical
table source. In this practice, you use the Properties window of an existing logical table source,
which is a manual process and requires several steps. In the next practice, you use a more
automated process.
a. In the Business Model and Mapping layer, expand the Products logical table and then the
Sources folder, and then double-click the D1_PRODUCTS logical table source to view the
properties.
b. Click the General tab and click Add. The Browse window automatically includes those
tables that are joined directly to the table already in the logical table source. In this case, it
includes all tables that join to D1_PRODUCTS. Only tables that join to tables included in the
logical source can be added to the logical source. Said another way, if tables do not have a
join relationship in the Physical layer to tables included in the logical source, they cannot be
added to the logical table source.
88
e. In the Browse window, select the D1_PRICELIST table and click the Select button. The
table is added to the logical table source and the join is displayed in the Joins section on the
General tab.
f.
g.
h.
i.
Select the join in the Joins section. The View Details button becomes active.
Click View Details to open the join dialog box and view the read-only details of the join.
Click Cancel to close the join dialog box.
To change a join to an outer join, you could use the drop-down list in the Type column. This
allows you to change the join type from inner to three kinds of outer joins. For the purpose of
these practices, leave the type as Inner. You can think of the tables in a logical dimension
table source as being like a database view. When it formulates physical SQL, Oracle BI
Server will leave out the tables in this view that are not needed to satisfy the logical query
Oracle BI Server Administrator 10g: Build Repositories
89
(join elimination), but only if the join type is Inner. When the join type is Outer, however,
Oracle BI Server will always include the tables.
j. Click OK to close the Logical Table Source dialog box.
2. In this step, you create a new logical column based on the new logical table source. Using the
manual method in the previous step to add a physical table to a logical table source does not
automatically add logical columns to the logical table, nor does it change the logical to physical
mapping of any existing columns. Now that the physical table that stores the pricing information
has been added to the Product logical table source, you create a new logical column and map it to
the appropriate physical table.
a. In the Business Model and Mapping layer, right-click the Products table and select New
Object > Logical Column.
b. Enter Price in the Name field and click OK.
c. Double-click the D1_PRODUCTS logical table source to open its properties dialog box.
d. Click the Column Mapping tab.
e. If necessary, select the Show unmapped columns check box. Notice that the column you
just created, Price, is not mapped to any physical column.
f. In the Logical Column section, click the ellipsis () button next to Price to open the
Expression Builder.
g. In the lower-left pane of the Expression Builder, click the Physical Tables folder.
h. In the center pane, click D1_PRICELIST.
i. In the right pane, click PRICE.
j. Select Insert and examine the expression.
k. Click OK to close the Expression Builder.
90
l. Verify that Show Mapped Columns is selected, and that the Price logical column is now
mapped to the PRICE physical column in the D1_PRICELIST physical table.
91
1.d.
92
To add the information from the additional product tables to the Product
dimension
Scenario
You have manually added information from the price list table to the Product
dimension. You are ready to add information from the other product tables to
the Product dimension using an alternate method. You create multiple sources
for the Product logical table source and simultaneously add the columns to the
Product dimension.
Outcome
Time
510 minutes
Instructions:
1. In this step, you use a second method to add additional information to the Product dimension and
simultaneously add a new source to the existing D1_PRODUCTS logical table source.
a. In the Physical layer, expand the D1_PROD_DIET_TYPES table and select the
DIET_TYPE column.
b. In the Physical layer, drag the DIET_TYPE column onto the D1_PRODUCTS logical table
source in the Products dimension in the Business Model and Mapping layer.
c. Verify that the DIET_TYPE column is added to the Products logical table.
d. Double-click the D1_PRODUCTS logical table source to view its properties.
e. Click the Column Mapping tab.
f. To which physical column and physical table is the DIET_TYPE logical column mapped?
93
2. Repeat the steps above to add more product information to the Products dimension,
simultaneously adding new sources to the existing D1_PRODUCTS logical table source.
a. Drag the following columns from the Physical layer to the D1_PRODUCTS logical table
source:
Physical Table
Physical Column
D1_PRODUCT_SUBTYPE ITEMSUBTYPE
D1_PRODUCT_TYPE
ITEMTYPE
D1_SUPPLIERS
ITEMSUPPLIER
b. Open the D1_PRODUCTS logical table source properties dialog box and click the Column
Mapping tab to verify your results.
c. Which new table sources are added to the D1_PRODUCTS logical table source? It may be
necessary to scroll to the right.
To
ITEMSUBTYPE
Subtype
ITEMTYPE
Type
ITEMSUPPLIER
Supplier
5. Select File > Check Global Consistency to validate your work. If you receive any error
messages, fix them before proceeding.
94
12. Examine the query log to determine which table or tables have been accessed for this simple
query.
a. Select Settings > Administration > Manage Sessions.
Oracle BI Server Administrator 10g: Build Repositories
95
b. Click View Log for the last entry in the Cursor Cache section.
c. Verify that three tables: D1_PRODUCTS, D1_PRODUCT_SUBTYPE, and
D1_PRODUCT_TYPE, have all been accessed, despite the fact that the
D1_PRODUCT_TYPE table alone contains all the data requested. The log should look
similar to the picture.
e. Close the query log. In the next practice, you specify a more economical way for Oracle BI
Server to access this data.
13. Log out of Oracle BI.
96
To which physical column and physical table is the DIET_TYPE logical column mapped?
D1_PROD_DIET_TYPES.DIET_TYPE
2.c.
Which new table sources are added to the D1_PRODUCTS logical table source? It may be
necessary to scroll to the right.
D1_PRODUCT_SUBTYPE, D1_PRODUCT_TYPE, and D1_SUPPLIERS
12.c.
97
Scenario
In examining the physical sources and the Products dimension table, you
discover that the columns, Type Code and Type, are mapped to different
physical tables, while the information for both is stored in a common physical
table.
In order to model the most economical method for Oracle BI Server to find
information for these two columns, you decide to add a second logical table
source to the Product dimension so that Oracle BI Server queries only one
table for the Type Code and Type information.
Outcome
In the Business Model and Mapping layer, Type is added as second logical
table source for the Products logical table.
Time
5 minutes
Instructions:
1. Open the ABC repository file in offline mode.
a. Stop the Oracle BI Server service.
b. Navigate to E:\OracleBI\server\Repository.
c. Double-click ABC.rpd.
d. Log in as Administrator with no password.
2. Examine the existing column mappings for the two columns, Type and Type Code, to determine
the most economical method for Oracle BI Server to find information.
a. In the Business Model and Mapping layer, expand the Sources folder of the Products table
and double-click D1_PRODUCTS.
b. Click the Column Mapping tab.
c. To what physical table and physical column is Type Code mapped?
b. Verify that this table stores the information for ITEMTYPE and TYPECODE.
4. Model a new mapping for the Type Code logical column by creating a second logical table
source for the Products dimension.
a. In the Business Model and Mapping layer, right-click the Products table and select New
Object > Logical Table Source.
b. Verify that the General tab is selected.
c. In the Name field, enter Type to name the new logical table source.
d. Click Add.
e. In the Browse dialog box, double-click the D1_PRODUCT_TYPE physical table to select
it.
f. Click OK to close the Logical Table Source properties dialog box. Notice that the new
logical table source, Type, is added to the Sources folder.
99
table source.
n. Click OK to close the Logical Table Source properties dialog box. There are now two logical
table sources for the Products dimension and the Type Code logical column maps to both the
D1_PRODUCT_TYPE and D1_PRODUCTS tables. In a later practice, you let Oracle BI
Server know which source to use by specifying the aggregation content for the Type logical
table source.
o. Select File > Check Global Consistency to validate your work. If you receive any error
messages, fix the errors before proceeding.
p. If the repository is consistent, save and close the repository.
q. Select File > Exit to close the Administration Tool.
100
2.d.
101
Scenario
You want users to be able to track the difference between the units ordered
and units shipped by selecting a single fact column called Cuts. This important
business measure can potentially help track lost revenue. You use the
Expression Builder to configure a formula for Cuts using existing logical
columns as objects in the formula.
Outcome
In the Business Model and Mapping layer, the Cuts logical column is added to
the SalesFacts logical table.
In the Presentation layer, the Cuts presentation column is added to the
SalesFacts presentation table.
Time
1015 minutes
Instructions:
1. Because you modify the ABC repository in online mode in this practice, verify that the Oracle
BI Server service is started.
2. In this step, you start the Administration Tool and open the ABC repository in online mode. So
far, all the changes you have made to the repository have been in offline mode. Now that you
have a consistent repository and Oracle BI Server is running and using it, you can make changes
to the metadata in online mode.
Offline, the relationship between the Administration Tool and the repository is like the
relationship between any Windows application and a file: an application, the Administration
Tool in this case, opens a file for editing, makes changes to its in-memory copy, and tells the OS
to save the changed file.
In online mode, the relationship is different. Oracle BI Server has already opened the repository
file and the operating system has put a write-lock on the file. In this mode, Oracle BI Server can
act as an agent of the Administration Tool. When the Administration Tool tells it to, Oracle BI
Server sends the Administration Tool a copy of its in-memory repository. Then it listens for
messages from the Administration Tool about changes, makes those changes to its in-memory
copy, and, when told by the Administration Tool, tells the OS to save the changed file.
When you start the Administration Tool in online mode, you pick an Oracle BI ODBC DSN that
points to the repository you want to edit (the repository that is the default repository in the DSN).
Oracle BI Server Administrator 10g: Build Repositories
103
The Administration Tool then communicates changes to Oracle BI Server and Oracle BI Server
makes the corresponding changes to its in-memory copy.
a. Select Start > Programs > Oracle Business Intelligence > Administration.
b. Select File > Open > Online.
c. In the Open Online Analytics Web dialog box, log in as Administrator, no password.
d. Verify that the title bar displays (Online) indicating you are in online mode.
3. In this step, you set a user preference to check out objects automatically. Because Oracle BI
Server may be processing queries while you are editing the repository, you must check out
objects before editing them. After the objects have been edited, you check them in again. At that
point the changes you made become active. When you are finished editing, you can save the
changes to the repository.
a. Select Tools > Options.
b. Select the General tab.
c. Make sure that Check out objects automatically is selected.
d. Click OK.
4. In this step, you define a new logical measure called Cuts (the difference between what was
ordered and what was shipped) in the SalesFacts logical table, using existing logical columns to
define the calculation formula.
a. In the Business Model and Mapping layer, right-click the SalesFacts logical table and select
New Object > Logical Column.
b. Verify that the General tab is selected.
c. Enter Cuts in the Name field to name the column.
d. Select the Use existing logical columns as the source check box.
e. To open the Expression Builder, click the Ellipsis
button (to the right of the text edit
box).
f. In the left pane of the Expression Builder, select the Logical Tables folder.
g. In the middle pane, select the SalesFacts logical table.
h. In the Search field under the right pane, type the letter U. This narrows the list of objects in
the pick list. This is a useful feature in large repositories.
i. In the right pane, select the Units Ordered logical column.
j. Click Insert.
k. Click the minus sign on the toolbar.
l. In the right pane, double-click the Units Shipped logical column to insert it in the formula.
104
n. Click OK to close the Expression Builder. Notice the expression is now displayed in the
Logical Column dialog box.
o. Select the Data Type tab. The data type of logical columns derives from the data types of the
underlying physical columns. The Administration Tool examines the data types of the
physical sources and selects the most inclusive data type for the logical column. Data types
may be changed by the formula you create. For example, consider a logical column that is
defined as ColumnA * ColumnB. If ColumnA and ColumnB are integers, then the product of
those two columns is also an integer. If the formula were 1.0 * ColumnA * ColumnB instead,
the resulting data type would be a Double. The data type transformation happens in left to
right order within the normal order of operations. If the data were from SQL Server (which
has an Integer data type) and both UNITORDD and UNITSHPD were integers, Cuts would
have an INT data type instead of DOUBLE. Notice also that the formula is expressed in
terms of the physical column data types and that is also includes the aggregation functions
(sum).
p. Click OK. Notice that the icon for Cuts is blue and that all other logical columns in the
SalesFacts logical table have a check mark. This indicates that the logical columns have not
yet been checked in to the server.
5. Add the new Cuts column to the SupplierSales presentation catalog.
a. In the Presentation layer, verify that the SupplierSales presentation catalog is expanded.
Oracle BI Server Administrator 10g: Build Repositories
105
b. Select Cuts from the SalesFacts logical table and drag it onto the SalesFacts presentation
table.
6. Select File > Check In Changes or click the Check In Changes button on the toolbar.
7. Click Yes to check global consistency. Fix any errors before proceeding.
8. If the repository passes the consistency check, close the Consistency Check Manager
9. Save the repository.
10. Verify your work.
a. Log in to Oracle BI Presentation Services as Administrator, no password.
b. Click the Answers link and the SupplierSales subject area.
c. Click Reload Server Metadata.
d. Create the following request:
f. Verify that the Cuts calculation is accurate for the Frozen food type by manually subtracting
Units Shipped from Units Ordered.
106
g. Is the value in the Cuts column for the Frozen food type accurate?
h. Verify that the Cuts calculation is accurate for the Lamb food type by manually subtracting
Units Shipped from Units Ordered.
i. Is the value in the Cuts column for the Lamb food type accurate?
c. Note that the difference between units ordered and units shipped is being calculated in the
outer query block (D1.c1 - D1.c2 as c4 in the example pictured here). Because you defined
Oracle BI Server Administrator 10g: Build Repositories
107
the Cuts calculation using logical columns, the columns are summed first and then the
difference is calculated. You compare these results to the query results in the next practice.
d. Close the query log.
e. Leave Answers open.
f. What would happen if you deleted a logical column that is used to define the formula of
another logical column? The derived column would not be deleted automatically. However,
the tool would display an icon that warns you about this condition. Dont do this! This is
just for informational purposes.
108
Is the value in the Cuts column for the Frozen food type accurate?
Yes, 0 is the correct value.
10.i.
Is the value in the Cuts column for the Lamb food type accurate?
Yes, 39 is the correct value.
109
Scenario
You want users to be able to track the difference between the units ordered
and units shipped by selecting a single fact column called CutsP. In the
previous practice, you used logical columns to create the calculation. In this
practice, you use the Expression Builder again to configure a formula for
CutsP using physical columns as objects in the formula.
Outcome
In the Business Model and Mapping layer, CutsP is added to the SalesFacts
logical table.
In the Presentation layer, CutsP is added to the SalesFacts presentation table.
Time
1015 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. Configure a new logical column in the SalesFacts logical table that uses physical columns in its
formula.
a. In the Business Model layer, right-click the SalesFacts table and select New Object >
Logical Column.
b. Type CutsP in the Name field to name the column.
c. Select the Aggregation tab.
d. In the Default aggregation rule field, select Sum.
e. Click OK.
3. Map the new CutsP column to a physical source.
a. In the Business Model and Mapping layer, expand the Sources folder for the SalesFacts table
and double-click D1_ORDERS2.
b. Select the Column Mapping tab.
c. If necessary, select the Show unmapped columns check box to display the CutsP logical
column.
d. To open the Expression Builder, click the Expression Builder button (. . .) next to CutsP.
e. In the left pane of the Expression Builder, select the Physical Tables folder.
f. In the middle pane, select the table, D1_ORDERS2.
110
g. Following the process used in the previous practice, create a formula that subtracts units
shipped from units ordered using physical columns. Check your results:
111
c. Verify that the CutsP calculation is accurate for the Frozen food type by manually subtracting
Units Shipped from Units Ordered. Is the value in the CutsP column accurate?
d. Verify that the CutsP calculation is accurate for the Lamb food type by manually subtracting
Units Shipped from Units Ordered. Is the value in the CutsP column accurate?
8. Examine the query log to see what query was sent to the database:
112
a. Open the query log. You should see results similar to the following:
c. Note also that the difference between units ordered and units shipped is calculated first and
then summed (sum(T285.UNITORDD - T285.UNITSHPD) as c4 in the example pictured
here). Compare these results to the query results in the previous practice
d. Close the query log.
e. Leave Answers open.
f. What are the advantages and disadvantages of defining a logical column in terms of other
logical columns, rather than in terms of the physical sources directly? The advantage of
defining a logical column formula based on existing logical columns is that you only have to
define it once. When you create formulas based on physical columns, you have to map for
each physical source it could be derived from. Sometimes, you have no choice, however, if
you have to use physical columns to apply an aggregation rule after a calculation.
113
Verify that the CutsP calculation is accurate for the Frozen food type by manually
subtracting Units Shipped from Units Ordered. Is the value in the CutsP column accurate?
Yes, 0 is the correct value.
7.d.
Verify that the CutsP calculation is accurate for the Lamb food type by manually
subtracting Units Shipped from Units Ordered. Is the value in the CutsP column accurate?
Yes, 39 is the correct value.
114
Scenario
You want to model two calculation measures using the Calculation Wizard,
called Change Units Shipped and Percent Change Units Shipped. The
Change Units Shipped measure calculates the difference between the units
ordered and units shipped. The Percent Change Units Shipped measure
calculates what percentage of the units ordered has not shipped. The
calculation measures that are created by the wizard are based on existing
logical columns. You rename these columns to CutsW and Percent Not
Shipped in the Presentation layer.
Outcome
In the Business Model and Mapping layer, Change Units Shipped and Percent
Change Units Shipped are added to the SalesFacts logical table.
In the Presentation layer, CutsW and Percent Not Shipped are added to the
SalesFacts presentation table.
Time
1015 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. In this step, you model two calculation measures using the Calculation Wizard.
a. In the Business Model and Mapping layer, expand the SalesFacts table
b. Right-click the Units Ordered column and select Calculation Wizard.
c. In the Calculation Wizard Introduction dialog box, click Next.
d. In the Choose columns pane, SalesFacts is selected. The columns appear in the right pane.
e. Select the Units Shipped check box.
f. Click Next.
g. In the Generate Calculations section, verify that the Change and Percent Change check
boxes are both selected.
h. In the Generate Calculations section, verify that Change is highlighted.
115
n.
o.
p.
q.
116
t. Drag the new CutsW and Percent Not Shipped logical columns from the SalesFacts logical
table onto the SalesFacts presentation table in the SupplierSales presentation catalog in the
Presentation layer.
3. Check in changes.
4. Check global consistency.
5. If the repository is consistent, close the Consistency Check Manager. If not, fix any errors before
proceeding.
6. Save the repository.
7. Return to Answers.
8. Reload Server Metadata.
9. Create the following request:
117
118
12. Verify that the CutsW calculation is accurate for the Frozen food type by manually subtracting
Units Shipped from Units Ordered. Is the value in the CutsW column accurate?
13. Verify that the CutsW calculation is accurate for the Lamb food type by manually subtracting
Units Shipped from Units Ordered. Is the value in the CutsW column accurate?
14. To verify that the Percent Not Shipped value is accurate, you would divide CutsW by Units
Shipped. For example, for the Lamb food type, you would divide 39 by 961 to get 4.06. This
tells you that 4.06% of the units ordered have not shipped.
15. Examine the query log to see what query was sent to the database. Your query results should
look similar to the following:
a. Note that the CutsW and Percent Not Shipped columns are listed in the logical query.
119
b. Notice also that the parameters you specified for NULL values are included.
120
Verify that the CutsW calculation is accurate for the Frozen food type by manually
subtracting Units Shipped from Units Ordered. Is the value in the CutsW column accurate?
Yes, 0 is the correct value.
13.
Verify that the CutsW calculation is accurate for the Lamb food type by manually
subtracting Units Shipped from Units Ordered. Is the value in the CutsW column accurate?
Yes, 39 is the correct value.
121
Scenario
Dimensions are metadata objects that allow you to introduce hierarchies into a
business model. The dimensions and hierarchies remain hidden to users, but
they enable Oracle BI Server to provide useful calculations. You need to
implement three dimensions for ABC: Product, Customer, and Period.
Creating dimensions and hierarchies allows you to build level-based
measures, to define aggregation rules that vary by dimension, to provide drilldown on charts and tables in Answers and dashboards, and to describe the
content of aggregate sources.
Outcome
Time
2025 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. In order to create a dimension hierarchy, you need to know the levels in the hierarchy, the
columns that uniquely define each level, and the distinct values for each level. In this step, you
identify these for the product dimension.
a. The business requirements determine the levels. In the case of the product hierarchy for
ABC, the levels are (top to bottom): Type, Subtype, Generic, and Specific.
b. Typically, a database administrator provides you the columns that define each level. In
ABCs case, the columns are:
Level
Type
TYPECODE
Subtype
SUBTYPECODE
Generic
GENERICDESCRIPTION
Specific
SPECIFICDESCRIPTIN
123
Level
Subtype
SUBTYPECODE
158
Generic
GENERICDESCRIPTION
185
Specific
191
3. In this step, you create a dimension object to represent the hierarchy of products.
a. In the Business Model and Mapping layer, right-click SupplierSales and select New Object
> Dimension. The Dimension dialog box opens.
b. In the Name field, enter ProductsDim.
c. Click OK. The new dimension appears in the Business Model and Mapping layer. Notice the
three-arrow icon.
4. In this step, you add the parent level of the hierarchy.
a. Right-click the ProductsDim dimension and select New Object > Logical Level.
b. In the Name field, type TotalProduct.
c. Because this level represents the grand total for products, select the Grand total level check
box. Notice that when you do this, the field Supports rollup to higher level of aggregation
is grayed out and protected.
d. Notice that the field Number of elements at this level has the value of 1. The TotalProduct
level has only one element (the grand total). Therefore, 1 is the appropriate value for this
level and cannot be changed.
e. Click OK. The new level appears as a child of the ProductsDim dimension.
5. Add the child levels of the hierarchy.
a. Right-click the TotalProduct level and select New Object > Child Level.
b. Name the child level Type.
c. In the Number of elements at this level field, enter 21. Recall that this is the value you
determined above. This number does not have to be exact. The ratio from one level to the
next is more important than the absolute number. These numbers only affect which aggregate
source is used (optimization, not correctness of queries).
d. Verify that Supports rollup to higher level of aggregation is selected. This field is selected
because if data is stored at the Type level, it can be aggregated to produce the total for its
parent level without double counting or leaving anything out. There are some hierarchies
where certain levels might not include all the elements of the dimension.
e. Click OK. The Type level appears as a child of the TotalProduct level.
f. Repeat the above steps to add further child levels:
Name
Subtype
158
Generic
185
Specific
191
124
6. In this step, you specify which columns from the logical dimension table are associated with
which levels in the dimension hierarchy, starting from top to bottom. Here are some guidelines
for associating columns with levels:
Not all columns in the dimension table need to be associated explicitly with a level; the
ones that arent will be associated with the lowest level implicitly.
No columns can be associated with more than one level (although it may be part of the
level key of a lower level).
If a column pertains to more than one level, associate it with the highest level it belongs
to.
No level except the Grand Total level can exist without at least one column being
associated with it.
The Detail level (lowest level) must have the column that is logical key of the dimension
table associated with it and it must be the key for that level.
a. In the Business Model and Mapping layer, expand the Products table, select the Type
column, and drag it up onto the Type level.
b. Drag the logical column Type Code onto the Type level. Check your results:
c. Continue dragging logical columns from the Products table to the ProductsDim levels:
Logical Column
Level
Subtype
Subtype
SubtypeCode
Subtype
Generic
Generic
Specific
Specific
ProductKey
Specific
125
e.
f.
g.
h.
Any column not associated explicitly with a level is associated implicitly with the detail
level. In this example, Package Weight and Supplier (among others) are by default associated
with the Specific level. The logical dimension table key column, ProductKey in this example,
must be associated explicitly with the lowest level.
Double-click the Type column in the Products logical table. The Logical Column properties
dialog box opens.
Click the Levels tab. This tab identifies the dimensions and logical levels associated with this
logical column. These values were set when you dragged the column into the ProductsDim
dimension hierarchy.
Click the drop-down list for the Type logical level. Note that this is another method for
associating logical columns with dimensions and logical levels. You use this method later in
the next practice. Leave the logical level set to Type.
Click Cancel to closes the Logical Column dialog box.
7. In this step, you specify the level keys for the Type level in the hierarchy. The level key defines
the unique elements in each logical level. Each level key can consist of one or more columns at
this level (or may include columns at a higher level). When you pick a column to represent a
level key, you are saying that the values of all columns associated with the level are dependent
on the value of the level key column. If you know the value of the level key column, you can
determine the values of the other columns.
a. In ProductsDim, double-click the Type level. The Logical Level properties dialog box opens.
b. Select the Keys tab.
c. Click the New button. The Logical Level Key dialog box opens.
d. Select the check box for Type.
e. Verify that the check box Use for drilldown is selected (Use for drilldown is explained in
the next step).
f. Click OK. The attribute displays a key icon.
g. Click the New button again.
h. Select the Type Code check box.
i. Deselect the Use for drilldown check box.
j. Click OK.
126
k. Click OK.
l. Both level columns now display with key icons.
8. In this step, you set the level keys for the Subtype level using a different method.
a. In ProductsDim, right-click the Subtype column (not the level) and select New Logical
Level Key.
b. Verify that the Subtype check box is selected.
c. Verify that the Use for drilldown check box is selected.
d. Click OK.
e. Right-click the Subtype Code column and select New Logical Level Key.
f. Verify that the Subtype Code check box is selected.
g. Deselect the Use for drilldown check box.
h. Click OK. Subtype is selected for drilldown and Subtype Code is not. Later, when a user
drills down in Answers or a dashboard, the default drill is to the level key that has Use for
drilldown checked in the next lowest level. Based on this example, when a user drills down
from the Type level (the next highest level), the default is to drill down to the SubType
column, not the SubType Code column.
9. Continue specifying the following level keys for the remaining levels:
Dimensional Level
Key
Generic
Generic
Yes
Specific
Specific
Yes
Specific
ProductKey
No
11. In this step, you use another method to create the customer dimension and levels.
a. Right-click the Customers logical table and select Create Dimension. A new dimension
called CustomersDim is created with two levels, Customers Total and Customers Detail.
The Customers Detail level is populated with all columns from the Customers logical
127
dimension table.
b. Double-click the Customer Detail level, click the General tab, and note that the number of
elements at this level is set to 136. The number was inherited automatically from Customer
Key when the dimension hierarchy was created.
c. Click OK to close the Logical Level dialog box.
d. Right-click the Customer Detail level and select New Object > Parent Level.
e. Name the parent level SalesRep, set the number of elements to 34, and click OK.
f. Create a District level as a parent of SalesRep, set the number of elements to 12 and click
OK.
g. Create a Region level as a parent of District, set the number of elements to 3, and click OK.
h. Double-click the Customers Total level, verify that it is set as the grand total level and the
number of elements is set to 1, and click OK.
i. Check your work:
128
j. Add columns to the hierarchy by dragging columns from the Customers Detail level (not the
Customers table) to the other CustomersDim hierarchy levels. This is a useful method when
business models are large. It eliminates the need to scroll to locate columns.
Column
Level
Region
Region
District
District
Sales Rep
SalesRep
Key
Region
Region
Yes
District
District
Yes
SalesRep
Sales Rep
Yes
Yes
l. In the Customers Detail level, deselect Use for drilldown for Customer Key (Customers
Detail_Key).
m. Verify your work:
n. Check in changes.
o. Click Yes to check consistency before creating more dimensions. If there are any errors or
warnings, fix them before continuing to the next step.
p. If there are no errors or warnings, close the Consistency Check Manager.
q. Save the repository.
12. In this step, you can use either of the two methods described in the previous steps to create the
Periods dimension. However, do not manually enter the number of elements for each level. In a
later step, you use the Estimate Levels feature to automatically populate the number of elements
at each level of this dimension. You used a manual method to populate the number of elements at
each level when you built the ProductsDim and CustomersDim dimensions. The manual method
Oracle BI Server Administrator 10g: Build Repositories
129
is sufficient if the number of dimensions and levels is small. However, as the number of
dimensions increases, it can be very time consuming to use row counts to determine the values
and then enter the values manually for every level. The Estimate Levels feature automates the
population of counts for levels in a dimension hierarchy and provides consistency checks for
columns in levels and the counts generated for levels.
a. Create a dimension hierarchy called PeriodsDim based on the Periods logical dimension
table.
b. Create the levels within PeriodsDim:
Name
Grand
Total
Level
Supports rollup
to higher level
of aggregation
TotalPeriod
Yes
Protected
Year
No
Yes
Quarter
No
Yes
Month
No
Yes
Day
No
Yes
13. There is no logical column you can associate with the Quarter level, so you need to create one
and map it to the MONTH_IN_YEAR column with a formula using a CASE statement.
a. Double-click the D1_CALENDAR2 logical source table for the Periods logical table.
b. Click the Column Mapping tab.
c. Click the New column button.
d. Name the column Quarter and click OK.
e. Make sure Show unmapped columns is selected.
f. Open the Expression Builder for the Quarter column.
g. Use fully qualified column names and build the following formula. Or, you can copy and
paste this formula from the Quarter.txt file in E:\Labs.
CASE
WHEN
WHEN
ELSE
h. Click OK to close the Expression Builder. The expression is displayed in the Expression
field in the Logical Table Source dialog box.
i. Click OK to close the Logical Table Source properties dialog box.
14. Add columns to the hierarchy by dragging columns to the PeriodsDim hierarchy levels:
Logical Column
Level
Year
Year
Quarter
Quarter
Month
Month
MonthCode
Month
Month in Year
130
Month
Day
Day
Date
Day
15. Create the keys for each child level in the PeriodsDim dimension. Please note that the key for the
Quarter level is set in a subsequent step.
Level
Key
Year
Year
Yes
Month
Month
Yes
Month
MonthCode
No
Quarter
Quarter
Yes
Day
Day
Yes
16. Set MonthCode as the primary level key for the Month level.
a. Double-click the Month level.
b. Click the Keys tab.
c. In the Primary Key drop-down list, select MonthCode.
d. Click OK.
17. Setting the key for Quarter involves an additional step. Quarters (1, 2, 3, 4) occur each year.
However, these numbers do not uniquely identify a quarter, except when combined with Year.
Therefore, you need to make Year part of the Quarter level.
a. Double-click the Quarter level in PeriodsDim.
b. Click the Keys tab.
c. Select the Quarter key.
d. Click the Edit button.
e. Click the Add Button.
f. In the Browse dialog box, expand the Periods logical table.
g. Select Year and click OK.
h. Click OK to close the Logical Level Key dialog box.
i. Click OK to close the Logical Level dialog box.
131
j. Verify your work. It should look similar to the picture. Your results may vary depending on
which method you used to build the hierarchy.
k. Drag the Quarter logical column from the Periods logical table to the Periods presentation
table in the SupplierSales presentation catalog to make it available for queries in Answers.
18. Check in changes.
19. Check consistency.
20. Fix any consistency errors or warnings before proceeding. If there are no errors or warnings,
close the Consistency Check Manager.
21. Save the repository.
22. Use the Estimate Levels feature to populate the level counts in the PeriodsDim dimension.
(Please note: The Administration Tool must be in online mode to run Estimate Levels).
a. Right-click the PeriodsDim dimension and select Expand All.
b. Double-click each of the dimension levels, select the General tab, and verify that the number
of elements at each level is set to 1. This is not a required step. You are doing this to compare
the changes to the levels after you run Estimate Levels. Some levels may not be set to 1,
depending on which method you used to build the hierarchy. If necessary, change the number
of elements to 1, check in changes, check consistency, and save the repository.
c. Right-click the PeriodsDim dimension and select Estimate Levels. The Estimate Levels
process begins.
132
d. When Estimate Levels completes, the Estimate Levels dialog box opens and displays the
results:
e. Click OK.
f. Open each of the levels in PeriodsDim and verify that the number of elements is populated
with the correct results.
g. Check in changes.
h. Check consistency. Fix any errors or warnings before proceeding.
i. Close the Consistency Check Manager.
j. Save the repository.
23. Open Answers and verify your work:
a. Return to Answers.
b. Reload server metadata.
c. Create the following request:
d.
e.
f.
g.
Click Results.
Drill down on 1998 and verify that you can see dollars data by quarter.
Drill down on any quarter and verify that you can see dollars data by month.
Drill down on any month and verify that you can see dollars data by day.
133
Scenario
Now that you have created dimension hierarchies with levels, you want to use
them to implement level-based measures that calculate total dollars at various
levels.
Time
2025 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. In this step, you create new logical fact columns to represent the product level totals based on
existing fact columns.
a. In the Business Model and Mapping layer, right-click the SalesFacts table and select New
Object > Logical Column.
b. In the Name field, type ProductTotalDollars.
c. Select the Use existing logical columns as the source check box.
d. Open the Expression Builder.
e. In the Expression Builder, add Logical Tables > SalesFacts > Dollars to the expression.
Recall that the Dollars column has a default aggregation rule of SUM.
f. Click OK.
g. Click the Levels tab.
h. For the ProductsDim, select TotalProduct from the Level drop-down list to specify that this
measure should be calculated at the grand total level in the product hierarchy.
i. Click OK. Notice that setting the level causes the measure automatically to appear in the
ProductsDim dimension.
134
Name
Dimension
Level
ProductTypeDollars
ProductsDim
Type
d. For the ProductTypeDollars column, click the Format Column button, then click the Data
Format tab, override the default data format, and set to Currency, $, Decimal Places = 2,
Use 1000s Separator.
135
f. Click Results. Notice that ProductTypeDollars returns dollars grouped by Type when the
query is at a different level than Type; Generic in this example.
136
g. Drill down on a value in the Generic column. Based on how you constructed the hierarchy in
the business model, if you drill down on a value in the Generic column, Answers drills down
to the Specific column by default.
137
Scenario
Now that you have created level-based measures, you use them to create a
share measure for products and a rank measure.
Time
1530 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. Create a new share measure referencing existing logical columns.
a. In the Business Model and Mapping layer, right-click SalesFacts and select New Object >
Logical Column.
b. Name the logical column ProductShare.
c. Select the Use existing logical columns as the source check box.
d. Open the Expression Builder.
e. In the left pane, select the Functions folder.
f. In the middle pane, select Mathematic Functions.
g. In the right pane, select Round.
h. Click Insert. The function appears in the edit box.
i. Click numExpr.
138
l. Click Insert.
m. Using the toolbar, click the Division button. Another set of brackets appears, <<expr>>.
n. Click <<expr>>.
o. Select Logical Tables > SalesFacts > ProductTotalDollars. Recall that this is the total
measure for the hierarchy.
p. Double-click ProductTotalDollars or click Insert.
q. Click between the last set of brackets, <<integer>>, and enter 1. This represents the number
of digits of precision with which to round.
r. Check your work:
This share measure will allow you to run a query in Answers to show how sales of a specific
product compares to overall sales for all products.
s. Click OK to close the Expression Builder.
t. Click OK to close the Logical Column properties dialog box.
u. The ProductShare logical column is added to the business model.
3. Create a new rank measure referencing existing logical columns.
a. In the Business Model and Mapping layer, right-click the SalesFacts table and select New
Object > Logical Column.
b. In the Name field, enter RankDollars.
c. Select the Use existing logical columns as the source check box.
d. Open the Expression Builder.
e. Select Functions > Display Functions > Rank.
f. Double-click Rank or click Insert.
g. Click <<numExpr>>.
h. Select Logical Tables > SalesFacts > Dollars.
139
i. Click Insert.
140
d. For the RankDollars column, click the Order By button once to sort the results in
ascending order.
e. For the ProductShare column, click the Format Column button, then the Data Format
tab, override the default data format, and set to Percentage with Decimal Places = 2.
f. Click Save > as the system-wide default for SalesFacts.ProductShare.
g. Click the Results tab:
The results show total dollars for each product, the percent of total sales for each product,
and how each product ranks in total sales.
h. Create a similar query to view results for Products.Type, SalesFacts.Dollars,
SalesFacts.Product Share, and SalesFacts.Rank Dollars.
The results show total dollars for each product type, the percent of total sales for each
product type, and how each product type ranks in total sales.
10. Leave Answers open.
141
Scenario
Outcome
Time
510 minutes
Instructions:
1. Return to the ABC repository, which should still be open in online mode.
2. Create a new measure with dimension-specific aggregation rules.
a. In the Business Model and Mapping layer, right-click SalesFacts and select New Object >
Logical Column.
b. Name the logical column AvgDailyDollars.
c. Click the Data Type tab.
d. If necessary, select Show all logical sources.
e. Double-click the D1_ORDERS2 logical table source.
f. Click the Column Mapping tab.
g. Make sure that Show unmapped columns is selected.
h. Map AvgDailyDollars to the ACTLEXTEND (dollars) physical column.
i. Click OK to close the Logical Table Source dialog box.
j. Click the Aggregation tab.
k. Select Based on dimensions.
l. In the Browse dialog box, select the PeriodsDim dimension and click OK.
m. In the Formula field, select the AVG aggregation rule from the drop-down list.
n. Click the New button.
o. Select Other and click OK.
p. Select the SUM aggregation rule for Other.
142
q. With Other selected in the Dimension column, use the Up button to change the aggregation
rule order.
r. Click OK.
s. Drag the AvgDailyDollars measure to the SalesFact presentation table.
3. Check in changes.
4. Check Global Consistency. Fix errors and warnings before continuing.
5. Close the Consistency Check Manager.
6. Save the repository.
7. Test your work.
a. Return to Answers, reload server metadata, and create the following request and filter.
Hint: Add Month Code to the query, create the filter, and then remove Month Code from the
query.
143
c. Considering that there are 25 order days in the first month of 1999, use the Windows
calculator to verify that the results of the query are correct for average daily dollars.
144
Scenario
ABC wants to add sources that contain pre-computed aggregations. You need
to specify the level of aggregation for each source using logical levels. The
database administrator for ABC has already created the necessary aggregate
tables:
MONTHS contains one row for each year and month combination,
which can be considered an aggregation of the Period dimension to
the Month level.
Outcome
In the Physical layer, there are new physical sources for the aggregate tables
listed above. In the Logical layer, there are new logical table sources for
Customers, Periods, and SalesFacts.
Time
3035 minutes
Instructions:
1. Return to the Administration Tool and close the ABC repository, which should still be open in
online mode.
2. Stop the Oracle BI Server service and open the ABC repository in offline mode. You are
returning to offline mode in this practice to import tables.
3. Import the physical aggregate tables from the ORCL database into the Physical layer of the
repository. You are importing both aggregate fact and aggregate dimension tables because you
need to create logical dimension sources at the same level of detail as the fact sources.
a. Select File > Import > from database.
b. Select the ORCL ODBC data source.
c. Enter SUPPLIER2 as the username and password and click OK. The Import dialog box
opens. This may take a few moments.
d. Scroll to the SUPPLIER2 schema and expand it.
Oracle BI Server Administrator 10g: Build Repositories
145
146
(PERKEY) levels.
d. View data for the MONTHS table. The MONTHS table contains one row for each year and
month combination, which is an aggregation of the Period dimension to the Month level.
e. View data for the D1_PRODUCT_TYPE table. D1_PRODUCT_TYPE contains one row
for each product type, which is an aggregation of the Product dimension to the Type level.
6. Create physical joins between the aggregate fact and aggregate dimension tables. Click Yes
when prompted to create a matching table key.
Oracle BI Server Administrator 10g: Build Repositories
147
a. In the Physical layer, use CTRL+click to select the three tables you just imported plus the
D1_PRODUCT_TYPE table, and click the Physical Diagram icon in the toolbar.
b. Rearrange the tables so they are all visible in the Physical Diagram.
c. Use the New foreign key button and create the following joins:
D1_SALESREPS.SALESREP = D1_ORDER_AGG1.REPKEY
MONTHS.MONTHCODE = D1_ORDER_AGG1.PERKEY
D1_PRODUCT_TYPE.TYPECODE = D1_ORDER_AGG1.TYPEKEY
d. Verify your work:
Note that these four columns now map to both the D1_ORDERS2 table and the
D1_ORDER_AGG1 table. In the next step, you configure the business model to choose the
appropriate table to use during a query based on how content is specified in the Content tab.
148
8. Specify the aggregation content of the new table source for the SalesFacts table so that Oracle BI
Server knows what level of data is stored in the aggregate tables.
a. Select the Content tab.
b. In the Aggregation content, group by field, verify that the value is Logical Level. This is
the default.
c. Use the drop-down menus in the Logical Level field to specify the aggregation content as
follows:
You are setting aggregation content for the fact table to the corresponding levels in the
dimension hierarchies. In a subsequent step, you set similar levels for the dimension table
aggregate sources. Later, when a user queries against a particular level, Oracle BI Server will
know to access the aggregate tables instead of the detail tables. For example, if a user
queries for total sales by month by Sales Rep, the server will access the D1_ORDER_AGG1
aggregate fact table and the corresponding aggregate dimension tables, MONTHS and
D1_SALESREP. If a user queries for a level lower than the levels specified here, for
example Day instead of Month, or Customer instead of Sales Rep, then the server will access
the detail tables (D1_ORDERS2, D1_CALENDAR2, D1_CUSTOMER2). If a user queries
for higher level (year instead of month or district instead of sales rep) the aggregate tables
will be used as well, because whenever a query is run against a logical level or above, the
aggregate tables are used.
d. Click OK to close the Logical Table Source dialog box for D1_ORDER_AGG1.
e. Specify the content for the remaining fact logical table source, D1_ORDERS2. You are
doing this because it is good practice to set the levels for the detail source to the lowest levels
in the hierarchies. This is because you want the server to access the detail tables when
queries are against levels lower than those specified for the aggregate tables. It is also good
practice to specify the content of all sources for documentation purposes, as another
administrator could interpret the lack of an aggregation content statement as an inadvertent
omission of information.
Please note that the name of the detail level for CustomersDim may be different from the
Oracle BI Server Administrator 10g: Build Repositories
149
screenshot, depending on which method you used to create the CustomersDim hierarchy in
the previous set of practices.
f. The Administration Tool can also validate the levels of the fact table sources. Change the
CustomersDim logical level to Region and click More > check levels. The dialog box shows
the recommended levels and the current level.
g. Click the Set button to set the level to the recommended level. You may need to scroll to the
right to see the Set button.
h. Close the Results dialog box.
i. Click OK to close the Logical Table Source dialog box.
9. Create a new source within the Periods logical table that points to the MONTHS aggregate table.
a. In the Physical layer, expand the MONTHS table.
b. In the Business Model and Mapping layer, expand Periods.
c. Drag the MONTH_IN_YEAR, MONTHCODE, MONTHNAME, QUARTER, and
YEAR columns from the MONTHS aggregate table onto the corresponding Periods logical
columns to create the mappings and the new source (drag MONTHNAME to Month). Use
the Column Mapping tab for the MONTHS logical table source to check your work:
10. Specify the aggregation content for the new MONTHS logical table source for the Periods table
so that Oracle BI Server knows what level of data is stored in the aggregate table. Recall that the
MONTHS table contains data at the Month level within the Period dimension hierarchy.
a. Select the Content tab in the MONTHS logical table source.
b. In the Aggregation content, group by field, verify that the value is Logical Level.
150
c. Use the drop-down menu in the Logical Level field to specify the aggregation content as
follows:
d. Click OK.
e. Specify the content for the remaining fact logical table source, D1_CALENDAR2. Again, it
is best practice to set the levels for the detail source to the lowest levels in the hierarchies.
12. Apply a similar process as above to specify the aggregation content for the logical table sources
for the Customers table so that Oracle BI Server knows what level of data is stored in the
aggregate table. Recall that the D1_SALESREPS table contains data at the SalesRep level within
the Customer hierarchy. D1_CUSTOMER2 should be set to the lowest level in the hierarchy.
Your results should look like the screenshots. Again, the name of the detail level for
CustomersDim may be different from the screenshot, depending on which method you used to
create the CustomersDim hierarchy in the previous set of practices.
151
13. Apply a similar process to set the aggregation content for the logical table sources for the
Products table. Use the screenshots as a guide.
152
20. Select Settings > Administration > Manage Sessions > View Log to inspect the query log.
21. Verify that the query uses the D1_ORDER_AGG1 aggregate fact table and the related
D1_SALESREPS aggregate dimension table.
153
c. Notice that the query still uses the same aggregate tables. Why is this?
c. Notice that the detail fact table, D1_ORDERS2, and the detail dimension table,
D1_CUSTOMER2, are accessed instead of the aggregate tables. Why is this?
154
22.c.
Notice that the query still uses the same aggregate tables. Why is this?
Sales District is at a higher level than Sales Rep; therefore, the aggregate tables can still
be used.
23.c.
Notice that the detail fact table, D1_ORDERS2, and the detail dimension table,
D1_CUSTOMER2, are accessed instead of the aggregate tables. Why is this?
The data requested is at a lower level than what is contained in the aggregate tables;
therefore, the aggregate tables do not contain the data and the detail tables must be used.
155
To use the Aggregate Persistence Wizard to automate the creation of aggregate tables
and their corresponding objects in the repository
Scenario
The traditional process for creating aggregates for Oracle BI Server queries is manual,
requiring the writing of DDL and DML scripts to create tables in the databases
involved. Additionally, these aggregated tables need to be mapped into the repository
metadata to be available for queries. This is a time consuming and, possibly, an error
prone process. The Aggregate Persistence Wizard allows an administrator to
automate the creation of aggregate tables and their corresponding objects in the
repository. Recall that your repository contains an aggregate table called
D1_ORDER_AGG1, which contains sales fact data aggregated at the month, sales
representative, and product type levels, and corresponding dimension aggregate
tables for product type, sales rep, and months. In this practice, you use the Aggregate
Persistence Wizard to create similar aggregate tables and the corresponding
metadata.
Time
2030 minutes
Instructions:
1. In this step, you use the Aggregate Persistence Wizard to build a script that is used to create
aggregate tables and the corresponding metadata.
a. Return to the Administration Tool and open the ABC repository in online mode.
b. Select Tools > Utilities > Aggregate Persistence Wizard and click Execute.
c. Click Browse. The Repository directory opens by default.
d. In the File Name field, enter CREATE_AGG and verify that the sql file type is selected.
This specifies the file where the output script is saved. This file stores the aggregate
specifications and is updated if more aggregates are specified.
e. Click Open.
f. Click Next.
g. In the top pane, select the SupplierSales business model. When there are multiple business
models only one business model can be selected.
h. In the bottom pane expand the SalesFacts fact table. When there are multiple fact tables,
only one fact table can be selected.
156
i. Select the Dollars, Units Shipped, Units Ordered, and Net Weight Shipped measures.
j. Click Next.
k. Select the following levels. Leave the Use Surrogate Key? field deselected.
ProductsDim
=
Type
PeriodsDim
=
Month
CustomersDim
=
SalesRep
l. Click Next.
m. In the top pane, select the ORCL database.
n. In the second pane, expand ORCL and select the SUPPLIER2 schema. The SUPPLIERCP
connection pool is selected by default.
157
o. In the Aggregate table name field, accept the default name ag_SalesFacts for the aggregate
table name.
p. Click Next.
158
q. Review the aggregate definition. The screen displays the logical SQL that generates the
aggregate tables based on the parameters defined in the previous steps.
r. Click I am done.
s. Click Next. The Complete Aggregate Script dialog box appears confirming that the script has
been generated and stored in the location identified in an earlier step.
t. Click Finish.
u. Navigate to E:\OracleBI\server\Repository and verify that the CREATE_AGG.sql script
file was generated.
2. Examine the aggregate parameters in the NQSConfig.ini file.
a. Navigate to E:\OracleBI\server\Config and open NQSConfig.ini.
b. In the General section, notice the setting for AGGREGATE_PREFIX. This is the prefix
that is added automatically to the names of the dimension (level) aggregates when they are
generated by the script.
c. Close NQSConfig.ini without making any changes.
3. Set a password for the Administrator user. You do this because you need to provide a password
to run a batch file in the next step.
a. Select Manage > Security.
b. Select User in the left pane.
Oracle BI Server Administrator 10g: Build Repositories
159
c.
d.
e.
f.
g.
h.
i.
Double-click Administrator in the right pane to open the User dialog box.
Type Administrator in the Password and Confirm Password fields.
Click OK.
Select Action > Close to close the Security Manager.
Check in changes.
Save the repository.
Close the repository. Leave the Administration Tool open.
4. Create and run a batch file to drive the aggregate creation process.
a. Open Notepad and create the following create_agg batch file:
b.
c.
d.
e.
f.
g.
h.
5. Verify that the aggregates are created in the Physical layer of the repository.
a. Open the ABC repository in online mode as Administrator with password Administrator.
b. In the Physical layer, verify that the aggregates were created in the SUPPLIER2 schema.
There should be one new ag_SalesFacts aggregate and three new dimension aggregates in
160
the Physical layer. Your results should look similar to the picture.
c. Update row counts for the new aggregates to verify connectivity. Confirm that you see the
following row counts:
ag_SalesFacts
=
10,212 rows
SA_Month
=
16 rows
SA_SalesRe
=
34 rows
SA_Type
=
21 rows
d. Double-click ag_SalesFacts, select the Foreign Keys tab, and verify that joins are created
between ag_SalesFacts and the new dimension aggregates.
e. Double-click the foreign keys to view the join relationships in the Physical Foreign Key
dialog box.
f. Click Cancel to close the Physical Foreign Key dialog box.
g. Click Cancel to close the Physical Table - ag_SalesFacts dialog box.
6. Verify that the aggregates are created in the Business Model and Mapping layer of the
repository.
a. In the Business Model and Mapping layer, open the Sources folder for the SalesFacts,
Customers, Periods, and Products logical tables and verify that new logical table sources
are created for the aggregates.
b. In the Sources folder for the SalesFacts logical table, double-click the ag_SalesFacts logical
table source.
c. Click the General tab and verify that the ag_SalesFacts logical table source maps to the
ag_SalesFacts physical table.
d. Click the Column Mapping tab and verify that the Dollars, Units Ordered, Units Shipped,
and Net Weight Shipped logical columns map to the corresponding physical columns in the
ag_SalesFacts physical table.
161
e. Click the Content tab and verify that the logical levels are set correctly.
f.
g.
h.
i.
j.
Click Cancel to close the ag_SalesFacts Logical Table Source dialog box.
Check in changes.
Check global consistency. Fix any errors or warnings before continuing.
If there are no errors or warnings, close the Consistency Check Manager.
Save the repository.
10. Inspect the query log and verify that the query used the ag_SalesFacts aggregate table and the
related SalesRep dimension aggregate. Your file should look similar to the screenshot.
11. Reverse some of your changes to the repository for the remaining lessons. The purpose of this
practice was to illustrate how to use the Aggregate Persistence Wizard as a method for creating
aggregate tables. The tables that were created with the wizard are not used in the remaining
lessons in this course. In this step, you deactivate the new aggregate tables and reactivate the
original aggregate tables.
a. Return to the ABC repository open in online mode.
b. In the Business Model and Mapping layer, expand the Sources folder for the SalesFacts
logical table.
c. Double-click the D1_ORDER_AGG1 logical table source.
d. Select the General tab and click Active.
e. Click OK to close the logical table source dialog box.
f. Repeat the steps and activate the D1_SALESREPS and MONTHS logical table sources.
g. Return to the Sources folder for the SalesFacts logical table and double-click the
ag_SalesFacts logical table source.
h. Select the General tab and deselect Active to deactivate the ag_SalesFacts logical table
source.
i. Click OK to close the logical table source dialog box.
Oracle BI Server Administrator 10g: Build Repositories
163
j. Use similar steps to deactivate the corresponding dimension logical table sources beginning
with SA_ for Customers, Periods, and Products. Only Products is shown in the picture.
k.
l.
m.
n.
o.
164
Check in changes.
Check global consistency. Fix any errors or warnings before proceeding.
Close the Consistency Check Manager.
Save the repository.
Leave the Administration Tool open.
Scenario
ABC wants to implement separate partitions for customer data. One partition
will store data for customers AM, the other will store data for customers
NZ.
Outcome
In the Physical layer, there are new physical sources: custAtoM and custNtoZ.
In the Logical layer, the logical sources for the Customers logical table are
changed.
Time
1520 minutes
Instructions:
1. Examine customer data results. You use this information to compare results later in this practice.
a. Return to Answers. If necessary, log in as Administrator with password Administrator.
b. Reload server metadata.
c. Create and run a request for Customers.Customer.
d. Record the name of the first customer in the list:
2. Use the Direct Database Request feature to create new partitioned customer tables.
a. Click Settings > Administration to open the Oracle BI Presentation Services Administration
window.
b. Click Manage Privileges to open the Privilege Administration screen.
c. Scroll to the Answers section. Notice that the Edit Direct Database Requests privilege is
granted to Presentation Server Administrators. By default, the Administrator user is a
member of this group.
d. Notice also that the Execute Direct Database Requests privilege is not granted to anyone
(not permitted).
e. Click (not permitted) for the Execute Direct Database Requests privilege to open the
Change Privilege Permissions screen.
Oracle BI Server Administrator 10g: Build Repositories
165
f. Click Add next to Presentation Server Administrators to give this group explicit access to
this privilege.
g. Click Finished to close the Change Privilege Permissions screen. Notice the change to the
privilege permissions for Execute Direct Database Requests. Presentation Server
Administrators can now execute direct database requests.
h. Click Finished to close the Privilege Administration screen.
i. Click Close Window to close the Oracle BI Presentation Services Administration window.
j. Click the Answers link to return to the Answers start page.
k. Click the Create Direct Request link.
l. In the Connection Pool field, enter SUPPLIER CP. This is the connection pool name for the
ORCL data source.
m. Enter the following SQL in the SQL Statement field:
CREATE TABLE D1_custAtoM AS SELECT * FROM D1_CUSTOMER2 WHERE
Name < 'N'
n. Click Results. You should see a No Results message.
o. Click the Criteria tab.
p. Remove the CREATE TABLE SQL from the SQL Statement field.
q. Enter the following SQL in the SQL Statement field:
SELECT COUNT(*) FROM D1_custAtoM
r. Click Validate SQL and Retrieve Columns.
s. Click Results. You should see COUNT(*) = 94.
t. Click the Criteria tab.
u. Remove the SELECT COUNT(*) SQL statement from the SQL Statement field.
v. Enter the following SQL in the SQL Statement field:
CREATE TABLE D1_custNtoZ AS SELECT * FROM D1_CUSTOMER2 WHERE
Name >= 'N'
w. Click Results. You should see a No Results message.
x. Click the Criteria tab.
y. Remove the CREATE TABLE SQL from the SQL Statement field.
z. Enter the following SQL in the SQL Statement field:
SELECT COUNT(*) FROM D1_custNtoZ
166
167
l. Delete the following logical columns because they are duplicates and not needed:
NEWKEY, NAME, ZIP_CODE, SALESREP, and ROUTECODE (the last five columns).
m. Double-click D1_CUSTNTOZ in the Sources folder and select the Content tab.
n. Click the ellipsis button to open the Fragmentation Content expression builder.
o. Select Logical Tables > Customers, and then double-click Customer.
p. Click >= and type N.
q. Click OK.
r. Select This source should be combined with others at this level.
s. Click the Column Mapping tab and modify the mappings as follows:
t. Click OK.
u. Deactivate the original source by double-clicking D1_CUSTOMER2, selecting the General
tab, and deselecting the Active flag.
v. Click OK.
w. Notice that you did not have to change the Presentation layer.
7. Check in changes.
8. Check consistency. Fix any errors or warnings before continuing.
9. If there are no errors or warnings, close the Consistency Check Manager.
10. Save the repository.
11. Test your results.
a. Return to Answers.
b. Reload server metadata.
c. Build a request for Customers.Customer and select the Results tab.
d. Click the All Pages button to see all records.
Oracle BI Server Administrator 10g: Build Repositories
169
e. Compare your results to those in step 1. There should not be any difference. The query
returns 134 customer records.
12. Verify that the query being issued is accessing your new tables.
a. Open the query log.
b. Verify that it references your new tables. Both partition tables are used because you
deactivated the detail source table, D1_CUSTOMER2, and did not apply a filter to Customer
in the query. Note that a separate select statement is sent to each table and Oracle BI Server
performs a UNION ALL to combine the results.
d. Open the query log and verify that the query being issued is accessing the correct partition,
D1_CUSTNTOZ, for the Customer data.
170
d. Open the query log and verify that the query being issued is accessing the correct partition,
D1_CUSTATOM, for the Customer data.
171
1.f.
172
Scenario
ABC sets sales quotas for its sales organization. These quotas are set at the
region level by quarter. In addition, each of the region sales quotas is broken
down by product type. Quota numbers are stored in an Excel workbook. The
workbook, quota.xls, is stored on your machine. You incorporate the quota
numbers in the business model and create business measures to report
variance from quota and percent of quota.
Time
1015 minutes
Instructions:
1. Create an ODBC data source for an Excel spreadsheet.
a. Double-click Data Sources (ODBC) on your desktop to open the ODBC Data Source
Administrator.
b. Click the System DSN tab.
c. Click Add.
d. Select the Microsoft Excel Driver and click Finish.
e. Type xls_quota for the data source name.
f. Click Select Workbook.
g. Navigate to E:\Labs and select the quota.xls workbook.
h. Click OK.
i. Click OK to close the ODBC Microsoft Excel Setup dialog box.
j. Click OK to close the ODBC Data Source Administrator.
2. Import the xls_quota data source into the ABC repository.
a. Return to the ABC repository, which should still be open in online mode.
b. Select File > Import > from Database.
c. Select the xls_quota data source, and enter the Administrator user name, no password.
d. Click OK. The Import dialog box opens.
e. Expand E:\Labs\quota.
f. Select and import the following tables:
Item Types
Quarters
Regions
regiontypequota
g. Close the Import dialog box.
Oracle BI Server Administrator 10g: Build Repositories
173
3. Because Excel has limited data types, verify or change the data types to conform to existing data
types for the relevant fields. Expand the physical tables and double-click the physical columns to
open the properties dialog box.
ItemType:
VARCHAR 20
Quarter:
DOUBLE
YR:
DOUBLE
Region
CHAR 16
Dollars:
DOUBLE
4. Specify joins and keys.
a. For each table, double-click the table, click the Keys tab, and use the New button to specify
the table keys as follows:
b. Use the Physical Table Diagram to specify the following foreign key joins:
ItemTypes.ItemType = regiontypequota.ItemType
Regions.Region = regiontypequota.Region
Quarters.YR = regiontypequota.YR AND Quarters."Quarter" =
regiontypequota."Quarter"
Hint: Use CTRL+click to create the multicolumn join for the Quarters columns or enter the
174
175
7. Specify the content for the new regiontypequota logical table source in the Content tab of the
Logical Table Source properties dialog box:
176
It is good practice to set the aggregation level of these dimension sources. You specify the
content of a dimension table source in terms of the hierarchy of that dimension only. The content
of a fact table source is specified in terms of the content of all dimensions.
10. Drag the Quota logical column into the SalesFacts presentation table.
11. Check in changes.
12. Check consistency. If you get a warning that the features in database xls_quota do not match the
defaults, you can ignore the warning for the purposes of this practice. If you want to prevent the
warning message from appearing, click Options > Warnings > Database and disable Check
Features Match Default. Fix any other errors or warnings before continuing.
13. Close the Consistency Check Manager.
14. Save the repository and leave it open for the next practice.
177
Goals
Scenario
Use the Calculation Wizard to create two derived measures: Variance from
Quota and Percent of Quota.
Time
510 minutes
Instructions:
15. In this step, you use the Calculation Wizard to create two new measures.
a. Right-click the Dollars logical column and select Calculation Wizard. The Calculation
Wizard opens.
b. Click Next. The Calculation Wizard Choose Columns dialog box opens.
c. Click SalesFacts.
d. In the right pane, select the Quota check box.
e. Click Next.
f. Verify that the Change check box is checked in the Generate Calculations section and enter
Variance from Quota in the Calculation Name field to change the name of this calculation.
g. Deselect the Percent Change calculation check box.
h. Select the Percent check box, and rename the measure to Percent of Quota. The calculation
wizard will write the correct formula for each measure, handling the cases of NULL and zero
178
179
21. Check your results. In the screenshot, the columns have been formatted.
22. Check the query log. The log shows that a single logical query generated two physical queries.
Oracle BI Server automatically joined the two result sets on the basis of common values in the
logical dimension columns. The join of two results sets from two different sources is always a
full outer join. Mapping two sources to the same logical columns (as you did for region, year,
quarter, and type) was all that was necessary to cause this join to happen.
180
Scenario
ABCs inventory data is fragmented, meaning that it is split into multiple tables. Data
values determine which table contains which data. In this example, eight quarters of
inventory data are stored in eight separate tables. You need to create a business
model for this fragmented inventory data.
Time
1520 minutes
Instructions:
1. Stop the Oracle BI Server service and open the ABC repository in offline mode.
2. Import the inventory tables into the repository.
a. Select File > Import > from Database.
b. Select the ORCL data source.
c. Enter SUPPLIER2 as the username and password and click OK. The Import dialog box
opens. This may take a few moments.
d. Scroll to and expand the SUPPLIER2 schema.
e. Select the following tables for import:
181
h. Click Yes to proceed when warned about importing foreign keys with Oracle databases.
i. Click Import. The import process starts. Because you are importing foreign keys, this may
take a while.
j. When importing is complete, close the Import dialog box.
k. Verify that the new tables are added to the Physical layer.
on the
l. Select all of the newly imported tables and click the Physical Diagram button
toolbar. Rearrange the tables and use the zoom feature as necessary to make the tables visible
in the diagram. Assuming you imported both keys and foreign keys, the physical diagram
should look similar to this:
If you did not import the foreign keys, you need to manually configure the joins in the
physical diagram or delete the tables and reimport with foreign keys selected. Because the
names of keys and foreign keys match, if you do elect to manually configure the joins, the
Administration Tool automatically selects the correct columns when you join the tables.
m. Close the Physical Diagram.
n. Update row counts to verify connectivity.
o. If desired, right-click the new Inventory tables and select View Data to get an idea of what
data is contained in these tables.
3. Create the business model.
a. Right-click in the white space of Business Model and Mapping layer and select New
Business Model.
b. Name the business model Inventory and click OK.
4. Create the fact table.
a. Right-click the Inventory business model and select New Object > Logical Table.
182
b. Name the logical table Inventory Facts and click OK to close the dialog box.
This fact table will have four facts: Beginning Inventory Dollars, Ending Inventory Dollars,
Beginning Inventory Quantity, and Ending Inventory Quantity. These facts will map to
physical columns in the eight Inventory physical tables.
c. Expand INVENTORY_Q1_2004.
d. Drag the following four columns simultaneously to the Inventory Facts logical table:
BOH_DLL
BOH_QTY
EOH_DLL
EOH_QTY
Note that INVENTORY_Q1_2004 is added as a logical table source to the Inventory Facts
table.
e. Expand the INVENTORY_Q1_2005 table and drag the same four columns simultaneously
to the Inventory Facts logical table. Because the column names are identical, you can drag all
four columns simultaneously, instead of one at a time. Note that INVENTORY_Q1_2005 is
added as a source to the Inventory Facts table.
f. Repeat this process for the remaining six INVENTORY tables. The Inventory Facts table
should look like this when you are done:
All of these sources are at the same level of aggregation and they all contain mappings to the
same logical facts. The only difference in the tables is the time period of the data.
g. Rename the logical fact columns:
Old Name
New Name
BOH_DLL
EOH_DLL
183
BOH_QTY
EOH_QTY
6. Create the logical joins (using the New Complex Join button) in the business model diagram:
185
b. Create aggregation rules for Ending Inventory Dollars. The rule is the same as that for
Beginning Inventory Dollars, except to take the Last by time.
c. Repeat the process for Beginning Inventory Quantity and Ending Inventory Quantity.
14. Define the fragmentation content for the Inventory Facts logical table sources.
a. Right-click LU_QUARTER table in the Physical layer and select View Data. You use this
information to build the fragmentation content for the logical table sources in the steps that
follow.
b. Specify the fragmentation content for the INVENTORY_Q1_2004 logical table source.
Make sure that This source should be combined with other sources at this level is
selected. This lets Oracle BI Server know that to obtain a complete set of information at this
level, the sources need to be combined (union). If deselected, the server would infer that
sources contained redundant information. Note also that the fragmentation content is
specified in terms of the logical columns from the dimension table. That is, it uses the values
186
c. Specify the fragmentation content for the INVENTORY_Q1_2005 logical table source.
d. Use these two examples as models and specify fragmentation content for the remaining six
logical table sources. Hint: Cut and paste the fragmentation content formula and then modify
accordingly.
15. Use the Query Repository Utility to verify fragmentation content.
a. Select Tools > Query Repository.
b. In the Type field, select Logical Table Source.
Oracle BI Server Administrator 10g: Build Repositories
187
e. Click OK.
f. Click Query. The results should include all eight Inventory logical table sources.
188
17. Check Global Consistency. Fix any error or warning messages before continuing.
18. Close the Consistency Check Manager.
19. Save and close the repository.
20. Test your work.
a. Start the Oracle BI Server service.
b. Return to Answers.
c. Reload server metadata.
d. Click the Inventory subject area.
e. Create the following query and filter.
f. Click Results.
g. Check the query log. The query log should show that the SQL included only a single logical
table source (fragment): INVENTORY_Q1_2005. This is because only this logical table
189
j. Click Results.
190
k. Examine the query log. Note that there are now four query blocks, one for each logical table
source that specified fragmentation content that included YEAR_ID = 2005. Note also that
the query combines the results (union all), orders the results by quarter within year, and
selects the last row for each year. In this case, it is only one year, 2005. The picture shows a
portion of the query log SQL.
191
Scenario
ABC has implemented separate partitions for customer data. However, when
the partitions get reloaded, 50% of the data will be loaded into the first partition
and 50% of the data will be loaded into the second partition. You create an
initialization block and a dynamic repository variable, and then use the variable
to determine how the data is split between the partitions.
Outcome
Time
1015 minutes
Instructions:
1. Open the ABC repository in online mode.
2. In this step, you create an initialization block. Initialization blocks contain SQL statements that
initialize variables. The variables are repository variables and their values persist until the
initialization block resets them the next time it runs. Repository initialization blocks execute
whenever Oracle BI Server starts up and thereafter according to any schedule that is applied.
a. Select Manage > Variables.
b. Select Action > New > Repository> Initialization Block.
c. Name the block CustomerDataSplit.
d. Click Edit Data Source.
e. Click the Browse button.
f. Select the SUPPLIER CP connection pool object.
g. Click the Select button. The connection pool is added to the Repository Variable Init Block
Data Source dialog box.
193
h. Enter the following SQL in the Default Initialization String field to capture the first letter of
the maximum customer name in the D1_CUSTATOM table:
SELECT SUBSTR(MAX(UPPER(NAME)),1,1) AS EXPR1 FROM
SUPPLIER2.D1_CUSTATOM
194
e.
f.
g.
h.
i. Click Close.
j. Click OK to close the Repository Variable Init Block Variable Target dialog box.
195
k. Click OK to close the Repository Variable Init Block dialog box. The initialization block and
dynamic repository variable are visible in the Variable Manager.
196
p. Verify that the This source should be combined with other sources at this level check box
is selected.
q. Click OK.
r. Double-click D1_CUSTNTOZ.
s. Click the General tab.
t. In the Name field, enter CustPartTwo.
u. Verify that Active is selected.
v. Select the Content tab.
w. Open the Expression Builder.
x. Remove >= N from the expression.
y. Click the > button.
z. Select Repository Variables in the left pane and double-click EndPartOne in the middle
pane to change the expression to use the variable.
aa. Click OK.
197
cc. Verify that the This source should be combined with other sources at this level check box
is checked.
dd. Click OK.
ee. The two sources with content expressions based on the repository variables are renamed in
the Sources folder:
5. Check in changes.
6. Check consistency. Fix any error or warning messages before proceeding.
7. Close the Consistency Check Manager.
8. Save and close the repository.
9. Test your results.
a. Restart the Oracle BI Server service.
b. Navigate to E:\OracleBI\server\log and open NQQuery.log.
198
c. Scroll to the end of the file to locate the query issued by the initialization block:
d.
e.
f.
g.
h.
i. Run the query and verify that your results display names starting less than B:
j. Select Settings > Administration > Manage Sessions > View Log to open the query log.
k. Verify that the D1_CUSTATOM table is being used:
199
c. Verify that the SQL in the log file references the D1_CUSTNTOZ table:
200
Scenario
Rather than creating hard-coded column filters like Year = 1999 in Answers
requests, ABC would like to use variables that always return the current year,
current month, and current day. You create these dynamic repository variables
and then use them in column filters in Oracle BI Answers.
Outcome
New initialization block, Current Periods, and three new dynamic repository
variables, CurrentYear, CurrentMonth, and CurrentDay are created.
Time
1015 minutes
Instructions:
1. In this step, you create a new initialization block. This initialization block will initialize three
variables called CurrentYear, CurrentMonth, and CurrentDay. The variables will get their values
from the initialization block SQL according to the schedule you set. In this example, the system
determines the value of the current day by finding the maximum value of the period key
(YYYMMDD) in the D1_ORDERS2 table and then determining the month code and year that
correspond to that value in the D1_CALENDAR2 table.
a. Select Manage > Variables.
b. Select Action > New > Repository > Initialization Block.
c. Name the block CurrentPeriods.
d. Click Edit Data Source.
e. Click the Browse button.
f. Double-click the SUPPLIER CP connection pool object to select it.
201
g. Enter the following SQL in the block to determine the value of the current day by finding the
maximum value of the period key (YYYMMDD):
SELECT YYYYMMDD, MONTHCODE, YEAR FROM
SUPPLIER2.D1_CALENDAR2 WHERE YYYYMMDD = (SELECT
MAX(PERIODKEY) FROM SUPPLIER2.D1_ORDERS2)
h. Click OK to close the Repository Variable Init Block Data Source dialog box.
2. Create the variables
a. Click the Edit Data Target.
b. Create three new variables: CurrentDay, CurrentMonth, CurrentYear. The order is
important. The value that comes back from the first column in the initialization block SQL,
YYYYMMDD, is assigned to the variable CurrentDay. The value of the second column,
MONTHCODE, is assigned to the second variable, CurrentMonth, and the value of the third
column, YEAR, is assigned to the third variable, CurrentYear. If necessary, use the Up and
Down buttons to arrange the variables.
c. Click OK to close the Repository Variable Init Block Variable Target dialog box.
d. Leave the default refresh interval set to every hour. This means that the variables will be
reinitialized every hour.
e. Click Edit Data Source.
202
g.
h.
i.
j.
In this example, the results are determined by the data in the SUPPLIER2 database used for
this course, which holds data only through the year 1999.
Click Close the close the Results window.
Click OK to close the Repository Variable Init Block Data Source dialog box.
Click OK to close the Repository Variable Init Block dialog box.
Check your work in the Variable Manager:
d. Click the Add Filter button for the Year column. The Create/Edit Filter dialog box opens.
e. Select Add > Variable > Repository.
203
f. In the Server Variable field, type CurrentYear to add a filter for the Year column using the
CurrentYear repository variable.
g. Click OK.
h. Click Results and verify that only data for the current year (1999 based on this data set) is
returned.
i. Check the query log. Notice that the logical request filters for the variable (you may need to
scroll to the right):
j. Close the log file.
204
To create Month time comparison measures using the Ago and ToDate
functions
Scenario
You use the Oracle BI Ago and ToDate functions to create new measures and
calculations to enable users to compare dollar performance a month ago and
calculate the dollar change, the percent of dollar change, and the to-date
dollar change. You then add the new measures to the presentation catalog,
and test the comparison measures using Answers.
Outcome
In the Presentation layer, Month Ago Dollars, Change Month Ago Dollars,
Percent Change Month Ago Dollars, Month To Date Dollars columns are
added to the SalesFacts table.
New time comparison measures are tested using Oracle BI Answers.
Time
15 minutes
Background:
The ability to compare business performance with previous time periods is fundamental to
understanding a business. Yet, as Ralph Kimball states, SQL was not designed to make
comparisons over time straightforward:
The most difficult area of data warehousing is the translation of simple business analyses into
SQL. SQL was not designed with business reports in mind. SQL was really an interim language
designed to allow relational table semantics to be expressed in a convenient and accessible form,
and to enable researchers and early developers to proceed with building the first relational
systems in the mid-1970s. How else can you explain the fact that there is no direct way in SQL
to compare this year to last year? Ralph Kimball
Instructions:
1. Return to the ABC repository open in online mode.
2. In the SupplierSales business model, identify the PeriodsDim dimension as a time dimension.
a. In the SupplierSales business model, double-click PeriodsDim.
b. Select the Time Dimension check box.
c. Click OK to close the Dimension dialog box.
Oracle BI Server Administrator 10g: Build Repositories
205
d.
e.
f.
g.
h.
i.
207
8. Set the sort order column for the Month logical column.
a. Expand the Periods logical table.
b. Double-click Month to open the logical column dialog box.
c. Click the Set button.
d. Select MonthCode and click OK. The Month column is now automatically sorted by
MonthCode whenever it is used in an Answers query. You verify this later in this practice.
e. Click OK to close the logical column dialog box.
9. Check in changes.
10. Check consistency. Fix any errors or warnings before proceeding.
11. Close the Consistency Check Manager.
12. Save and the repository.
13. Verify your work in Answers.
a. Return to Answers.
b. Reload server metadata.
c. Create the following query and filter:
Please note: Use Ctrl+click to add the Year filter or remove Year from the query criteria
after the filter is set.
d. Click Results.
e. Notice that Month is sorted automatically based on the MonthCode sort order column you
set in the repository.
Oracle BI Server Administrator 10g: Build Repositories
209
To set up user access so that Oracle BI Server can authenticate users and
assign them appropriate permissions
Scenario
You can maintain a list of users, their passwords, and groups in the Oracle BI
repository. When using Oracle BI security, which is the default, Oracle BI
Server authenticates users against this list. In this practice, you create new
users and groups using the Oracle BI Administration Tool. Once you have
created these users, you assign them to the appropriate group.
Time
1015 minutes
Instructions:
1. Return to the ABC repository open in online mode.
2. Create the user Sara Wright.
a. Select Manage > Security to open the Security Manager.
b. Select Users in the left pane.
c. Right-click in the white space of the right pane and select New User.
d. Create the user with the following information:
User name
SWRIGHT
Full Name
Sara Wright
Password
<Blank>
Logging level
Note that setting the logging level to 2 ensures that query activity by this user is recorded in
the query log.
e. Click OK to close the User window.
3. Repeat this process and create the following users:
User Name
Full Name
Logging Level
PSMITH
Paul Smith
RMIND
Rob Mind
JCRAFT
Jen Craft
MWEST
Mary West
JMEYER
Jacob Meyer
211
4. In the Security Manager window, verify that your results resemble the following:
5. Create the SalesManagers group and add Sara Wright and Paul Smith to this group. A group is a
set of permissions. When a user belongs to a group, the user inherits the permissions of the
group. Groups can belong to other groups and therefore inherit the permissions of other groups.
a. In the left pane of the Security Manager, select Groups.
b. Right-click in the right pane and select New Security Group.
c. Enter SalesManagers in the Name field and click the Add button.
d. Use CTRL+click to select SWRIGHT and PSMITH.
e. Click OK. Wright and Smith are now part of the SalesManagers group.
f. Click OK to close the Group dialog box.
6. Repeat this process and create the following two groups and assign users to the groups:
Group Name
Add User
SalesUsers
RMIND, JCRAFT
SalesHR
JMEYER
7. Assign MWEST to the Administrators group. One user, Administrator, and one group,
Administrators, are created automatically when a repository is created. The Administrator user
belongs automatically to the Administrators group. The Administrator user cannot be deleted,
nor can it be removed from the Administrators group. Additional users can be added to the
Administrators group. All members of the Administrators group can fully administer a
repository.
a. Double-click Administrators.
b. Add MWEST.
c. At this point, the group and user structure resembles the following:
SalesManagers Group
SalesUsers Group
SalesHR Group
Administrators Group
SWRIGHT
RMIND
JMEYER
Administrator
PSMITH
JCRAFT
MWEST
212
9. In this step, you set repository object permissions for a user, Jacob Meyer. Jacob Meyer should
not be given access to the SupplierSales presentation catalog. Use the Administration Tool to
explicitly prohibit Meyers access to this object.
a. In the Presentation layer, double-click SupplierSales.
b. Select the General tab.
c. Click the Permissions button.
d. Notice that by default Everyone has read permission for this object.
e. Click Show all users/groups.
f. Click the JMEYER check box twice. The red X indicates that Meyer does not have access to
the SupplierSales presentation catalog.
213
13. With your changes now saved, log in as the new users and examine the impact of the permissions
you set.
a. Return to Answers, log out, and then log back in as MWEST, no password.
b. Click the Dashboards link and make sure you can see Welcome, Mary West! to verify that
you are logged in as Mary.
c. Click the Answers link.
d. What subject areas are available to Mary?
e. Click the SupplierSales link and notice that Mary has access to all the same objects as the
Administrator user: Customers, Periods, Products, Facts, SalesFacts, and so forth.
f. Click Log Out in the upper-right corner.
g. Click the here link to log back in.
h. Log in as JMEYER, no password.
i. Does the SupplierSales subject area display?
j. Why is this?
214
d. Close the NQSConfig.ini file without making any changes. This default permission could be
set to READ or NONE. When the default is set to NONE and a new object is created, the
permission for Everyone looks like this:
Oracle recommends that the default permission be set to READ, so you are leaving
DEFAULT_PRIVILEGES set to READ. If you had changed the default for
DEFAULT_PRIVILEGES, it would only impact new objects after the NQSConfig.ini file
was saved and Oracle BI Server was restarted. The status of permission for Everyone in
existing objects would not be affected.
215
9.h.
13.d.
13.i.
13.j.
Why is this?
The SupplierSales subject area does not appear because you explicitly denied read access
to JMEYER.
216
Scenario
You first modify explicit permissions for Jacob Meyer. You then modify the
permission of the group that Jacob Meyer is a member of and examine the
affect this has on Jacob Meyer. Lastly, you add Jacob Meyer to another group
and examine how this affects his access.
Outcome
Time
1015 minutes
Instructions:
1. In this step, you modify user and group permissions for the SupplierSales presentation catalog.
a. Return to the ABC repository, double-click the SupplierSales presentation catalog, and click
the Permissions button.
b. Select Show all users/groups.
c. Define permissions so that JMEYER is deselected and the SalesHR group is explicitly denied
access to the SupplierSales presentation catalog. Your results should resemble the following:
d. Now that you have removed JMEYERs explicit access restrictions from the SupplierSales
presentation catalog, is he able to execute query requests against it in Answers? Explain.
217
e. Select the SalesManagers group check box to explicitly give it Read permission for the
SupplierSales presentation catalog.
SalesUsers Group
Administrators Group
RMIND
Administrator
JCRAFT
MWEST
SalesUsers Group
Administrators Group
RMIND
Administrator
JCRAFT
MWEST
219
Now that you have removed JMEYERs explicit access restrictions from the SupplierSales
presentation catalog, is he able to execute query requests against it in Answers? Explain.
No, JMEYER is a member of the SalesHR group, which was explicitly denied.
5.
With the changes you have made thus far, will JMEYER be able to access the
SupplierSales data?
No
6.e.
6.f.
10.b.
10.c.
220
Scenario
You can choose to maintain lists of users and their passwords in an external
database rather than in the repository. An external database table consisting
of user login information has been provided for you so that you can import this
information into the repository and use it to authenticate users during login.
The table contains a list of users, their logins and passwords, and the group
they belong to. Optionally, the table could also contain the logging level for
each user, Web interface information, and the names of specific database
catalogs or schemas to use for each user when querying data. After this
information has successfully been imported, you need to create an
initialization block that will retrieve this data.
Outcome
Time
1520 minutes
Instructions:
1. Attempt to log in to Oracle BI as AJOHNSON, with password aj. Click No if prompted to
remember password. You receive a message that an invalid user name or password was entered.
At the conclusion of this practice, you should be able to log in as AJOHNSON.
2. Return to the ABC repository open in online mode.
3. Import the SECURITYTABLE table into Physical layer.
a. Select File > Import > from Database.
b. Select the ORCL ODBC data source.
c. Enter SUPPLIER2 as the username and password and click OK. The Import dialog box
opens. This may take a few moments.
d. Expand the SUPPLIER2 schema and select SECURITYTABLE.
e. Click Import.
f. When import completes, close the Import dialog box.
g. Verify that SECURITYTABLE is added to SUPPLIER2 in the Physical layer.
h. Check in changes.
221
i. Right-click SECURITYTABLE and select View Data to see the data stored in the table:
Note that each user listed in this table is a member of the SalesRep group, except for Alan
Ziff, who belongs to the Sales Admin group, and User Two, who belongs to the users2 group.
You already created SalesRep as a group in an earlier practice. Using a table of users in an
external database allows you to maintain a single list of users for multiple repositories.
Although the groups must be entered into the Administration Tool manually, it is easier to set
up 100 groups than it is to set up 50,000 separate users.
j. Close the View Data window.
4. Create an initialization block. This initialization block will populate session variables with data
values returned by querying the database each time a user logs in.
a. Select Manage > Variables.
b. In the left pane, select Session > Initialization Blocks.
c. In the right pane, right-click and select New Initialization Block.
d. In the Name field, type Security.
e. Click Edit Data Source.
f. In the Default Initialization String field, create an initialization string that populates group,
user name, password, and log level variables. You define the variables in a later step. The
values returned by the database are assigned to the variables you define. These variables are
used to authenticate a user during login. Enter the following into the Initialization string
field:
222
Click Browse.
Double-click the SUPPLIER CP connection pool to select it.
Click OK to close the Session Variable Initialization Block Data Source dialog box.
Verify that your initialization block now looks like this:
5. Create the variables. Because you requested data for four variables in the string, you need to
define each variable. The variables are GROUP, DISPLAYNAME, USER, and LOGLEVEL.
a. Click Edit Data Target.
b. Click New.
c. Enter GROUP in the Name field.
d. Click OK.
e. Click Yes to acknowledge that this variable has a special purpose.
f. Repeat the process for the remaining three variables. The order of the variables is important.
You must list variables in the same order as the columns in the SQL statement. In this
example, the value in the GRP column is assigned to the GROUP variable, the value in the
SALESREP column is assigned to the DISPLAYNAME variable, USERNAME is assigned
to the USER variable, and the LOGLEVEL variable is given the value of 2.
g. Check your work:
h. Click OK to close the Session Variable Initialization Block Variable Target dialog box.
i. Click OK to close the Session Variable Initialization Block dialog box.
j. Close the Security Manager.
Oracle BI Server Administrator 10g: Build Repositories
223
6. Check in changes.
7. Save the repository.
8. Verify your work.
a. Return to Oracle BI and log in as AJOHNSON, with password aj.
b. Click the Dashboards link.
c. Verify that the greeting Welcome, ANN JOHNSON! appears to the left of the Dashboards
link. This confirms that the external database was used to authenticate a user during login.
d. Log out of Oracle BI.
224
Scenario
Time
1520 minutes
Instructions:
1. Return to the ABC repository open in online mode.
2. Create a new database in the Physical layer.
a. Right-click inside the Physical layer and select New Database. The Database dialog box
opens.
b. Name the database Authenticate.
c. Set the Database to Oracle 10gR1.
d. Click the Connection Pools tab.
e. Click Add.
f. Name the Connection Pool Authenticate CP.
g. Verify that the call interface is set to Default (OCI 10g).
h. Enter :USER in the User name field.
i. Enter :PASSWORD in the Password field.
225
k.
l.
m.
n.
227
b.
c.
d.
e.
Navigate to E:\OracleBI\Server\Config.
Open NQSConfig.ini.
Scroll to the SECURITY section.
Comment out the second authentication option, AUTHENTICATION_TYPE =
DATABASE, by adding preceding # signs.
f. Change DATABASE from Authenticate to some_data_base.
g. Save and close the file. Note that external database table authentication (covered in the
previous practice) can coexist with database authentication (covered in this practice).
External database authentication precedes database authentication. If the external database
table authentication succeeds, then the server does not do database authentication. If external
database table authentication fails, then the server performs database authentication.
228
To disallow queries that may consume too much of the system resources by
setting query limits
Scenario
You want to prevent queries from consuming too many resources by limiting
how long a query can run and how many rows a query can retrieve. You also
want to regulate when individual users can query databases to prevent users
from querying when system resources are tied up with batch reporting, table
updates, or other production tasks.
Outcome
Set the maximum rows of any query to five rows, the maximum time of any
query to 1 minute, and restrict access to a database on Sunday from 12:00
a.m. to 7:00 a.m.
Time
1015 minutes
Instructions:
1. Start the Oracle BI Server service and open the ABC repository in online mode. Log in as
Administrator with password Administrator.
2. Disallow queries that may consume too many system resources by setting query limits for the
SalesManagers group.
a. Open the Security Manager.
b. Double-click the SalesManagers group.
c. Click the Permissions button.
d. Click the Query Limits tab.
e. Locate the ORCL database and change its Max Rows value to 5. This specifies the
maximum number of rows each query can retrieve from the ORCL database for members of
this SalesManagers group.
f. In the Status Max Rows column, select Enable from the drop-down list.
g. In the Max Time (Minutes) column, change the value to 1. This specifies the maximum time
a query can run on the ORCL database.
h. In the Status Max Time column, select Enable from the drop-down list.
3. Restrict the time period that users can access specified repository resources from midnight
Sunday to 7:00 a.m. Sunday:
a. Click the button
in the Restrict column of the ORCL database.
Oracle BI Server Administrator 10g: Build Repositories
229
b. Highlight the blocks from Sunday at midnight to 7 AM Sunday. Hint: With the first block
selected press the SHIFT key and select the 7 AM block, or click the first box and drag to
the 7 AM block.
c. Click Disallow.
d.
e.
f.
g.
h.
i.
If a time period is not highlighted, access rights remain unchanged. If access is allowed or
disallowed explicitly to one or more groups, the user is granted the least restrictive access for
the time periods that are defined.
Click OK to close the Restrictions dialog box.
Click OK to close the User/Group Permissions dialog box.
Click OK to close the Group dialog box.
Close Security Manager.
Check in the changes.
Save the repository.
4. Log in to Oracle BI as Administrator and register your changes on the server by reloading the
server metadata.
5. Verify that the changes you made to the maximum number of rows allowed per query work
correctly.
a. Log in to Oracle BI as JMEYER with no password. Recall that JMEYER is a member of the
SalesManagers group.
b. If necessary, click the Answers link.
c. Click the SupplierSales subject area.
d. Select Customers.Customer, SalesFacts.Dollars and click Results.
e. Did the results of the query display?
230
f. Expand Error Details to view message. What does the error message state?
j. Why is this?
231
5.f.
Expand Error Details to view message. What does the error message state?
A general error has occurred. The user request exceeded the maximum query governing
rows from the database.
5.i.
5.j.
Why it this?
Because the query returned only five rows, which does not exceed the maximum query
restricting rows from the database.
8.e.
232
To set up filters to personalize the information a user gets when the user
enters a query
Scenario
ABC decided that its customers would value the ability to analyze their own
purchase records using Oracle BI. However, ABC wants each customer to be
able to analyze only his or her own information, not all customers information.
In this practice, you set a filter so that the management of the Rib Pit
restaurant can analyze its purchases from ABC. ABC also wants to set up a
filter so that members of the SalesUsers group see only the data that pertains
to them.
Outcome
The management of the Rib Pit restaurant is able to analyze its own purchase
records using Oracle BI. Members of the SalesUsers group see only data that
pertains to them.
Time
1015 minutes
Instructions:
1. Return to the ABC repository open in online mode.
2. Create a new user and set a filter.
a. Open the Security Manager and create a new user named Rib Pit, no password, with logging
level set to 2.
b. Click the Permissions button.
c. Click the Filters tab.
d. Click Add.
e. In the left pane, expand SupplierSales and double-click the Customers presentation folder
to add it to the Filters tab.
f. Click the ellipsis button to open the Expression Builder. You may need to scroll to the right.
233
i.
j.
k.
l.
m.
d. Click Results.
234
for the Rib Pit user. Note that the filter is applied in the WHERE clause.
h. Check the query log. Notice that no filter is applied because there are no references to any
attributes in the Customers folder.
235
e. Click Add.
f. In the left pane, expand SupplierSales and double-click the -SalesFacts presentation folder
to add it to the Filters tab.
g. Click the ellipsis button to open the Expression Builder.
h. Set the following filter: "SupplierSales"."Customers"."Customer" = 'Rib Pit'
i. Click OK. The Filters tab for Rib Pit now contains two filters:
j.
k.
l.
m.
n.
c. Check the query log. Notice that this time the Name = Rib Pit filter is applied to the
results. Only sales facts data that applies to Rib Pit is returned.
a.
b.
c.
d.
e.
f.
i. Click OK to close the Expression Builder. The filter is added to the Filters tab.
j.
k.
l.
m.
n.
237
d. Click Results. Notice that the results are automatically personalized for Tracie Bell.
e. Check the query log. Recall that you set the system session variable LOGLEVEL to 2 when
you created the initialization block SQL, so the query is logged. Note that the WHERE
clause filters for SALESREP = TRACIE BELL.
238
To create a query request and inspect cache entries using the Cache Manager
Scenario
You create a request in Answers and verify that a cache entry was created in
the Cache Manager and that a cache file was created. You create the same
request again and verify that the results were fulfilled by the cache and not the
database.
Time
1520 minutes
Instructions:
1. Close the ABC repository.
2. Stop the Oracle BI Server service.
3. Enable the cache parameter in the NQSConfig.ini file.
a. Navigate to E:\OracleBI\server\Config.
b. Open NQSConfig.ini.
c. Locate the CACHE section and set the ENABLE parameter to YES.
239
d. Click Results.
j. Do you think that the results for the query you created were satisfied from an existing cache
entry or were returned directly from the database?
c. Do you think the request was satisfied by the database or by a cache? Explain.
241
b. Verify that you see a Cache Hit on query entry for the query initiated by JMEYER.
c. Notice that the log identifies who created the cache entry: MWEST.
d. Close the log file.
e. Log out of Oracle BI.
11. In response to JMEYERs request, determine if a new cache entry was made in the Cache
Manager and filed in the Cache directory. If a new entry was made in the Cache Manager and
filed in the directory, then an existing cache was not used to satisfy his request.
a. Return to the ABC repository and open the Cache Manager.
b. Are there any entries listed with JMEYER as the user?
c. Has the Last used date for MWESTs cache entry changed? Explain.
242
By inspecting the SQL, can you determine if this is the cache that represents the query you
just created?
Yes, the listed objects correspond to the columns selected for the request. These objects
were also selected from the SupplierSales subject area as indicated from the SQL.
7.h.
With this entry still selected, scroll to the Created and Last used columns. Are the values
for these fields the same?
Yes
7.j.
Do you think that the results for the query you created were satisfied from an existing
cache or were returned directly from the database?
Results for this query were returned directly from the database. Because both Created time
and Last Used time are the same, this is the first time this query has been requested. Thus,
no cache file existed for this query until now.
9.c.
Do you think the request was satisfied by the database or by a cache? Explain.
JMEYERs query was fulfilled by the cache that resulted from MWESTs query earlier.
Because JMEYERs request was identical to the cache, the server used the cache (cache
hit) instead of processing against the database.
11.b.
11.c.
Has the Last used date for MWESTs cache entry changed? Explain.
Yes, because JMEYERs query used this cache to satisfy his request and the last used date
was updated to reflect this.
243
Scenario
You use the Cache Manager to inspect the cache parameters. You then
modify the number of rows per cache as well as the number of cache entries
allowed. In addition to modifying cache parameters, you make certain tables
non-cacheable.
Outcome
Time
1015 minutes
Instructions:
1. What are some advantages of using a caching system for requests?
2. True or false: There is a list of criteria that can qualify a cache hit. If all but one of these
conditions is met, a cache hit will not occur.
5. If you wanted to store cache files in a different location, where would you need to indicate this?
244
g. Click OK.
h. Close the Cache Manager.
i. Close the repository.
7. Decrease the number of rows per cache as well as the number of cache entries allowed.
a. Stop the Oracle BI Server service.
b. Navigate to E:\OracleBI\server\Config.
c. Open NQSConfig.ini.
d. Locate the CACHE section.
e. Modify as follows:
MAX_ROWS_PER_CACHE_ENTRY = 150000
MAX_CACHE_ENTRIES = 9000
f. Save the changes and close the file.
8. Validate your changes in the Administration Tool.
a. Start the Oracle BI Server service.
b. Open the ABC repository in online mode.
c. Select Manage > Cache.
d. Select Action > Show Info and verify that changes are applied. Your results should resemble
the following:
245
e. Click OK.
f. Close the Cache Manager.
9. Make certain tables non-cacheable, meaning that if a request is made against them, there are no
cache entries.
a. In the Physical layer, double-click the ORCL.SUPPLIER2.D1_CUSTOMER2 table.
b. Click the General tab.
c. Deselect the Cacheable check box.
d. Click OK.
e. Repeat this process for the D1_ORDERS2 table.
f. Check in changes and save the repository. You do not need to check consistency.
10. Test your work.
a. Log in to Oracle BI as JMEYER, no password.
b. Create the following request using columns from the SupplierSales subject area:
c.
d.
e.
f.
Click Results.
Log out of Oracle BI.
Return to the Administration Tool and open the Cache Manager.
Do you see an entry for the request you just created?
c. Click Results.
d. Log out of Oracle BI.
e. Return to the Administration Tool and open the Cache Manager.
246
f. Verify there is a new entry for the request you just created.
d. Click OK.
e. Verify the changes in the Cache Manager.
247
b.
c.
d.
e.
f.
g.
h.
i.
j.
248
2.
True or false: There is a list of criteria that can qualify a cache hit. If all but one of these
conditions is met, a cache hit will not occur.
True
3.
4.
5.
If you wanted to store cache files in a different location, where would you need to indicate
this?
To define the location of where cache files are stored, you would need to indicate this in
the NQSConfig.INI file, in the Cache Section.
6.d.
6.e.
6.f.
10.f.
249
Scenario
Time
1015 minutes
Instructions:
1. Modify two users, MWEST and JMEYER, to give them administrative privileges so they can act
as developers. As a security precaution, reset their passwords so they need to communicate with
you before commencing with development.
a. Close the ABC repository open in online mode.
b. Stop the Oracle BI Server service.
c. Open the ABC repository in offline mode as Administrator, with password Administrator.
d. Select Manage > Security.
e. Select Groups in the left pane.
f. Double-click Administrators. Administrator and MWEST are already members of the
Administrators group.
g. Click Add.
h. Select JMEYER.
i. Click OK.
j. Click OK to close the Group Administrators window.
k. Select Users in the left pane.
l. Double-click MWEST.
m. In the User dialog box, enter MWEST in the Password and Confirm Password fields.
n. Click OK.
o. Double-click JMEYER.
p. In the User dialog box, enter JMEYER in the Password and Confirm Password fields.
q. Click OK.
r. Select Action > Close to close the Security Manager window.
s. Save the repository. It is not necessary to check consistency.
2. Verify that only one user can modify the repository at a time.
a. Select Start > Programs > Oracle Business Intelligence > Administration to open a second
instance of the Oracle BI Administration Tool.
b. Select File > Open > Offline.
c. Select the ABC repository.
Oracle BI Server Administrator 10g: Build Repositories
251
d. Click Open. Note that you can only open the file as read-only. This is because multi-user
development has not been set up, so only one user can edit the repository at a time.
e. Click No.
f. Select File > Exit to close this instance of the Oracle BI Administration Tool.
3. In this step, you create projects in the master repository. After you have copied the master
repository to a shared directory, it is no longer used for development, so it can be used as a
backup. Creating the original set of projects in the master repository allows you to see exactly
what changes were made after multi-user development is established by comparing the shared
repository to the original master. Normally, you create projects to contain all of the presentation
catalogs in the repository, broken down in a reasonable manner. In this practice, you create only
two projects.
a. Select Manage > Projects. The Project Manager window is displayed.
b. Select Action > New Project.
c. Enter Inventory Fact Table Project as the name.
d. Expand Catalogs in the left pane.
e. Expand Inventory.
f. Select Inventory.Inventory Facts.
g. Click Add. Notice that a Catalogs folder appears in the right pane.
h. Expand Catalogs in the right pane. Notice that the Inventory presentation catalog is
automatically included in the project.
i. Expand Inventory in the right pane. Verify that Inventory.Inventory Facts has been
included in this project as well.
j. Expand the Users folder in the left pane.
k. Use Ctrl+click to select Administrator, MWEST, and JMEYER.
l. Click Add. A Users folder is added to the right pane.
m. Expand the Users folder in the right pane and verify that the three users are added to the
project.
n. Check your work:
252
i. Click OK to save the project and close the Project window. Your Project Manager should
look as follows:
253
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.
6. Set the multi-user directory in the Oracle BI Administration Tool to point to the shared
repository you just created.
a. In the Oracle BI Administration Tool, select Tools > Options.
b. Click the Multiuser tab.
c. Click Browse next to the Multi-user development directory field.
d. Browse to select E:\RPD.
e. In the Full Name field, enter Mary West.
f. Click OK to close the Options dialog box.
g. Select File > Close to close the ABC.rpd repository. You are ready to perform multi-user
development.
254
Scenario
Two users, MWEST and JMEYER, work in the multi-user development environment
and modify the same project simultaneously.
Time
2030 minutes
Instructions:
1. Connect to the shared repository and check out the Inventory Project as MWEST.
a. In the Oracle BI Administration Tool, select File > Multi-User > Checkout. The Extract
from SharedABC.rpd dialog box opens.
b. Enter MWEST as user name and password.
c. Click OK.
d. Note that the two projects you created are listed.
e. Check Inventory Project and click OK. The New Repository dialog box opens.
f. Change the file name to MWEST.rpd. Notice that this repository file is being saved to the
default repository directory and not the shared repository directory you created earlier.
Notice also that a copy of the shared master repository, SharedABC.rpd, has been copied to
the default repository directory.
g. Click Save. The Inventory Project repository is displayed. Notice that it only contains the
Inventory presentation catalog and business model. The other presentation catalogs and
business models are not shown.
2. Review the files that were created or modified by the checkout process.
a. Using Windows Explorer, navigate to E:\RPD. What new files appear?
255
3. As JMEYER, check out the same Inventory project using a second instance of the Oracle BI
Administration Tool. This demonstrates that multiple users can work with the same repository at
the same time, and that multiple users can work with the same project at the same time.
a. Select Start > Programs > Oracle Business Intelligence > Administration.
b. Select File > Multiuser > Checkout. The Extract from ShareABC.rpd dialog box opens.
c. Enter JMEYER as user name and password.
d. Click OK. Notice that both projects are still shown. There is no indication that MWEST has
the Inventory Project open. This is an intentional feature of the product: a single project can
be worked on by multiple developers, and changes are merged during the check-in process.
e. Check the check box next to Inventory Project.
f. Click OK.
g. Enter JMEYER.rpd as the file name.
h. Click Save. The Inventory Project is now being worked on by two developers at the same
time.
i. Navigate to E:\OracleBI\server\Repository and notice that a set of JMEYER files has been
added.
4. Modify the project as MWEST and check it in to understand the check-in process.
a. Return to the Administration Tool that has MWEST.rpd open. The repository name is
displayed in the title bar of the application.
b. In the Presentation layer, expand Inventory, right-click Regions and select Delete. This is an
obvious change that will be easy to track.
c. Click Yes to confirm the deletion.
d. Save the repository. Do not perform a global consistency check.
e. Select File > Multiuser > Merge Local Changes. This will merge your changes to the shared
repository. A Lock Information window is displayed. The shared repository will be locked
until check-in is complete.
f. Accept the default values shown and click OK. The Merge Repositories dialog box appears.
Do not click Merge yet. Note that you first merge your modified project repository with the
original copy of the project repository in the default repository directory.
g. Examine the effects of locking the repository.
i.
In Windows Explorer, navigate to E:\RPD. What additional files appear?
ii.
5. Switch to the Oracle BI Administration Tool with the JMEYER.rpd open and attempt to merge
local changes.
256
a. Select File > Multi-User > Merge Local Changes. An error message appears.
No one else can check in projects while the shared repository is locked. In this instance, you
are trying to check in the same project using the same Windows user name, so you are
informed that you are already checking in this project.
b. Click OK to close the error message.
6. Return to the Oracle BI Administration Tool where the check-in is being performed for the
MWEST.rpd and complete the merge.
a. Verify that the original subset is E:\OracleBI\server\Repository\originalMWEST.rpd.
b. Verify that the modified subset is E:\OracleBI\server\Repository\MWEST.rpd.
c. Because no changes were made to the shared repository while you had your project checked
out, your only options are to merge your changes or examine the merge statistics.
d. Click Stats. A summary of the number of changes is shown. One object was deleted from the
modified subset.
e. Click Close.
f. Click Merge.
g. Click No when prompted to check global consistency. At this point, the changes are merged
to the local copy of the SharedABC repository and the local copy is opened. The changes
have not yet been published to the shared master repository.
h. Navigate to E:\OracleBI\server\Repository. Notice there is a new file there named
SharedABC.merge_log.csv. This is a comma separated values file listing the changes made
to the repository in the merge.
i. Double-click SharedABC.merge_log.csv to open it using Microsoft Excel and verify the
changes.
257
k. Return to the Administration Tool with SharedABC.rpd open and verify that the Regions
presentation table no longer appears in the Inventory presentation catalog.
l. Save the modified SharedABC repository. Do not check for global consistency.
m. Select File > Close to close the repository. A warning appears indicating that you are closing
a MUD repository without publishing or discarding your local changes, so the lock on the
repository has not been released. At this point, you have the option to publish the repository
(copy the local copy of the shared repository to the server), discard the local changes, or
close the repository and keep the lock.
n. Click Cancel.
o. Select File > Multiuser > Publish to Network. The local copy of the shared repository is
merged with the shared repository and then closed and deleted.
p. Select File > Multiuser > History.
q. Log in as Administrator with the password Administrator.
r. Version 1 of SharedABC repository is opened and the history of changes is displayed.
258
s. Right-click the entry and select View > Details. The event details for the project are
displayed:
t.
u.
v.
w.
x.
y.
z.
aa.
259
f. Select the listing to highlight it and then click the ellipsis button
deleted from the Current repository.
g. Click Cancel.
h. In the bottom panels the original JMEYER project, the modified JMEYER project, and
current SharedABC repository are shown. The differences between the projects are
displayed. In this case, the original and modified repositories have a Regions presentation
table that is not in the current shared repository. At this point, a decision must be made about
how to proceed with the merge.
i. In the Decision column for the highlighted listing, choose Modified (A) from the drop-down
list (it may be necessary to scroll to the right). This chooses the modified repository over the
current repository, thereby rejecting the changes of the other developer, and restoring the
260
j.
k.
l.
m.
n.
Click Merge.
Click No when prompted to check global consistency.
Verify that Regions now appears in the Inventory presentation catalog.
Select File > Multiuser > Publish to Network to publish the repository.
Click No when prompted to check global consistency. The local shared repository is merged
to the master shared repository.
261
o. Open E:\RPD\SharedABC.rpd in read only mode and verify that the changes were applied to
the shared repository and that Regions now appears in the Inventory presentation catalog.
262
2.b.
4.g.i.
4.g.ii.
263
To provide an orientation to additional Administration Tool features that are useful for
maintaining and enhancing repositories
Scenario
In the process of building the SupplierSales and Inventory business models, you have
had a chance to interact with a number of features of the Administration Tool. In this
practice, you are introduced to some additional Administration Tool features, which
can aid in the development, maintenance, and administration of repositories.
Time
1520 minutes
Instructions:
1. Start the Oracle BI Server service and open the ABC repository in online mode.
2. Explore the Joins Manager, which allows you to examine, edit, and delete all the joins, both
physical and logical, in a repository.
a. Select Manage > Joins. The Joins Manager opens. The joins displayed in the right pane vary
according to what leaf you select in the left pane. You can view all joins in the repository, all
joins in a particular business model, all joins in the Business Model and Mapping layer, all
joins in the Physical layer, all joins in the Business Model and Mapping layer for a particular
business model, and all joins in the Physical layer for a particular business model. Joins are
further divided into logical foreign key, logical, physical foreign key, and physical complex.
b. In the left pane, select SupplierSales > Physical > Physical Foreign Key Joins to see all
physical foreign key joins in the Physical layer for the SupplierSales business model. The
Joins Manager displays the join name, the tables in the join, and the join expression.
c. Click any column heading to sort the joins by that column.
d. Right-click any join in the list and select Properties to open the join properties dialog box. If
desired, you could edit the join properties using this dialog box.
e. Click Cancel to close the dialog box.
f. Select SupplierSales > Business Model and Mapping > Logical Join to display the logical
joins in SupplierSales business model.
g. Select Action > New and note that you can create new joins using the Joins Manager. This
feature is typically not used very much, because most users tend to create joins with the
physical or logical diagrams, as you have done in this course.
h. Close the Joins Manager.
3. Explore the Sessions Manager, which shows all users logged into the session, all current query
requests for each user, and variables and their values for a selected session.
a. Select Manage > Sessions to open the Session Manager. Assuming you are logged out of all
prior sessions of Oracle BI, you should see only your Administrator user session, which is
the ABC repository open in online mode. Note that the Session Manager displays a session
Oracle BI Server Administrator 10g: Build Repositories
265
ID, user, client type, repository logical name, logon time, and last active time.
b. Log in to Oracle BI as MWEST with password MWEST and create and run a request.
c. Return to the Session Manager. Note the new entry for MWEST.
266
h. Open the query log. Note that the query log identifies the user, the session ID and request ID,
and the date and time of the request.
267
h. In the left pane of the Select dialog box, select the Business Model tab at the bottom of the
pane.
i. Expand SupplierSales and double-click Periods to select it. This allows you to use the
Query Repository utility to find columns in the Presentation layer that map to the Periods
table in the Business Model and Mapping layer.
j. Click OK to close the Query Repository Filter dialog box and check your results:
269
m. Double-click one of the Day columns, or select Day and click the Edit button, to view or edit
the object properties.
270
v. Click the Query button to execute the query. Click Yes to proceed.
w. Click Show Qualified Name to display the fully qualified names of the objects. Note that the
icons help to identify if the objects are tables, keys, aggregated columns, dimension levels,
and so forth.
x. Click Save Query As and save the query as Month.
y. In the Name field, enter Date* and click Query.
z. Click Saved Queries.
aa. Select the Month query you saved in a prior step.
bb. Click Query to view the results.
cc. Select any object and click Go To to jump to the object in the repository.
dd. Expand the SupplierSales business model, right-click the Periods logical table and select
Display Related > Presentation Column to see another method for opening the Query
Repository utility and displaying results.
ee. Close the Query Repository utility.
ff. Check in changes and save the repository.
271
5. Explore the Replace Column or Table in Logical Table Sources utility. As its name suggests,
this utility is for changing the column or table references in logical table sources. For example,
suppose you have created a repository with several logical table sources, with logical columns
that have formulas mapped to physical table and column names. If you want to substitute a
different column or table in the source, this utility provides a way to quickly change all the
references to the source tables. It is often used after duplicating an existing logical table source in
order to add a new physical source (for example, a fragment) efficiently with the objective of reusing all the formulas in the logical table source.
a. In the Business Model and Mapping layer, expand Inventory > Inventory Facts > Sources.
b. Double-click the INVENTORY_Q1_2004 logical table source.
c. Click the Column Mapping tab.
d. Note that the logical columns map to the INVENTORY_Q1_2004 physical table.
e. Click Cancel to close the Logical Table Source dialog box.
f. Select Tools > Utilities.
g. Select Replace Column or Table in Logical Table Sources and click Execute.
h. In the drop-down, select Replace whole table.
i. In the left panel, select ORCL > SUPPLIER2 > INVENTORY_Q1_2004.
j. In the right panel, select ORCL > SUPPLIER2 > INVENTORY_Q1_2005.
k. Click Next. The Wizard identifies which columns will be replaced. At this point you can add
or remove columns.
272
l. Click Next. The wizard identifies which tables and columns will be replaced.
m.
n.
o.
p.
Click Finish.
Double-click the INVENTORY_Q1_2004 logical table source.
Click the Column Mapping tab.
Verify that the logical columns now map to the INVENTORY_Q1_2005 physical table.
f. Click Save.
g. Enter Inventory for the file name and save in E:\OracleBI\server\Repository.
Oracle BI Server Administrator 10g: Build Repositories
273
h. Click Close.
i. Navigate to E:\OracleBI\server\Repository and open the Inventory.csv file
o. Click Finish.
p. Verify the changes in the repository.
274
8. Explore the Repository Documentation utility. This utility documents the mapping from the
presentation columns to the corresponding logical and physical columns. The documentation also
includes conditional expressions associated with the columns. The documentation can be saved
in comma-separated, tab-delimited, or XML format. If a presentation column derives from
several physical columns, there is one row in the document for each physical column.
a. Select Tools > Utilities> Repository Documentation and click Execute.
b. Accept the default location (Repository), name the file RpdDoc, and select Commaseparated values (*.csv) from the Save as type list.
c. Click Save.
d. Navigate to the Repository directory and examine the file.
e. Close the file and Excel.
9. Explore the Generate Metadata Dictionary utility. This utility provides a set of static XML
documents. Each document describes a metadata object, including its properties and its
relationships to other metadata objects. The utility provides a user-friendly interface for
navigating a repository to help users better understand metadata object relationships.
a. Close the ABC repository.
b. Stop the Oracle BI Server service.
c. Open the ABC repository in offline mode. You cannot generate the metadata dictionary in
Online mode.
d. Select Tools > Utilities > Generate Metadata Dictionary and click Execute.
e. In the Choose Directory dialog box, browse to D:\Inetpub\wwwroot and click OK.
f. Wait for a message that says Metadata dictionary has been successfully created under
D:\Inetpub\wwwroot\ABC and click OK.
g. Navigate to D:\Inetpub\wwwroot\ABC and verify that there is an ABC folder with the
following subfolders and files:
h. Open Internet Explorer and use the following URL to start the name index page:
http://<machine name>/ABC/NameIndex.xml.
i. The Name Index link organizes metadata objects by name.
Oracle BI Server Administrator 10g: Build Repositories
275
m. Click the Region presentation column link. The Region presentation column page displays
the object hierarchy, the logical column mapping, and permissions associated with this
object.
n. Click the Logical Column Mapping link to view column mappings for the Region
presentation column.
o. Continue to click links and explore the metadata dictionary.
p. Close the browser when you are done.
10. Explore Administration Tool options.
a. Return to the Administration Tool and select Tools > Options.
b. Click the General tab.
276
c. Tile when resizing automatically tiles the layer windows when you resize the Administration
Tool application. If you deselect this, the windows for the three layers can be resized
independently and have standard Windows controls, like buttons to minimize, maximize,
restore, and close the window.
d. Display qualified names in diagrams displays fully qualified names in the physical and
logical diagrams, making it easier to identify sources.
e. Display original name for alias in diagrams displays the original name in physical and
logical diagrams for any objects that have been modified.
f. Check out objects automatically checks out objects automatically in online mode whenever
the object properties are displayed.
g. Show row count in physical view displays row counts for objects in the physical diagram
and Physical layer.
h. The other options in the General tab are self-explanatory.
i. Click the Repository tab. Options here affect where objects are visible in the Administration
Tool interface. You can have tables and dimensions appear only in display folders. A display
folder is a user interface feature for organizing metadata objects. It is not a metadata object
itself. You can also choose to hide level-based measures in dimension hierarchies.
j. Click the Sort Objects tab. This determines which classes of metadata objects the tool will
present in alphabetically sorted order, as opposed to time-created order.
k. Click the Cache Manager tab. These are the same preferences you saw earlier in the lesson
on caching.
l. Click the More tab. This allows you to control the scrolling speed of the tool and set the
default diagram zoom.
m. Click the Multiuser tab. In an earlier lesson, you learned how to use this tab to identify the
directory holding the master repository for multi-user development.
n. Click OK to close the Options dialog box.
o. Close the repository.
p. Close the Administration Tool.
277
Scenario
One topic that often needs more clarification is level keys. Which attributes should be
level keys? How many level keys can a level have? What is a primary level key? What
does it mean to be a level key but not used for drilldown? How do the choices you
make affect SQL generation?
You have constructed the product dimension for Supplier Sales and added an
aggregate fact table, D1_ORDER_AGG1, which was at the product Type level of
aggregation. Both Type, a description, and Typecode, a number, are potential level
keys, because they both define unique product types. Which should be the level key?
Which should be the primary key of the level? Should Type, which maps to a column in
D1_PRODUCT_TYPE, be in its own logical table source or should it be included in the
existing logical table source for the Products logical table? In this practice, you
examine some options to help answer these questions.
Time
2030 minutes
Instructions:
1. Copy the LevelKeys repository to the Repository directory.
a. Stop the Oracle BI Server service.
b. Navigate to E:\Labs.
c. Copy LevelKeys.rpd and paste it into E:\OracleBI\server\Repository.
d. Open the LevelKeys repository in offline mode.
2. Case 1: In this step, you modify the repository to create conditions that reveal the behavior of
level keys. You then run a query in Answers, examine the log file, and draw conclusions about
this behavior.
a. In the SupplierSales business model, verify that D1_ORDER_AGG1 is added as a logical
source to the SalesFacts fact table.
b. Double-click D1_ORDER_AGG1, click the Content tab, and very that it is aggregated at
the SalesRep, Month, and Type levels.
c. Double-click D1_ORDERS2, click the Content tab, and very that it is aggregated at the
Customers Detail, Day, and Specific levels.
d. Double-click the D1_PRODUCTS logical table source for the Products logical table.
e. Click the Content tab.
f. Click the X next to the Logical Level to delete the level.
g. Click OK to close the Logical Table Source dialog box.
h. Delete the Type logical table source for the Products logical table.
i. Double-click the Type level in ProductsDim.
j. Set the primary key to Type Code.
Oracle BI Server Administrator 10g: Build Repositories
279
b. Examine the query log and note that the SQL used the aggregate fact table; there are
unnecessary tables in the FROM clause (a subset of tables in the D1_PRODUCTS logical
table source); the SQL group by clause includes Type Code (TYPECODE), the primary key
of the level.
280
e. Return to Answers, drill down on Type, and note that Type drills down to Subtype.
f. Create the following query and click Results:
g. Drill down on Typecode and note that Typecode also drills down to Subtype.
h. You can draw the following conclusions from these results:
The primary key of the level is automatically included in the SQL GROUP BY clause if
the dimensional grain of the query is at the same level. If the level of the query is above
the level of the source, then the primary key of the level is not included in the SQL
GROUP BY clause.
Drilling down from a level key, even the alternate key, drills down to the key marked for
drilldown in the next level, not to the primary key of the same level.
Extraneous tables connected by 1:N joins are included in the SQL if they exist in the
dimension table source.
The aggregation content does not need to be set in the aggregate dimension sources for
aggregate navigation to work.
4. Case 2: In this step, you modify the repository again to create different conditions that reveal the
behavior of level keys. You then run a query in Answers, examine the log file, and draw
conclusions about this behavior.
a. Open the LevelKeys repository in online mode.
b. Log in as Administrator, no password.
281
c. For the ProductsDim hierarchy, change the Type level primary key from Typecode to Type.
d.
e.
f.
g.
Check in Changes.
Click Yes to check consistency.
Save the repository.
Return to Answers, reload server metadata, and run the same query:
h. Open the query log and note that TYPECODE drops out of the GROUP BY clause, because
Type (ITEMTYPE) is now set as the primary key for the Type level:
282
j. Drill down on Type and note that the drilldown behavior is the same as in the previous steps.
Drill down is to Subtype.
5. Case 3: In this step, you further modify the repository to create different conditions that reveal
the behavior of level keys. You then run a query in Answers, examine the log file, and draw
conclusions about this behavior.
a. Return to the LevelKeys repository in online mode.
b. Add D1_PRODUCT_TYPE as a logical table source for the Products logical table. Recall
that D1_PRODUCT_TYPE is an aggregate dimension logical table source at the Type level.
c.
d.
e.
f.
g.
h.
i.
j.
k.
l.
m.
283
q. Note that the resulting SQL is an improvement over Case 2. As in Case 2, TYPECODE is not
in the GROUP BY clause and the extraneous tables drop out of the SQL. In this case, you
have a separate logical table source for ITEMTYPE.
r. Close the query log.
6. Case 4: This case is like case 3, except you add back D1_PRODUCT_TYPE to the detail source
and map Type Code and Type in this logical table source. You keep the aggregate dimension
source, D1_PRODUCT_TYPE, as well.
a. Return to the LevelKeys repository in online mode.
b. Double-click the D1_PRODUCTS logical table source for the Products logical table.
c. Click the Add button.
d. Double-click D1_PRODUCT_TYPE in the select panel to add it as a logical table source to
the Products table.
e. Click the Column Mapping tab.
f. Map both Type Code and Type to the corresponding columns TYPECODE and ITEMTYPE
in D1_PRODUCT_TYPE in the D1_PRODUCTS logical table source.
284
i.
j.
k.
l.
Check in changes.
Check consistency and verify that the repository is consistent.
Save the repository.
Return to Answers, reload server metadata, and run the same query:
m. Examine the query log. The result is that the SQL is unchanged from Case 3. TYPECODE is
not in the GROUP BY clause and the extraneous tables drop out of the SQL. In this case, you
have a separate logical table source, D1_PRODUCT_TYPE, for both Type (ITEMTYPE)
and Type Code (TYPECODE), but Type and Type Code are also mapped in the detail logical
table source, D1_PRODUCTS.
285
p. Examine the query log and notice that the physical SQL is the same as Case 2:
q. The difference is in the drilldown behavior. Create and run the following request:
r. Drill down on Type Code. The drilldown from Type Code now goes to Type, that is, from a
non-key attribute to the level key used for drilldown at the same level, instead of the key
marked for drilldown in the next level next level (Subtype in Case 1).
drills down to
8. Case 6: This illustrates drilldown behavior when drilling down to a level that has two level keys
and both have use for drilldown checked.
a. Return to the LevelKeys repository open in online mode.
b. Expand the ProductsDim dimension to the Subtype level.
c. Double-click the Subtype level.
d. Click the Keys tab.
e. Verify that Subtype is set as the primary level key.
f. Double-click the Subtype level key and confirm that use for drilldown is selected.
g. Double-click the Subtype Code level key and select use for drilldown.
h. Check in changes.
i. Check consistency.
j. Save the repository.
286
l. Drill down on Type. Note that the drilldown now goes from Type to the primary level key of
the next level, in this case, to Subtype. This is the case even though both level keys Subtype
and Subtype Code are marked for drilldown.
9. Case 7: This is the same as Case 6, except the primary level key of the Subtype level is changed
from Subtype to Subtype Code.
a. Return to the LevelKeys repository open in online mode.
b. Expand the ProductsDim dimension to the Subtype level.
c. Double-click the Subtype level.
d. Click the Keys tab.
e. Set Subtype Code as the primary level key.
f. Check in changes.
g. Check consistency.
h. Save the repository.
i. Reload server metadata and run the same query:
287
j. Drill down on Type. Note that the drilldown now goes from Type to the primary level key of
the next level. In this case, to Subtype Code.
10. Case 8: This is the same as Case 7, except that aggregation content is set for the dimension table
aggregate sources and aggregation content is deleted for the fact table aggregate source.
a. Return to the LevelKeys repository open in online mode.
b. Double-click the D1_ORDER_AGG1 fact table aggregate source.
c. Click the Content tab.
d. Delete the logical levels.
e. Add back D1_PRODUCT_TYPE as an aggregate logical table source for the Products table.
f. Use the Column Mapping tab to map the Type and Type Code logical columns to the
corresponding physical columns for the D1_PRODUCT_TYPE logical table source.
g. Set the logical level to Type for the D1_PRODUCT_TYPE logical table source.
h. Check in changes.
i. Check consistency.
j. Save the repository.
288
l. Check the query log and note that the query does not use the aggregate fact table source, but
uses the detail table, D1_ORDERS2.
d.
e.
f.
g.
Check in changes.
Check consistency.
Save the repository.
Reload server metadata and run the same query:
289
h. Check the query log. Because you reset the fact source aggregation content to the correct
level of aggregation, the physical aggregate table, D1_ORDER_AGG1, is used in the query:
290