Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Student Examples
Page 2 of 26
Click Next.
Step 6-10. Workspace Owner (New)
Workspace Owners User Name:
Workspace Owners Password:
Workspace Name:
owb_repos
password
training
Click Next.
Step 7-10. OWBSYS Information.
Fill in the password for the previously unlocked OWBSYS account. Click Next.
Step 8-10. Select Tablespaces.
Leave the defaults in place:
Tablespace for Data:
Tablespace for Indexes:
Tablespace for Temporary Data:
Tablespace for Snapshots:
USERS
USERS
TEMP
USERS
Click Next.
Step 9-10. Select Languages.
Leave the default in place:
Base Language : AMERICAN ENGLISH
Select no additional display languages
Click Next.
Step 10-10. Workspace Users (Optional)
Create the following users with passwords password.
Select the USERS tablespace for data and indexes, and TEMP for the temporary
tablespace.
training_stg
Click Next.
Summary.
Check the summary and click Finish to create the repository and your database users.
This may take a while to complete.
Page 3 of 26
Page 4 of 26
Hands-On Exercise 3
Open a terminal window as the oracle user and set the proper ORACLE_HOME and
ORACLE_SID.
Then run the OWB Design Center:
cd $ORACLE_HOME/owb/bin/unix
Run: ./owbclient.sh
When the Design Center Logon dialog shows enter the following details:
User Name :
Password:
owb_repos
password
Ensure the Connection Details option is selected, and enter the following details:
Host:
Port:
Service Name:
localhost
1521
orcl.localdomain
Click Ok.
When the Oracle Warehouse Builder opens, explore the user interface, taking a look at
the application toolbar, the Project Navigator tab, the Locations Navigator tab and the
Globals tab.
Page 5 of 26
Page 6 of 26
Page 7 of 26
: ORDERS_SRC_LOCATION1
: Orders source data
: HOST:PORT:SERVICE
: orders_src
: password
: localhost
: orcl.localdomain
: 11.2
Leave all other settings as the default. Press the Test Connection button to check that
the details are entered correctly, and press OK to save the connection details.
Page 8 of 26
Click Next in the wizard and verify that Summary window that opens.
If all looks ok then click Finish to create the new ORDERS_SRC module.
Click the Save-All icon in the toolbar to save your changes.
This can also be done using File->Save All or by pressing CTRL-S.
Make sure to do this regularly since it will commit the changes to the database.
Note: unchanged items in the repository will show up in italic in the Oracle Warehouse
Builder interface.
Right-click on the new ORDERS_SRC module in the projects navigator, and select
Import->Database Objects
Page 9 of 26
Press Next, review the selected tables, and press Ok to complete the metadata import.
Rittman Mead Consulting
Page 10 of 26
Review the imported table metadata in the Design Center Project Explorer, and use the
Save All button on the Warehouse Builder toolbar to save your project.
Page 11 of 26
: TRAINING_STG
: password
: localhost
: 1521
: orcl
: TRAINING_STG
: 11.2
Click Next and then Finish to create the module. Do not attempt to import any table
metadata in to the new module, as the underlying schema is currently empty.
Page 12 of 26
Repeat this step again but this time create a module called TRAINING_DW, this time
creating the location TRAINING_DW_LOCATION1.
Once these steps are completed, view the new Oracle Database modules in your project.
Page 13 of 26
: SOURCE_FILES_LOCATION1
: general
Then use the Browse button to locate the directory that you created earlier, and in which
the source file is located.
Page 14 of 26
On the File Import page the file has now been added as a Sample File.
Page 15 of 26
Click Import to continue. This will open the Flat File Sample Wizard.
Step 1-3. Name.
On the Flat File Sample wizard, press Next and then review the file details. Leave all
values as the default, and then press Next.
Page 16 of 26
Click Next.
Step 3-3. Field Properties.
On the Field Properties check the checkbox Use the First Record as the Field
Names.
Press Next to review the summary and click Finish to complete the wizard.
Save you changes.
Page 17 of 26
Now that you have imported the file metadata, you will now create an external table to
make accessing the data within it more convenient. Locate the TRAINING_STG module
within your project, then locate the External Tables entry, right-click on it and select New
External Table.
Page 18 of 26
Page 19 of 26
Name
PROD_ID
NUMBER
PROD_NAME
VARCHAR2
20
COLOUR
VARCHAR2
20
PRICE
NUMBER
10
COST
NUMBER
10
PROD_TYPE_ID
NUMBER
PROD_TYPE_DSC
VARCHAR2
20
Page 20 of 26
Click on the Default Actions button on the right-hand side of the Control Center
Manager, to set the Deploy Action for each of the selected objects to Create.
Since none of the objects have been previously deployed the deployment action is set to
Create for all objects.
Page 21 of 26
From the application menu, select File > Deploy > To Control Center.
When prompted to register the TRAINING_STG_LOCATION1 location, enter the
password and click Test Connection to check the connection details are valid. Once
confirmed, press OK to save the location details, and then check that the deployment
was successful (see below) before proceeding.
Once you have checked that the tables have been deployed correctly, close the Control
Center Manager and return to the Design Center.
Page 22 of 26
Using the mapping operator palette, drop a Joiner operator on to the mapping canvas, to
the right of the three tables you just added.
Double-click on the Joiner operator and select the Groups.
Rename INGRP1 and INGRP2 to PRODUCTS and PRODUCT_DETAILS respectively.
Add a 3rd input group called PRODUCT_TYPES.
Rename OUTGRP1 to STG_PRODUCTS, like this:
Page 23 of 26
Single-click on the Join operator, and then click in the Join Condition property in the
Property Inspector (if not open it can be opened using
View->Property Inspector).
Press the ellipses button () to bring up the Expression Builder.
Using the Expression Builder, join the three input tables in the following way:
PRODUCTS.PROD_TYPE_ID =
and
PRODUCT_TYPES.PROD_TYPE_ID
Page 24 of 26
PRODUCTS.PROD_ID =
PRODUCT_DETAILS.PROD_ID
Once you have completed this step, press OK to save the join details.
In the mapping editor, use the mapping object palette to drag and drop another Table
Operator on to the mapping canvas to the right of the joiner operator. Using the Add
Table Operator dialog, select the STG_PRODUCTS table from within the
TRAINING_STG module, like this:
Page 25 of 26
Select File > Validate from the menu or click its corresponding icon in the toolbar to
check that the mapping is valid, and then save and close the mapping.
Before we can deploy this new mapping to the database, we need to ensure that the
TRAINING_STG user you created previously can access tables in the ORDERS_SRC
schema. Normally, your DBA would grant access to these tables individually, but for now,
the course instructor will connect to the database as the SYSTEM user and grant the
SELECT ANY TABLE role to the TRAINING_STG account.
SQL> grant select any table to training_stg;
Using the Control Center Manager, deploy the new mapping to the database, and ensure
that it compiles and deploys correctly.
Still within the Control Center Manager, select in turn each of the mappings, right-click on
them and select Start.
Page 26 of 26