Você está na página 1de 18

OBI EE Lab Material

Lab 1 - Building the Physical Layer of a Repository


Pre-Requisites:
1. Oracle SQL Plus Client 10.2.0.1.0 or higher should be installed (in Administrator Mode)
2. Access to Oracle 10g Database with the sample schemas SH, HR and OE in unlocked state.
3. UserID and password used to connect should have at least SELECT privileges on SH, HR and
OE schemas and should have the privileges to create tables in its own schema.

In this lab, we shall perform the following steps to create a new repository and build the
physical layer:
Create a New Repository
Create an ODBC Data Source
Import SH Schema
Create Physical Joins
Create a New Repository
To create a new repository, perform the following steps:
1. Click Start > Programs > Administrative Tools > Services.
2. In the Services dialog box, stop the Oracle BI Java Host, Oracle BI Presentation Server and Oracle
BI Server service(s).

3. Click Start > Programs > Oracle Business Intelligence > Administration to open the Oracle BI
Administration Tool.
4. Click File > New to open the New Repository dialog box.

OBI EE Lab Material

OBI EE Lab Material


5. In the New Repository dialog box, the Repository folder is selected by default. Name the file
SH.rpd.

6. 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.

OBI EE Lab Material

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.

OBI EE Lab Material


Create an ODBC Data Source
An ODBC data source is needed to import schema information about a data source into an Oracle BI
Server repository. To create an ODBC data source for importing the SH schema information, perform
the following steps:
1. Click Start > Programs > Administrative Tools > Data Sources (ODBC) to open the ODBC Data
Source Administrator.

2. Click the System DSN tab and click Add.

OBI EE Lab Material

The Create New Data Source dialog box opens.


3. In the Create New Data Source dialog box, select the Oracle driver.

OBI EE Lab Material


4. Click Finish to open the Oracle ODBC Driver Configuration dialog box.
5. 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 (OCOE in this example), and
enter OBIDEMO as the User ID for the SH schema.

6. Click Test Connection to open the Oracle ODBC Driver Connect dialog box.
7. In the Oracle ODBC Driver Connect dialog box, enter the password <to be provided> for the
OBIDEMO user and click OK.

8. You should see a "Testing Connection" message indicating the connection is successful.

OBI EE Lab Material


9. Click OK to close the Testing Connection message.
10. Click OK to close the Oracle ODBC Driver Configuration dialog box.
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.

OBI EE Lab Material


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 . . .

2. In the Select Data Source dialog box, select the SH ODBC DSN you created in a previous step,
enter OBIDEMO as the user name and password <to be provided>, and click OK to open the Import
dialog box.

OBI EE Lab Material


3. In the Import dialog box, locate the SH schema folder.

4. Expand the SH schema folder and use Ctrl + Click to select the following tables:
CHANNELS, COSTS, COUNTRIES, CUSTOMERS, PRODUCTS, PROMOTIONS, SALES, TIMES

OBI EE Lab Material

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.

OBI EE Lab Material


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.

7. Leave the rest of the settings as they are and click OK to close the Connection Pool dialog box. The
import process starts.
8. When the Import process completes, click Close to close the Import dialog box.

OBI EE Lab Material


9. In the Physical layer of the repository, expand the SH schema folder and verify that the correct
tables are imported.

10. To verify connectivity, click Tools > Update All Row Counts.
11. When update all row counts completes, verify that the row counts are displayed in the Physical
layer of the Administration Tool:

OBI EE Lab Material


Create Physical Joins
To create physical joins in the Physical layer of the repository, perform the following steps:
1. 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.

2. In the Physical Diagram, if the tables are too big, right-click in the white space, select Zoom, and
adjust the size.

OBI EE Lab Material


3. Rearrange the tables so they are all visible in the Physical Diagram.

4. Click the New Foreign Key button on the toolbar.

5. Click the Channels table and then the Sales table. The Physical Foreign Key dialog box opens.

OBI EE Lab Material

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.

OBI EE Lab Material

7. Continue to create the following joins:


PROMOTIONS.PROMO_ID = SALES.PROMO_ID
TIMES.TIME_ID = SALES.TIME_ID
PRODUCTS.PROD_ID = SALES.PROD_ID
CUSTOMERS.CUST_ID = SALES.CUST_ID
COUNTRIES.COUNTRY_ID = CUSTOMERS.COUNTRY_ID
Note that Countries joins to Customers and Costs in not joined for now. All other tables join directly to
Sales.

OBI EE Lab Material

When you are finished, click the X in the upper right corner to close the Physical Diagram.
8. Select File > Save or click the Save button on the toolbar to save the repository.

9. Click No when prompted to check global consistency. Checking Global Consistency checks for
errors in the entire repository. Some of the more common checks are done in the Business Model and
Mapping layer and Presentation layer. Since these layers are not defined yet, bypass this check until
the other layers in the repository are built. You learn more about consistency check later in this tutorial.

10. 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.

Você também pode gostar