Beruflich Dokumente
Kultur Dokumente
Getting Started
Creating a Repository Using the
Intelligence Administration Tool
Oracle
Business
This tutorial shows you how to use the Oracle BI EE Administration Tool to build,
modify, enhance, and manage an Oracle BI repository.
This tutorial shows you how to build an Oracle BI metadata repository. You learn how
to import metadata from databases and other data sources, simplify and reorganize
the imported metadata into a business model, and then structure the business model
for presentation to users who request business intelligence information via Oracle BI
user interfaces, such as Oracle BI Answers and Oracle BI Interactive Dashboards.
Summary
1-1
2.
In the Services dialog box, stop the Oracle BI Server service, if it is not already
stopped.
3.
Click Start > Programs > Oracle Business Intelligence > Administration to open
the Oracle BI Administration Tool.
1-2
4.
5.
6.
Click File > New to open the New Repository dialog box.
In the New Repository dialog box, the Repository folder is selected by default. Name the
file SH.rpd.
Click Save. The new repository opens in the Administration Tool and displays three
empty layers: Presentation, Business Model and Mapping, and Physical. If necessary,
select Tools > Options > Show toolbar to display the toolbar.
1-3
The Physical layer is where information on physical data sources is stored. The Business
Model and Mapping layer is where measurements and terms used in business are
mapped to the physical data sources. The Presentation layer is where the business model
is customized for presentation to the user. You can work on each layer at any stage in
creating a repository, but the typical order is to create the Physical layer first, then the
Business Model and Mapping layer, and then the Presentation layer.
Leave the Administration Tool open.
Click Start > Programs > Administrative Tools > Data Sources (ODBC) to open the
ODBC Data Source Administrator.
1-4
2.
1-5
3.
4.
5.
In the Create New Data Source dialog box, select the Oracle driver.
Click Finish to open the Oracle ODBC Driver Configuration dialog box.
In the Oracle ODBC Driver Configuration dialog box, enter a Data Source Name (this
can be any name), select the appropriate TNS Service Name from the drop down list
(ORCL in this example), and enter SH as the User ID for the SH schema.
1-6
6.
7.
8.
Click Test Connection to open the Oracle ODBC Driver Connect dialog box.
In the Oracle ODBC Driver Connect dialog box, enter the password SH for the SH schema
and click OK.
You should see a "Testing Connection" message indicating the connection is successful.
1-7
9.
10.
11.
Verify that the SH system data source is added in the ODBC Data Source Administrator
and click OK to close the ODBC Data Source Administrator.
Import SH Schema
To import the SH schema information into the repository, perform the following
steps:
1.
In the Oracle BI Administration Tool, click File > Import > from Database . . .
1-8
2.
3.
In the Select Data Source dialog box, select the SH ODBC DSN you created in a previous
step, enter SH as the user name and password, and click OK to open the Import dialog
box.
1-9
4.
Expand the SH schema folder and use Ctrl + Click to select the following tables:
CHANNELS, COSTS, COUNTRIES, CUSTOMERS, PRODUCTS, PROMOTIONS, SALES,
TIMES
1-10
5.
Verify that only the Tables and Keys checkboxes are selected, which is the default, and
click the Import button. The Connection Pool dialog box opens.
It is best practice to only import objects needed to support your business model.
However, dont worry if you import extra objects at this point. You can always delete
objects later if they do not support your business model.
6.
In the Connection Pool dialog box, on the General tab, verify that the call interface is set
to Default (OCI 10g) and change the data source name to the appropriate
tnsnames.ora entry ( ORCL in this example). Please note that this is the TNS service
name, not the ODBC DSN.
1-11
7.
8.
9.
Leave the rest of the settings as they are and click OK to close the Connection Pool
dialog box. The import process starts.
When the Import process completes, click Close to close the Import dialog box.
In the Physical layer of the repository, expand the SH schema folder and verify that the
correct tables are imported.
1-12
10.
11.
When update all row counts completes, verify that the row counts are displayed in the
Physical layer of the Administration Tool:
In the Physical layer, right-click the SH schema folder and select Physical Diagram >
Object (s) and All Joins. Alternatively, you can select the SH database object and
then click the Physical Diagram button on the toolbar.
1-13
2.
In the Physical Diagram, if the tables are too big, right-click in the white space, select
Zoom, and adjust the size.
1-14
3.
4.
5.
Rearrange the tables so they are all visible in the Physical Diagram.
Click the Channels table and then the Sales table. The Physical Foreign Key dialog box
opens.
1-15
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. The Administration Tool makes a best "guess" and automatically
determines which columns should be included in the join.
Make sure the join expression is:
CHANNELS.CHANNEL_ID = SALES.CHANNEL_ID
6.
Click OK to close the Physical Foreign Key dialog box. The join between Channels and
Sales is displayed in the Physical Diagram.
1-16
7.
1-17
When you are finished, click the X in the upper right corner to close the Physical
Diagram.
8.
9.
10.
Select File > Save or click the Save button on the toolbar to save the repository.
Leave the Administration Tool and the SH repository open for the next topic.
Congratulations! You have successfully created a new repository, set up an ODBC data
source, imported a table schema from an external data source into the Physical layer,
and defined keys and joins.
In the next topic you learn how to build the Business Model and Mapping layer of a
repository.
1-18
In the Business Model and Mapping layer, right-click the white space and select New
Business Model.
1-19
2.
3.
In the Business Model dialog box, name the business model SH and leave the Available
for queries box unchecked. The Description edit box is used to add a comment for
yourself or another developer. Leave it empty.
Click OK to close the Business Model dialog. The new SH business model appears in the
Business Model and Mapping layer. The red symbol on the business model indicates it is
1-20
not yet enabled for querying. You enable the business model for querying later after the
Presentation layer is defined and the repository passes a global consistency check.
2.
In the Business Model and Mapping layer, right-click the SH business model and
select New Object > Logical Table.
In the Logical Table dialog box, name the table Sales Facts.
1-21
3.
Click OK to close the Logical Table dialog. The Sales Facts logical table appears in the
SH business model in the Business Model and Mapping layer. The Sources folder is
populated in the next step when you create a logical column.
1-22
2.
3.
Drag the AMOUNT_SOLD column from the Physical layer to the Sales Facts logical table
in the Business Model and Mapping layer. A new AMOUNT_SOLD logical column is added
to the Sales Facts logical table.
1-23
4.
Expand the Sources to see the logical table source that was created automatically when
you dragged the AMOUNT_SOLD column from the Physical layer. Logical table sources
define the mappings from a logical table to a physical table. A logical tables Sources
folder contains the logical table sources. Because you dragged a column from the Physical
layer, the logical table source name, SALES, is the same name as the physical table.
However, it is possible to change names in the Business Model and Mapping layer without
impacting the mapping.
1-24
5.
6.
In the Business Model and Mapping layer, double-click the AMOUNT_SOLD logical
column to open the Logical Column dialog box.
1-25
7.
1-26
8.
Click OK to close the Logical Column dialog box. Notice that the logical column icon is
changed to indicate an aggregation rule is applied.
Select the following tables in the Physical layer. Select only these tables:
CHANNELS, CUSTOMERS, PRODUCTS, PROMOTIONS, TIMES
2.
Drag the selected tables from the Physical layer onto the SH business model folder in
the Business Model and Mapping layer. This automatically creates logical tables in the
Business Model and Mapping layer. Notice that each logical table has a yellow table
icon. In the Business Model and Mapping layer, this indicates a fact table. Because
you have not yet created the logical joins, all table icons are yellow. The icon color for
dimension tables changes to white in a later step when you create logical joins.
1-27
3.
4.
Right-click the SH business model and select Business Model Diagram > Whole
Diagram.
Rearrange the table icons so they are all visible. Place the Sales Facts table in the
middle. Adjust the zoom factor, if desired.
1-28
5.
6.
Click the Channels table icon first and then click the Sales Facts 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. Leave the
default values as they are, but note which properties you can set: name, business
model, tables, driving table, join type, and cardinality. Also note which properties you
cannot set: the join expression and the join columns. Typically, when defining logical
joins, you leave the defaults as they are.
1-29
7.
Do not change the default values, click OK, and verify your work in the Logical Table
Diagram. Notice that the fact table, Sales Facts, is at the many end of the join:
1-30
8.
9.
10.
Repeat the steps for the remaining tables. Your final result should look similar to the
picture.
Click the X in the upper right corner to close the Logical Table Diagram. Notice that
the color of the table icons for the dimension tables has changed to white in the
business model. In a business model, a yellow icon indicates a fact table and a white
icon indicates a dimension table. Defining the join relationships determined which
tables are the logical dimension tables and which is the logical fact table. A fact table
is always on the many side of a logical join. You now have a logical star schema
consisting of one logical fact table, Sales Facts, and five logical dimension tables:
Channels, Customers, Products, Promotions, and Times.
1-31
2.
3.
In the Utilities dialog box, click Rename Wizard and then Execute.
In the Rename Wizard, click the Business Model and Mapping tab and select the SH
business model.
1-32
4.
1-33
5.
6.
Click Next.
1-34
7.
1-35
8.
9.
Click Next.
1-36
10.
Click Add.
1-37
11.
Click Change specified text. In the Find box, type an underscore. In the Replace box,
type a space.
1-38
12.
Click Add.
1-39
13.
1-40
14.
Click Change specified text. In the Find box, type a space and the letters Id. In the
Replace With box, type a space and the letters ID. Check Case sensitive.
1-41
15.
Click Add.
1-42
16.
1-43
17.
Click Finish and verify that logical tables and logical columns in the Business Model and
Mapping layer are changed as expected.
1-44
18.
For the Channels logical table in the Business Model and Mapping layer, use Ctrl + click
to select the Channel Class ID and the Channel Total ID logical columns.
2.
Right-click either of the highlighted columns and select Delete to delete the columns.
Alternatively, you can use the Delete key on your keyboard.
1-45
3.
4.
Verify that the Channels logical table now has only four logical columns.
1-46
5.
Repeat the steps to delete the following logical columns in the Customers table:
Cust City ID
Cust State Province ID
Country ID
Cust Main Phone Number
Cust Total ID
Cust Src ID
Cust Eff From
Cust Eff To
Cust Valid
6.
Place the cursor over the icon to display the screenshot and verify that the Customers
logical table has only the following logical columns:
1-47
7.
8.
Place the cursor over the icon to display the screenshot and repeat the steps to delete the
highlighted logical columns in the Products table.
Place the cursor over the icon to display the screenshot and verify that the Products
logical table has only the following logical columns:
1-48
9.
10.
11.
Place the cursor over the icon to display the screenshot and repeat the steps to delete the
highlighted logical columns in the Promotions table.
Place the cursor over the icon to display the screenshot and verify that the Promotions
logical table has only the following logical columns:
1-49
12.
1-50
2.
Right-click the ChannelsDim object, which was created by the action in the previous
step, and select Expand All.
1-51
3.
4.
Place the cursor over the icon to display the screenshot and verify that the ChannelsDim
dimension hierarchy matches the picture.
Right-click the Channels Detail level and select New Object > Parent Level.
1-52
5.
In the Logical Level dialog box, name the logical level Class and set the Number of
elements at this level to 3. 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).
1-53
6.
Click OK to close the Logical Level dialog box. The new Class level is added to the
hierarchy.
1-54
7.
8.
9.
Drag the Channel Class column from the Channel Detail level to the Class level to
associate the logical column with this level of the hierarchy.
1-55
10.
In the Logical Level Key dialog box, verify that Channel Class and Use for drilldown are
selected. The level key defines the unique elements in each logical level. Each level key
can consist of one or more columns at this level.
1-56
11.
12.
Click OK to close the Logical Level Key dialog box. The Channel Class column now
displays with a key icon.
Right-click the Class level and select New Object > Parent Level.
1-57
13.
In the Logical Level dialog box, name the logical level Channel Total Attribute and set
the Number of elements at this level to 1.
1-58
14.
15.
Click OK to close the Logical Level dialog box. The Channel Total Attribute level is
added to the hierarchy.
Right-click the Channel Total Attribute level and select Expand All.
1-59
16.
17.
Drag the Channel Total column from the Channel Detail level to the Channel Total
Attribute level.
1-60
18.
In the Logical Level Key dialog box, verify that Channel Total and Use for drilldown are
selected.
1-61
19.
20.
Click OK to close the Logical Level Key dialog box. The Channel Total column now
displays with a key icon.
Right-click the Channel Desc column and select New Logical Level Key.
1-62
21.
22.
In the Logical Level Key dialog box, notice that Use for drilldown is selected.
Click OK to close the Logical Level Key dialog. Both Channel Desc and Channel ID
display with key icons.
1-63
23.
Double-click the Channels Detail level to open the Logical Level dialog box.
1-64
24.
25.
1-65
26.
1-66
27.
In the Logical Level Key dialog box, uncheck Use for drilldown.
1-67
28.
Click OK to close the Logical Level Key dialog box. Notice that the key icons are different.
Channel Desc is used for drill down Channels Detail_Key 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 Channel Class column (the next highest level), the default is to drill down
to the Channel Desc column, not the Channels Detail_Key column.
1-68
29.
30.
Place the cursor over the icon to display the screenshot and verify that the finished
ChannelsDim hierarchy looks like the picture.
1-69
31.
Drag the SH business model from the Business Model and Mapping layer to the
Presentation layer to create the SH catalog in the Presentation layer.
2.
Expand the SH catalog in the Presentation layer. Notice that the tables and columns in
the Presentation layer exactly match the tables and columns in the Business Model and
Mapping layer. Notice also that dimension hierarchies are not displayed.
1-70
3.
1-71
1-72
2.
You should receive a message indicating that the repository is consistent and asking if
you want to make it available for queries.
3.
Click Yes to make the SH business model available for queries. The Consistency Check
Manager displays.
1-73
4.
If the Consistency Check Manager displays any Error messages, edit the repository to
correct the inconsistencies and run the consistency check again.
If you see only Warning and Best Practices messages, you can ignore the messages
for now and click Close.
1-74
5.
In the Business Model and Mapping layer, notice that the SH business model icon has
changed to indicate the business model is now available for queries (the red circle with a
line is gone).
6.
Double-click the SH business model object to open the Business Model properties dialog
box. Notice that Available for queries is checked.
1-75
7.
8.
Save the repository. Click No when asked to check global consistency (you just checked
it).
1-76
2.
In the Security Manager, select Users in the left pane. The Administrator user appears
in the right pane.
3.
In the right pane, double-click Administrator. The User dialog box opens.
4.
Verify that the User tab is selected. In the Password field, type Administrator and then
confirm in the Confirm Password field. In the Logging level field, set the value to 2.
1-77
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.
5.
6.
7.
8.
1-78
9.
Modify NQSConfig.ini
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 (...\\OracleBI\server\Log\NQServer.log). You also disable caching.
Caching is typically not used during development, except to test the cache.
1.
2.
Locate the [ REPOSITORY ] section and change the entry to Star = SH.rpd,
DEFAULT;
1-79
3.
In the [ CACHE ] section, immediately below the [ REPOSITORY ] section, change the
ENABLE parameter from YES to NO.
4.
2.
Start the Oracle BI Server service. Verify that the Oracle BI Presentation Server and
Oracle BI Java Host services are started. If they are not started, start them. It is not
necessary to start the Oracle BI Scheduler or Oracle BI Cluster Controller services.
The services can be started in any order.
1-80
3.
Select Start > Programs > Oracle Business Intelligence > Presentation Services.
2.
3.
4.
1-81
5.
In the left pane, click the Customers folder to expand it. Notice that the folders and
columns in Answers match the folders and column in the Presentation layer of the
repository.
6.
Click the Cust State Province column in the left pane to add it to the request criteria on
the right.
1-82
7.
Click the Sales Facts folder in the left pane to expand it.
1-83
8.
9.
10.
By default, results are displayed in a compound layout, consisting of a title and a table
view.
1-84
2.
Click the Manage Sessions link to open the Session Management window.
1-85
3.
In the Session Management window, under Cursor Cache, click the View Log link for the
last entry.
4.
The log displays the last query executed by Administrator. The log file should look
similar to the picture.
1-86
Locate the SQL Request section. This section contains the logical SQL issued from
Answers.
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.
Locate the Sending query to database named SH section, just below the General
Query Info section. This section identifies the physical data source to which Oracle BI
Server is connecting and the physical SQL that was generated.
The rest of the file contains information such as query status, number of rows returned,
and so forth.
5.
1-87
6.
7.
Click Close Window to close the Oracle Bi Presentation Services Administration window.
8.
1-88
2.
3.
4.
Using Windows Explorer, navigate to the C:\Desktop\SetupFiles\SH folder and copy the
SH.rpd file to C:\OracleBI\server\repository.
5.
There is no need to update the NQSConfig.ini file, because, in an earlier step, you modified
the entry in the Repository section of the initialization file to instruct Oracle BI Server to
load the SH repository into memory upon startup.
6.
7.
Click Start > Programs > Oracle Business Intelligence > Administration to open the
Administration Tool.
8.
9.
In the Open Online AnalyticsWeb dialog box, type Administrator in the Password field and
click Open.
1-89
10.
Up to this point, 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 the
repository, you can make changes to the metadata in online mode.
Typically, you develop a repository in offline mode and use online mode for minor updates
and changes.
If desired, examine the structure of the provided repository before proceeding with the
remaining steps in this OBE. In particular, examine the relevant differences: the physical
joins for the COSTS physical table, and the four additional dimension hierarchies:
CustomersDim, ProductsDim, PromotionsDim, and TimesDim.
11.
To verify connectivity, click Tools > Update All Row Counts. This may take a few
minutes.
12.
When Update Row Counts completes, expand the Physical layer and verify that row counts
appear for all tables and columns.
1-90
Notice that the objects have a red check mark. Since Oracle BI Server may be processing
queries while you are editing the repository in online mode, you must check out objects
before editing them. Once 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.
In this example, the Administration Tool is configured to check out objects automatically.
Thus, objects were checked out automatically when you ran Update Row Counts. If you do
not see the red check marks, select Tools > Options > General Tab > Check out
objects automatically.
1-91
2.
Drag UNIT_COST from the Physical layer to the SALES logical table source for the Sales
Facts logical table. UNIT_COST appears as a logical column in the Sales Facts logical
table.
3.
Right-click the UNIT_COST logical column, select Rename, and rename the column to
Unit Cost. Alternatively, slowly double-click the column to make it editable.
1-92
4.
Set the aggregation rule for the Unit Cost logical column to SUM. Hint: double-click the
column to open the Logical Column properties dialog box and click the Aggregation tab..
5.
Drag the Unit Cost logical column to the Sales Facts presentation folder.
6.
Click File > Check In Changes or click the Check In Changes button on the toolbar to
check in changes.
7.
Click Yes when prompted to check global consistency. The Consistency Check Manager
opens and displays Warnings and Best Practices messages. Review the messages.
1-93
8.
For the purposes of this tutorial, you disable the Warnings and Best Practices messages.
Click the Options tab.
9.
Expand Warnings folder, select Check Features Match Default, and then click the Disable
button.
1-94
If you desire, review the other Warnings items that are checked.
10.
Select Best Practices > Physical Table > Search for Tables With No Keys, and then click
the Disable button.
1-95
If you desire, review the other Best Practices items that are checked.
11.
12.
Click Check All Objects. The Consistency Check Manager displays with no messages,
indicating a consistent repository.
1-96
13.
14.
15.
Return to Answers to test the new column in Answers. If Answers is not open, select Start
> Programs > Oracle Business Intelligence > Presentation Server, log in as Administrator
with password Administrator, click the Answers link, and click the SH subject area.
16.
17.
1-97
18.
Click Results.
19.
Click Settings > Administration > Manage Sessions > View Log to view the query
log and examine the SQL generated by the request.
Click the Criteria tab. The request from the previous set of steps should still be open.
2.
3.
Click the Edit Formula button for the Amount Sold column that you just added.
4.
The Edit Column Formula dialog box displays with "Sales Facts"."Amount Sold" in the
Column formula field.
1-98
5.
In the Edit Column Formula dialog box, click to the right of "Sales Facts"."Amount Sold"
in the Column Formula field.
6.
1-99
7.
In the left panel, click Sales Facts > Unit Cost to add it to the formula.
1-100
8.
9.
1-101
10.
Click OK to close the Edit Column Formula dialog box and verify the change to the
request.
11.
Click Results.
12.
Click Settings > Administration > Manage Sessions > View Log to view the query log.
13.
1-102
Return to the SH repository, which should still be open in online mode in the
Administration Tool.
2.
Right-click the Sales Facts logical table and select New Object > Logical Column.
3.
In the Logical Column dialog box, name the logical column Gross Profit and check Use
existing logical columns as the source.
1-103
4.
Click the Expression Builder button (three dots) to open the Expression builder.
5.
1-104
6.
Select Sales Facts in the middle pane, Amount Sold in the right pane, and click Insert.
The Amount Sold column is added to the formula.
7.
1-105
8.
9.
Click OK to close the Expression Builder. Notice that the formula appears in the Logical
Column dialog box.
1-106
10.
Click OK to close the Logical Column dialog box. The Gross Profit logical column appears
in the business model.
11.
Drag the Gross Profit logical column to the Sales Facts table in the Presentation layer.
1-107
12.
Check in changes.
13.
Click Yes when prompted to check global consistency. If the repository is consistent (no
Error messages), close the Consistency Check Manager. If there are Error messages, you
must correct the errors before continuing.
14.
15.
Return to Answers, which should still be open from the previous topic.
16.
1-108
17.
Expand Sales Facts and verify that the Gross Profit column is now visible in Answers.
18.
Create the following request. (If the request from the previous topic is still open, delete
the Gross Profit column you created in Answers and then add the Gross Profit column you
created in the repository to the query.)
Times.Calendar Year, Sales Facts.Amount Sold, Sales Facts.Unit Cost, Sales Facts.Gross
Profit
19.
Click Results. Verify that the results are the same as for the query you built using the
Gross Profit column created in Answers.
20.
Click Settings > Administration > Manage Sessions > View Log to view the query
log. Your results should look similar to the picture.
1-109
Note that the difference between AMOUNT_SOLD and UNIT_COST is being calculated in
the outer query block (SAWITH0.c2 - SAWITH0.c1 as c4 in the example pictured here).
Because you defined the Gross Profit 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.
21.
22.
23.
24.
1-110
Return to the SH repository, which should still be open in online mode in the
Administration Tool.
2.
Right-click the Sales Facts logical table and select New Object > Logical Column.
3.
In the Logical Column dialog box, name the logical column Gross Profit Physical.
1-111
4.
5.
1-112
6.
Click OK to close the Logical Column dialog box. Gross Profit Physical is added to the
business model.
7.
Expand Sales Facts > Sources and double-click the SALES logical table source. The Logical
Table Source dialog box opens.
1-113
8.
Click the Column Mapping tab and check the Show unmapped columns if it is not already
checked.
1-114
9.
Click the Expression Builder button for the Gross Profit Physical logical column.
1-115
10.
In the Expression Builder, select Physical Tables > SALES > AMOUNT_SOLD and then click
the Insert button to add the column to the formula.
1-116
11.
12.
Select Physical Tables > COSTS > UNIT_COST and then click the Insert button to add the
column to the formula.
1-117
13.
Click OK to close the Expression Builder. Notice that the expression is added in the Logical
Table Source dialog box.
1-118
14.
Click OK to close the Logical Table Source dialog box. The icon for Gross Profit Physical
changes to indicate an aggregation rule is applied.
15.
1-119
16.
Check in changes.
17.
Click Yes when prompted to check global consistency. If the repository is consistent (no
Error messages), close the Consistency Check Manager. If there are Error messages, you
must correct the errors before continuing.
18.
19.
Return to Answers, which should still be open from the previous topic.
20.
1-120
21.
Expand Sales Facts and verify that the Gross Profit Physical column is now visible in
Answers.
22.
23.
Click Results. Verify that the results are the same for the Gross Profit Physical (built using
physical columns) as they were for the Gross Profit column (built using logical columns).
The calculation formula for the logical columns looks like this: sum(Amount Sold)
sum(Unit Cost), whereas the calculation formula for the physical columns looks like this:
sum(AMOUNT_SOLD UNIT_COST). Because of arithmetic laws, you know that you can
sum ColumnA and sum ColumnB and then take the differences of those sums, and have
exactly the same results if you calculate the difference first (the value in ColumnA the
value in ColumnB for each row) and then sum the difference. So in this example, the
results are the same for the logical column and the physical column calculations.
1-121
24.
Click Settings > Administration > Manage Sessions > View Log to view the query log. Your
results should look similar to the picture.
Note that the difference between amount sold and unit cost is calculated first and then
summed: sum(T245.AMOUNT_SOLD - T168.UNIT_COST)in the example pictured here.
25.
26.
27.
28.
Return to the SH repository, which should still be open in online mode in the
Administration Tool.
2.
1-122
3.
1-123
4.
5.
6.
Click the Levels tab and select Category as the logical level for ProductsDim.
1-124
Category Sales is now a level-based measure that will calculate total sales at the category
level when used in a query. Level-based measures are useful for creating share measures.
You use the Calculation Wizard to create a share measure in the steps that follow.
7.
8.
1-125
1-126
9.
Click Next.
10.
1-127
11.
Click Next.
12.
1-128
13.
1-129
14.
Click Next.
1-130
15.
16.
Drag Category Sales and Share of Category to Sales Facts in the Presentation layer.
1-131
17.
Check in changes.
18.
Click Yes when prompted to check global consistency. If the repository is consistent (no
Error messages), close the Consistency Check Manager. If there are Error messages, you
must correct the errors before continuing.
19.
20.
Return to Answers, which should still be open from the previous topic.
21.
22.
Expand Sales Facts and verify that Category Sales and Share of Category are now
visible in Answers.
1-132
23.
Place the cursor over the icon to display the screenshot and use it as a reference to create
a query. Notice the sort settings for the Prod Category and Amount Sold columns.
24.
25.
Hold down the Ctrl key and click the Calendar Year column to open the Create/Edit Filter
dialog box.
1-133
26.
27.
1-134
28.
Click OK to close the Create/Edit Filter dialog box. The filter is added to the request.
29.
1-135
30.
1-136
Presentation catalogs contain presentation tables. You can use the Presentation
Tables tab in the Presentation Catalog properties dialog box to reorder, sort, or
delete Presentation layer tables. You can also use this tab to access the Presentation
Table dialog box, where you can create and edit tables. Changes to the Presentation
layer do not impact corresponding objects in the Business Model and Mapping layer.
Use presentation tables to organize columns into categories that make sense to the
user community. Presentation tables appear as folders in the Oracle BI user
interface. Presentation tables contain presentation columns. A presentation table can
contain columns from one or more logical tables. The names and object properties of
the presentation tables are independent of the logical table properties.
Presentation tables contain presentation columns. Use the Columns tab in the
Presentation Table properties dialog box to reorder, sort, or delete Presentation layer
columns. You can also use this tab to access the Presentation Column dialog box,
where you can create and edit columns.
Presentation columns define the columns used to build queries in the Oracle BI user
interface, such as Oracle BI Answers. The presentation column names are, by
default, identical to the logical column names in the Business Model layer. To provide
a convenient organization for your end users, you can drag a column from a single
logical table in the Business Model and Mapping layer onto multiple presentation
tables.
To organize the Presentation layer, perform the following steps:
1.
Return to the SH repository, which should still be open in online mode in the
Administration Tool.
2.
1-137
3.
1-138
4.
To create a new presentation Table, click the Add button to open the Presentation Table
dialog box.
5.
Click the General tab and name the presentation table Calendar.
6.
In the Description field, type -> Calendar time attributes. Adding -> in the description
nests the table under the table above it. The description displays as a tool tip in Answers.
1-139
7.
8.
Repeat the steps and create another presentation table named Fiscal with ->Fiscal time
attributes in the Description field.
1-140
9.
Double click the SH folder, and drag the tables or use the Up and Down buttons to
rearrange the tables in the following order:
Times
Fiscal
Calendar
Products
Customers
Channels
Promotions
Sales Facts
1-141
10.
Click OK to close the Presentation Catalog dialog box. The new tables are added to the
Presentation layer and the presentation tables are reordered.
11.
Double-click the Channels presentation table to open the Presentation Table dialog box.
1-142
12.
1-143
13.
Drag the columns or use the Up and Down arrows to reorder the columns. A suggested
approach is to order the columns hierarchically from top to bottom.
14.
Click OK to close the Presentation Table dialog box. The column order is changed in the
Presentation layer.
15.
1-144
16.
Use cut and paste to move all the fiscal columns from the Times presentation table to the
Fiscal presentation table and all the remaining columns from the Times presentation table
to the Calendar presentation table. Use Shift+click and Ctrl+click to select multiple
columns.
17.
Check in changes.
18.
Click Yes when prompted to check global consistency. If the repository is consistent (no
Error messages), close the Consistency Check Manager. If there are Error messages, you
must correct the errors before continuing.
1-145
19.
20.
Return to Answers, which should still be open from the previous topic.
21.
22.
Verify that the Fiscal and Calendar folders are nested under the Times folder.
23.
Verify that the columns in the Fiscal and Calendar folders appear as expected.
1-146
24.
1-147
25.
1-148
Return to the SH repository, which should still be open in online mode in the
Administration Tool.
Click Manage > Variables to open the Variable Manager.
1-149
3.
4.
Right-click in the white space on the right and select New Initialization Block.
1-150
5.
In the Session Variable Initialization Block dialog box, type setUser in the Name field.
1-151
6.
Click the Edit Data Source button to open the Session Variable Initialization Block Data
Source dialog box.
1-152
7.
Click the Browse button and select SH > Connection Pool in the Select Connection Pool
dialog box.
1-153
8.
9.
Double-click Connection Pool or click the Select button to add the connection pool to the
Session Variable Initialization Block Data Source dialog box.
In the Default Initialization String field, type the following initialization string:
select ':USER', case when upper(':USER') = 'KURT' then 'Germany' when upper(':USER') =
'KEIKO' then 'Japan' when upper(':USER')= 'CHARLES' then 'United Kingdom' when
upper(':USER') = 'KAREN' then 'United States of America' end, 'CountryManagers', 2 from
Dual
1-154
10.
Click OK to close the Session Variable Initialization Block Data Source dialog box. The
initialization string is visible in the Session Variable Initialization Block dialog box.
1-155
11.
Click Edit Data Target to open the Session Variable Initialization Block Variable Target
dialog box.
1-156
12.
1-157
13.
1-158
14.
15.
16.
17.
Click Yes when prompted about the USER session variable having a special purpose.
The USER variable is added to the Session Variable Initialization Block Variable Target
dialog box.
Repeat the steps and add three more variables: UserCountry, GROUP, and LOGLEVEL.
Click Yes when promoted about the GROUP and LOGLEVEL session variables having a
special purpose. The order is important. The order of the variables must match the order
1-159
of the values for the variables in the initialization string in the initialization block.
18.
Click OK to close the Session Variable Initialization Block Variable Target dialog box. The
variables are displayed in the Variable Target section of the Session Variable Initialization
Block dialog box.
1-160
19.
20.
21.
22.
Click OK to close the Session Variable Initialization Block dialog box. The setUser
initialization block is visible in the Security Manager.
Check in changes.
1-161
To test the initialization block and session variables, perform the following steps:
1.
Click Manage > Security to open the Security Manager.
2.
3.
4.
Right-click the white space in the right pane and select New Security Group.
1-162
5.
Click the Permissions button to open the User / Group Permissions dialog box.
1-163
6.
7.
8.
1-164
9.
10.
Click Select to add Customers to the User / Group Permissions dialog box.
Click the Expression Builder button (three dots) on the right to open the Expression
1-165
11.
Select Logical Tables > Customers > Country and then click the Insert button to add
Country to the formula.
1-166
12.
1-167
13.
Select Session Variables > UserCountry and click the Insert button to add
UserCountry to the formula as an argument in the VALUEOF()function.
1-168
14.
Click OK to close the Expression Builder. The filter is added in the User / Group
Permissions dialog box.
1-169
15.
16.
17.
18.
19.
20.
21.
22.
23.
Click OK to close the Group dialog box. CountryManagers is added as a group in the
Security Manager.
Check in changes.
Return to Answers.
Test the initialization block by logging in to Answers as one of the users in the initialization
block: Kurt, Keiko, Charles, or Karen.
1-170
24.
25.
Click Results. The results of the query should correspond to the the user's country (Kurt
= Germany, Keiko = Japan, Charles = United Kingdom, Karen = United States of
America). The picture shows the results when the user = Kurt.
2.
3.
1-171
4.
5.
Right-click the white space and select New Initialization Block to open the Repository
Variable Init Block dialog box.
1-172
6.
Click Edit Data Source to open the Repository Variable Init Block Data Source dialog box.
1-173
7.
Click the Browse button to open the Select Connection Pool dialog box.
1-174
8.
9.
Double-click the SH > Connection Pool object to add it to the Connection Pool field in
the Repository Variable Init Block Data Source dialog box.
CALENDAR_MONTH_DESC,
1-175
10.
Click OK to close the Repository Variable Init Block Data Source dialog box. The
connection pool and initialization string are added to the Repository Variable Init Block
dialog box.
1-176
11.
Click Edit Data Target to open the Repository Variable Init Block Variable Target dialog
box.
1-177
12.
1-178
13.
Click OK to close the Repository Variable Init Block Variable Target dialog box. The
variables appear in the Variable Target field in the Repository Variable Init Block dialog
box.
1-179
14.
15.
16.
Click Edit Data Source to open the Repository Variable Init Block Data Source dialog box.
Click Test and verify you get the results in the picture.
Close Results.
1-180
17.
18.
19.
20.
21.
Click OK to close the Repository Variable Init Block Data Source dialog box.
Click OK to close the Repository Variable Init Block dialog box. The getMaxSalesDate
initialization block is displayed in the Variable Manager.
Select Repository > Initialization Blocks > Variables > Dynamic to see the variables
displayed in the Variable Manager.
Check in changes.
1-181
22.
23.
24.
25.
Select File > Check Global Consistency. If the Consistency Check Manager displays any
errors, edit the repository to correct the errors before continuing. If there are no error
messages, close the Consistency Check Manager.
Return to Answers.
26.
27.
Click the Add Filter button for the Calendar Year column.
In the Create/Edit Filter dialog box, click Add > Variable > Repository.
1-182
28.
1-183
Click OK to close the Create/Edit Filter dialog box. The filter is added to the request.
1-184
30.
Click Results and verify that Calendar Year returns the expected result.
1-185
Using Windows Explorer, navigate to the SetupFiles folder and verify the existence of the
SHQuota.xls file.
2.
Click Start > Programs > Administrative Tools > Data Sources (ODBC) to open the
ODBC Data Source Administrator.
1-186
3.
1-187
4.
In the Create New Data Source dialog box, select the Microsoft Excel Driver.
5.
Click Finish to open the ODBC Microsoft Excel Setup dialog box.
6.
In the ODBC Microsoft Excel Setup dialog box, enter a Data Source Name (this can be any
name).
1-188
7.
Click Select Workbook to open the Select Workbook dialog box and navigate to the
location where you saved the SHQuota.xls file.
8.
Click OK to close the Select Workbook dialog box. The path to the workbook is displayed
in the ODBC Microsoft Excel Setup dialog box.
1-189
9.
10.
Verify that the Excel system data source is added in the ODBC Data Source Administrator
and click OK to close the ODBC Data Source Administrator.
To import the Excel data source into the repository, perform the following steps:
1.
1-190
2.
3.
In the Select Data Source dialog box, select the ODBC DSN you created in the previous
steps. Leave User Name and Password blank.
4.
5.
1-191
6.
Verify that only Tables and Keys are checked and click Import.
7.
When import completes, close the Import dialog box and verify that all four range tables
have been imported into the Physical layer.
8.
Double-click the Excel database object in the Physical layer (SHQuota in this example) to
1-192
9.
10.
1-193
11.
12.
Double-click the Connection Pool for the Excel data source to open the Connection Pool
dialog box.
13.
Click the General tab and uncheck the property Enable connection pooling.
1-194
14.
15.
Check in changes.
16.
In the Business Model and Mapping layer, expand Customers > Sources and note
that there are two logical table sources: CUSTOMERS and COUNTRIES.
1-195
2.
Drag the physical column COUNTRY_REGION from Geography in the Physical layer to
the logical column Customers.Country Region in the Business Model and Mapping
layer. Notice that a new logical table source, Geography, is created automatically.
3.
4.
Double-click the Geography logical table source in the Customers > Sources folder to
open the Logical Table Source dialog box.
5.
Click the Column Mapping tab. Notice the logical to physical column mappings.
1-196
6.
7.
Drag the physical column CALENDAR_YEAR from XLDates in the Physical layer to the
logical column Times.Calendar Year in the Business Model and Mapping layer. Notice
that a new logical table source, XLDates, is created automatically.
1-197
8.
Drag the remaining physical columns from XLDates in the Physical layer to the
corresponding logical columns in the Times table in Business Model and Mapping
layer.
9.
Double-click the XLDates logical table source in the Times > Sources folder to open
the Logical Table Source dialog box, click the Column Mapping tab, and verify the
mappings. Note that "Show unmapped columns" is unchecked.
10.
11.
1-198
12.
Use Ctrl+Click to select all four SHQuota tables in the Physical layer.
13.
Right-click any one of the four tables and select Physical Diagram > Selected
Object(s) Only to open the Physical Diagram.
14.
In the Physical Diagram, use the New foreign key button to create the following joins.
Hint: Use CTRL+click to create the multi-column joins or type the join expressions in
the Expression field. Create new keys when prompted.
XLDates.CALENDAR_QUARTER_NUMBER = Quotas."Calendar Quarter Number" AND
XLDates.CALENDAR_YEAR = Quotas."Year" AND XLDates.CALENDAR_QUARTER_DESC
= Quotas."Calendar Quarter Desc"
Geography.COUNTRY_NAME = Quotas.Country AND
Geography.COUNTRY_SUBREGION = Quotas."Country Subregion" AND
Geography.COUNTRY_REGION = Quotas."Country Region"
ProdCategory.PROD_CATEGORY = Quotas."Prod Category".
15.
1-199
1.
Drag the column Quotas.Quota from the Physical layer onto the Sales Facts logical
table. Notice that a new logical table source, Quotas, and a new logical column,
Quota, are created.
2.
3.
Click the Aggregation tab and set the aggregation rule to Sum.
4.
1-200
5.
The Quota logical column states quota in thousands, so rename Quota to Quota (000).
6.
Right-click Sales Facts and select New Object > Logical Column to open the Logical
Column dialog box.
7.
Click the General tab and name the logical column Quota.
8.
1-201
9.
Click the Expression Builder button (three dots) to open the Expression Builder.
10.
11.
Close the Expression Builder. The formula displays in the Logical Column dialog box.
1-202
12.
Close the Logical Column dialog box. The Quota column is added to the business
model.
13.
14.
Click Next.
15.
1-203
16.
Click Next.
17.
Make sure Change is selected. In the Calculation Name field, name the calculation
Variance from Quota.
1-204
18.
19.
Check Percent and make sure it is selected. In the Calculation Name field, leave the
name as is: % of Quota.
1-205
20.
Click Next.
21.
In the Finish window, verify the calculations that will be created by the Calculation
Wizard.
1-206
22.
Click Finish. The calculation measures are added to the business model.
1-207
23.
Add the Quota (000), Quota, Variance From Quota, and % of Quota measures to the
Sales Facts presentation table.
24.
Check in changes.
25.
Check global consistency. If you receive any Error messages, edit the repository to
correct the errors before proceeding.
26.
Return to Answers. Log out and then log back in as Administrator with password
Administrator.
2.
3.
Sales
Facts.Quota,
1-208
Sales
4.
5.
Click Results. (Please note that SHQuota contains data only for 2001).
6.
7.
8.
1-209
2.
1-210
3.
In the Privilege Administration screen, scroll down to Answers. Note that the Edit
Direct Database Requests privilege is granted to Presentation Server Administrators.
By default, the Administrator user is a member of this group.
1-211
4.
5.
Note that the Execute Direct Database Requests privilege is not granted to anyone.
1-212
6.
7.
Click the Add button next to Presentation Server Administrators to give this group
explicit access to this privilege.
Click Finished to close the Change Privilege Permissions screen. Notice the change to
the privilege permissions for Execute Direct Database Requests.
1-213
8.
9.
10.
11.
12.
13.
In the Connection Pool field, type the connection pool name for the SH data source
enclosed in double quotes ("SH"."Connection Pool" in this example).
1-214
14.
15.
16.
Click Validate SQL and Retrieve Columns to display the columns from the Channels
table.
1-215
Summary
In this lesson, you should have learned how to:
Build the Physical, Business Model and Mapping, and Presentation layers
of a repository
Test and validate a repository
Create calculation measures
Add multiple sources to logical tables in a business model
1-216