Oracle Data Warehouse Builder Practical Index

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 221

Mulund College Of Commerce

Oracle Data Warehouse Builder Practical Index

1. Setting up the Oracle Warehouse Builder for Practical


1. Configuring Listener.
2. Creating Database.
3. Configuring Repository and Workspace.
4. Logging into Design Centre.

2. Working with Flat File Transactional Data


1. Creating new Project in OWB.
2. Creating File Module, Importing and sampling flat file data.

3. Defining a Target Warehouse Module


1. Creating a User.
2. Creating a Target Module.
3. Creating External Table.

4. Creating Dimensions
1. Creating REL_CATEGORY dimension.
2. Creating REL_TIME Dimension.

5. Creating a Cube

6. Creating ETL Mappings


1. Design a Mapping Between an External Table and a Dimension.
2. Design a Mapping Between an External Table and a Cube.

7. Deploying
1. Deploying External Table and Viewing Data.
2. Deploying tables, sequences, mappings and cube.
3. Running the Mappings.
4. Viewing Loaded Data in the Cube.

8. Working with Pivot Table and Pivot Chart in Excel

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [1]


Mulund College Of Commerce

Setting up the Oracle Warehouse Builder


In this Practical you will perform the Following things.

1. Configuring the Listener


2. Creating a Database
3. Configuring Repository and Workspace
4. Logging Into Design Center

Configuring the Listener

Run the Net Configuration Assistance as shown in above Fig to Configure the Listener

Follow the Below Screen Shots to Create a Listener

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [2]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [3]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [4]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [5]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [6]


Mulund College Of Commerce

Creating a Database

Click on the Database Configuration Assistant as shown in above Screen Shot and follow the
Screenshots below to create a Database named “MCCDW”

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [7]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [8]


Mulund College Of Commerce

In Step 3 we Enter the name of the Database we want to Create “MCCDW”

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [9]


Mulund College Of Commerce

In Step 5 for Ease of Access we enter a common password for all Account in our case password
is “oracle”

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11]


Mulund College Of Commerce

If u want u can avoid installing Sample Schemas.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12]


Mulund College Of Commerce

In Step 11 just check Revert to pre-11g default security settings

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13]


Mulund College Of Commerce

In Step 12 uncheck Enable automatic maintenance tasks

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14]


Mulund College Of Commerce

From the List we can see Oracle Warehouse Builder is installed and a database named
MCCDW will be created. If you want you can save the list as HTML file

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15]


Mulund College Of Commerce

Copying database files…

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16]


Mulund College Of Commerce

Creating and starting Oracle instance…

Completing Database Creation…

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17]


Mulund College Of Commerce

During the installation you will be prompted with following popup with various information.

Make sure you click on Password Management button to unlock OWBSYS Schema.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18]


Mulund College Of Commerce

In Password Management window just uncheck the blue tick beside the OWBSYS and enter the
password you want. In our case it is “oracle”. And click on OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19]


Mulund College Of Commerce

Configuring Repository and Workspace

Click on the Repository Assistant as shown in the above Screen Shot.

The Repository Assistant enables you to create a Warehouse Builder Design Repository in your
database to store the metadata definitions that describe your sources, targets, and ETL
processes.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20]


Mulund College Of Commerce

Host Name : LOCALHOST


Port Number : 1521
Oracle Service Name : MCCDW

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [22]


Mulund College Of Commerce

Here the password is oracle for SYSTEM if you are following this document

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [23]


Mulund College Of Commerce

Workspace Owner User Name : mcc_user


Workspace Name : mcc_ws
Note: Password is common for all, which is oracle.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [24]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [25]


Mulund College Of Commerce

After you have clicked Finish the installation Process begins.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [26]


Mulund College Of Commerce

Click Unblock

Click OK and you have successfully created a Repository with mcc_user as workspace user.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [27]


Mulund College Of Commerce

Logging into Design Center

Design Center is the main OWB client in which you design sources, targets, ETL mapping and
transformations.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [28]


Mulund College Of Commerce

User Name : mcc_user


Host : localhost
Port : 1521
Service Name : MCCDW
Password oracle (in our case)

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [29]


Mulund College Of Commerce

The Design Center GUI after you have successfully logged in

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [30]


Mulund College Of Commerce

Working with Flat File Transactional Data


 Flat files are a typical data source for warehouse projects in this practical you learn how
to create a flat file source module.
 Modules are storage objects within projects that help you logically group source and
target object definitions
 Source modules hold metadata describing source systems from which you extract data.
 Target modules hold metadata describing your target data warehouse or data marts.

After you have logged into Design Center, Click on the Design menu and select New

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [31]


Mulund College Of Commerce

From the Pop-Up Window enter the name of the Project “MCC_PRJ”

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [32]


Mulund College Of Commerce

We can see a new Project is created and can be viewed in Project Explorer window

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [33]


Mulund College Of Commerce

Expand the MCC_PRJ. Right-click the Files node and select New

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [34]


Mulund College Of Commerce

The Create Module Wizard: Welcome page appears. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [35]


Mulund College Of Commerce

On the Create Module Wizard: Name and Description page, enter SOURCE as the name for the
module. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [36]


Mulund College Of Commerce

The Create Module Wizard: Connection Information page appears. In a flat file source module,
Location is the path or the directory in the file system where the flat files reside.

On the Create Module Wizard: Connection Information page, OWB creates a default location,
SOURCE_LOCATION1. Click Edit… and you will see Edit File System Location1 window Pop Up

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [37]


Mulund College Of Commerce

The Edit File System Location: SOURCE_LOCATION1 window appears.

In the Edit File System Location: SOURCE_LOCATION1 window, rename the default name
SOURCE_LOCATION1 to SOURCE_LOCATION.

Click Browse and locate the folder named “sourcefiles” In my case the folder is in D: drive
which consist of two CSV files named expense_categories.csv and export.csv

Click OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [38]


Mulund College Of Commerce

In the Connection Information window, ensure that Import after finish is selected. Selecting this
option launches the Import Metadata Wizard. Click Next

Tip: If the check box is not selected, the Import Metadata Wizard does not launch automatically.
To launch the Import Metadata Wizard manually, in Project Explorer, expand Files, right-click the
SOURCE module, and select Import

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [39]


Mulund College Of Commerce

On the Summary page, review the module settings. Click Finish.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [40]


Mulund College Of Commerce

On the Import Metadata Wizard: Welcome page, click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [41]


Mulund College Of Commerce

On the Import Metadata Wizard: Filter Information page, accept the default selection All Data
Files and click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [42]


Mulund College Of Commerce

On the Import Metadata Wizard: Object Selection page; expand the D:\sourcefiles node (the
location where you unzipped the setup files).

A list of files is displayed. Use >> (Add All) to move all file definitions from the Available list to
the Selected list. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [43]


Mulund College Of Commerce

The Import Metadata Wizard: Summary and Import page appears

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [44]


Mulund College Of Commerce

On this page, you see two file definitions (expense_categories_csv and export_csv) prefixed
with a red cross.

The Red Cross indicates that there is no metadata information available for this file within the
Warehouse Builder repository.

Before importing, Warehouse Builder needs to know the structure of these files. Through the
sampling process, information about the structure is gathered.

On the Import Metadata Wizard: Summary and Import page, select expense_categories_csv file,
if it is not already selected. Click Sample.

The Flat File Sample Wizard appears.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [45]


Mulund College Of Commerce

On the Flat File Sample Wizard: Welcome page, click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [46]


Mulund College Of Commerce

On the Flat File Sample Wizard: Name page, accept EXPENSE_CATEGORIES_CSV as the default
file's name.

This is the name by which Warehouse Builder refers to the file after it is imported. Warehouse
Builder offers a large number of character sets, which you could use to read the data.

Accept the defaults on this page. This file has two columns: Expense Type and Expense
Categories. The wizard makes assumptions about the structure of the flat file.

The lower portion of the dialog box displays a sample of how OWB imports the rows of the flat
file data into columns in a table. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [47]


Mulund College Of Commerce

On the Flat File Sample Wizard: Record Organization page, accept the default option of Records
delimited by carriage return (<CR>). Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [48]


Mulund College Of Commerce

On the Flat File Sample Wizard: File Format page, accept the default option of Delimited for file
format. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [49]


Mulund College Of Commerce

On the Flat File Sample Wizard: File Layout page, accept the default values of 0 for Skip Rows.
The expense_categories.csv file is an example of a single record type file.

Select Single Record for record type and click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [50]


Mulund College Of Commerce

You can use the values in the first record for the field names, when the flat file's first record is a
header.

On the Flat File Sample Wizard: Field Properties page, select Use the first record as the field
names

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [51]


Mulund College Of Commerce

In the following screenshot, notice that the field names have changed.

Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [52]


Mulund College Of Commerce

Review the summary specifications that you have defined for the expense_categories_csv file.
On the Flat File Sample Wizard: Summary page, click Finish

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [53]


Mulund College Of Commerce

On the Import Metadata Wizard: Summary and Import page, in the Status field for
expense_categories_csv, the green check mark indicates that expense_categories_csv has
been sampled.

Now select the export_csv file if not already selected. Click Sample

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [54]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [55]


Mulund College Of Commerce

Accept the defaults on this page. This file has 14 columns. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [56]


Mulund College Of Commerce

On the Flat File Sample Wizard: Record Organization page, accept the default option of Records
delimited by carriage return (<CR>). Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [57]


Mulund College Of Commerce

On the Flat File Sample Wizard: File Format page, accept the default option of Delimited for file
format. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [58]


Mulund College Of Commerce

On the Flat File Sample Wizard: File Layout page, accept the default value of 0 for Skip Rows.
The expense_categories.csv file is an example of a single record type file. Select Single Record
for Record Type and click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [59]


Mulund College Of Commerce

On the Flat File Sample Wizard: Field Properties page, select Use the first record as the field
names. You can choose to use the values in the first record for the field names, when the flat
files first record is a header.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [60]


Mulund College Of Commerce

Notice that the field names have changed.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [61]


Mulund College Of Commerce

Now there is an error because date is a reserved word and you have not yet renamed the date
field.

On the Flat File Sample Wizard: Field Properties page, select Date.

Rename Date to Expense_Date because Date is a reserved word.

From the Type drop-down list, select Date. In the Mask column, enter dd-mon-yy (without
single quotation marks).

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [62]


Mulund College Of Commerce

We can see Date is used as Column name which is a reserved keyword in Oracle.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [63]


Mulund College Of Commerce

Rename the Column name to Expense_Date.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [64]


Mulund College Of Commerce

We encounter another error here On the Flat File Sample Wizard: Field Properties page

Select Reimbursable_Amount_(USD) and Rename Reimbursable_Amount_(USD) to


Reimbursable_Amount, because '(' ')' are both reserved characters.

From the Type drop-down list, select Decimal External

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [65]


Mulund College Of Commerce

Rename Reimbursable_Amount_(USD) to Reimbursable_Amount


From the Type drop-down list, select Decimal External

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [66]


Mulund College Of Commerce

Click Next. The Flat File Sample Wizard: Summary page appears

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [67]


Mulund College Of Commerce

Review the summary specifications that you defined for the EXPORT_CSV file. On the Flat File
Sample Wizard: Summary page, click Finish

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [68]


Mulund College Of Commerce

On the Import Metadata Wizard Summary and Import page, the green check mark in the Status
field for both EXPENSE_CATEGORIES_CSV and EXPORT_CSV indicates that both the files have
been sampled.

On the Import Metadata Wizard: Summary and Import page, click Finish.

The import begins. Importing Progress Dialog shows the import progress.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [69]


Mulund College Of Commerce

In Project Explorer, expand Files > SOURCE. You see the two tables
(EXPENSE_CATEGORIES_CSV and EXPORT_CSV) you just sampled and imported.

In the Design Center, click Save All on the toolbar. In the Warehouse Builder Warning
window, click Yes to commit your work.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [70]


Mulund College Of Commerce

Defining a Target Warehouse Module


 To begin designing the model of your target warehouse, you can start by defining a
target module.
 Target modules contain the metadata definition of the target objects you design.
 Every target module must be mapped to a target user schema.
 Therefore, before you create a Warehouse Builder target module, you need to create a
target schema that will physically store your target objects on deployment.
 Then, you make sure that the target module references this target schema by assigning
an appropriate location.

To set up your target warehouse module, you perform the following steps:

1. Create a Target User


2. Create a Target Module

Create a Target User

In the Global Explorer panel, expand the Security node. Right-click the Users node and select
New

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [71]


Mulund College Of Commerce

Click on Create DB User to create a new target user.

In the Create Database User dialog box, enter system as username and <your system account
password> as the password.

Enter EXPENSE_WH as the username for the new DB user and enter the password you want.
Accept the defaults for the tablespace properties. Click OK

Follow the below Screenshot.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [72]


Mulund College Of Commerce

Observe EXPENSE_WH has been added to the Selected Users list. Click OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [73]


Mulund College Of Commerce

Examine the Users node. You find the EXPENSE_WH user added to the list of existing target users.

Also, in the Connection Explorer panel, expand the Oracle Locations node and note that a new
location, EXPENSE_WH_LOCATION, has been added.

You have created a new target schema, EXPENSE_WH, which will physically store your target
warehouse objects.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [74]


Mulund College Of Commerce

Create a Target Module

In the MCC_PRJ project, expand the Databases node, right-click the Oracle node, and select
New

The Create Module Wizard is launched. Click Next on the Welcome page.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [75]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [76]


Mulund College Of Commerce

On the Name and description page, enter EXPENSE_WH as the name of the module.

Accept Development as the module status and ensure that Warehouse Target is selected as
the module type. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [77]


Mulund College Of Commerce

Enter the Details as shown in above Screenshot and Click on Test Connection

After Successful Test Result Click OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [78]


Mulund College Of Commerce

Observe that all the information is already filled with the location, EXPENSE_WH_LOCATION

Examine the details and click Finish

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [79]


Mulund College Of Commerce

Observe that the EXPENSE_WH target module has been added under the Oracle node of the
MCC_PRJ project. Expand EXPENSE_WH and examine its contents.

The User and the location created are highlighted in above Screenshot.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [80]


Mulund College Of Commerce

Creating External Tables

 In the previous practical, you created a flat file module in which you imported and
sampled two flat files.
 To move and transform data from flat files into relational or dimensional targets, you can
use either a flat file operator or External table.
 External tables enable you to represent data from file sources in relational table format
 External tables allow you to directly query flat files from the Oracle database and also
query join, transform, and constrain flat files.

Here now, we create two external tables that will point to the two previously sampled flat files.

In the Project Explorer panel, expand MCC_PRJ.


Expand Databases > Oracle > EXPENSE_WH. Right-click External Tables and select New

The Create External Table Wizard is launched. Click Next on the welcome page. The wizard
guides you through the creation of an external table.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [81]


Mulund College Of Commerce

On the Name and Description page, enter EXPENSE_CATEGORIES as the name of the external
table. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [82]


Mulund College Of Commerce

On the File Selection page, select EXPENSE_CATEGORIES_CSV and click Next.


This file, which you sampled in the previous lesson, contains the metadata for the external table.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [83]


Mulund College Of Commerce

On the Locations page, you select the default location that is used by the external table.
Select SOURCE_LOCATION from the location drop-down box. Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [84]


Mulund College Of Commerce

On the Summary page, review the details and click Finish.


The wizard creates the external table. In Project Explorer, you see EXPENSE_CATEGORIES added
to the External Tables node.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [85]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [86]


Mulund College Of Commerce

Now, you repeat the same steps to create an external table for the export_csv file.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [87]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [88]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [89]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [90]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [91]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [92]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [93]


Mulund College Of Commerce

Observe, that both external tables are added to the target module.

You need to configure the physical file system details for the two external tables.
Right-click EXPENSE_CATEGORIES and select Configure.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [94]


Mulund College Of Commerce

In the Configuration Properties dialog box, right-click Data Files and select Create.
Accept the default name, NEW_DATAFILE_1.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [95]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [96]


Mulund College Of Commerce

On the right side in the Configuration Properties dialog box, select SOURCE_LOCATION for the
Data File Location property.
For the Data File Name property, enter expense_categories.csv. Click OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [97]


Mulund College Of Commerce

Repeat the same steps to configure the EXPENSE_DATA external table. The configuration
should look as shown in the screenshot.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [98]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [99]


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

Click OK

You have finished creating two external tables pointing to the two sampled flat files.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

Designing Dimensions
 Dimensions are the primary organizational unit of data in a star schema.
 A dimension consists of a set of levels and a set of hierarchies defined using these levels.
 Users often analyze data by drilling down on known dimension hierarchies.

To create a dimension, you must define the following:

1. Dimension Attributes
2. Levels
3. Level Attributes
4. Hierarchies

Create REL_TIME Dimension Using the TIME Dimension Wizard

Warehouse Builder enables you to not only create but also populate time dimensions. When you
create a time dimension using the wizard, Warehouse Builder automatically creates the mapping
for you to populate the time dimension.

Now, expand EXPENSE_WH, right-click Dimensions and select New > Using Time Wizard.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

The Create Time Dimension Wizard is launched. Click Next on the Welcome Page.

On the Name and Description page, enter REL_TIME as the name of the dimension. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

On the Storage page, select Relational Storage (ROLAP) to specify relational implementation
of the dimension. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

On the Data Generation page, you specify the range of time data that is required for your
warehouse.

This information is used to generate a mapping that populates the time dimension.

For Start Year, enter 2003 and for Number of Years enter 3. Ensure that Calendar is selected, as
shown in the screenshot.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

On the Levels page, select Normal Hierarchy and select all the levels: Calendar Year, Calendar
Quarter, Calendar Month and Day. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

On the Pre Create settings page, examine the details and click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [10


Mulund College Of Commerce

A progress bar shows the progress as the wizard creates the necessary objects.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

On successful completion, click Next. On the Summary page, examine the details again and click
Finish.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

Observe that the wizard has generated four objects necessary for a fully functional TIME
dimension:

 REL_TIME dimension object.


 REL_TIME_SEQ sequence that populates the surrogate ID of the time dimension levels.
 REL_TIME table to support the relational implementation of the time dimension that
physically stores the time data.
 REL_TIME_MAP mapping to populate the time dimension.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

If you are curious to know how REL_TIME_MAP looks like, Right-click REL_TIME_MAP under
the Mappings node and select Open Editor and this will launch the Mapping Editor

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

From the View menu, select Auto Layout. You can see the expanded mapping.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

Create the REL_CATEGORY Dimension Using the Wizard

In the EXPENSE_WH module, right-click Dimensions and select New > Using Wizard

The Create Dimension Wizard is launched. Click Next on the Welcome Page.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

On the Name and Description page, enter REL_CATEGORY as the name of the dimension. Click
Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

On the Storage Type page, select Relational Storage (ROLAP) to specify the relational
implementation of the dimension. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [11


Mulund College Of Commerce

On the Dimension Attributes page, you find three predefined columns, ID, NAME, and
DESCRIPTION.

Note that for the ID attribute, the identifier is set as Surrogate and for the Name attribute the
identifier is set as Business.

You can change these attributes to your liking, but must have a surrogate and a business
identifier in the list.

The surrogate identifier must have the NUMBER data type.

For the NAME attribute, change Length to 30. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

On the Levels page, specify the following levels for the default hierarchy in the dimension:

CATEGORY (Description: Accounting Category)

TYPE (Description: As entered on Expense Report)

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

Click Next.

On the Level Attributes page, for each level that you have defined, you select the dimension
attributes that apply to that level. Accept the default selection and click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

On the Slowly Changing Dimension page, leave the default slowly changing dimension option
selected. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

On the Pre Create Settings Page. The Dimension Creation Progress page appears. On successful
completion, click Next. Click Finish on the Summary page.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

Observe that REL_CATEGORY dimension has been added to the EXPENSE_WH target module.

With the dimension, Warehouse Builder also creates a table that implements the dimension in a
star schema and also creates a sequence to load the ID column of the dimension.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

Designing Cubes
 Cubes contain measures and link to one or more dimensions.
 The axes of a cube contain dimension values and the body of the cube contains measure
values.
 In a relational implementation, a cube is linked to dimension tables by foreign key
constraints and consists of a set of measures.

To create a cube, you must define the following:

1. Cube Measures.
2. Cube Dimensionality.

Now switch to the EXPENSE_WH module, right-click Cubes, and select New > Using Wizard

The Create Cube Wizard is launched. Click Next on the Welcome Page.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

On the Name and Description page, enter REL_EXPENSE as the name of the cube. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [12


Mulund College Of Commerce

On the Storage Type page, select ROLAP: Relational Storage to specify relational
implementation of the cube.
Click Next

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

On the Dimensions page, you select the dimensions that the cube will refer to. In the Available
Dimensions list, expand Dimensions, and then expand EXPENSE_WH.

Select EXPENSE_WH, and then click > to move the two dimensions REL_CATEGORY and
REL_EXPENSE to Selected Dimensions list. Click Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

On the Measures page, enter EXPENSE in the Name field. Accept the default data type. Click
Next.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

On the Summary page, review the cube details and click Finish

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

Observe that REL_EXPENSE cube is added under the Cubes node of the EXPENSE_WH module.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

To view the cube in the Data Object editor, right-click REL_EXPENSE and select Open Editor or
double-click REL_EXPENSE.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

Examine the cube, and then close the Data Object Editor.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

From the Design menu, select Save All to commit your work.

So till now, we have created two external tables mapped to the two previously sampled source
flat files, two dimensions, REL_TIME and REL_CATEGORY, and a cube REL_EXPENSE linked to
the two dimensions.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

Designing Mappings
Mappings extract data from the source, transform the data, and load the data into the target
module (EXPENSE_WH), which you defined in the previous Practical.

Design a Mapping between an External Table and a Dimension

In the Project Explorer, expand MCC_PRJ.


Expand Databases > Oracle > EXPENSE_WH > Mappings.

Note that you see a REL_TIME_MAP mapping, which was automatically created by OWB when
you created the time dimension REL_TIME using the Time Wizard.

Right-click Mappings and select New

The Create Mapping window appears.

In the Create Mapping window, enter REL_CATEGORY_MAP as name of the mapping. Click OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [13


Mulund College Of Commerce

In the Project Explorer panel, you see an entry for the REL_CATEGORY_MAP mapping under the
EXPENSE_WH module.

The Mapping Editor launches the REL_CATEGORY_MAP mapping.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

From the Palette, drag the Dimension operator to the canvas. The Add Dimension Operator
window appears.

In the Add Dimension Operator window, navigate to the EXPENSE_WH module and select the
REL_CATEGORY dimension. Click OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

The REL_CATEGORY dimension object is dropped on the canvas.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Alternatively, you can add existing sources and targets to a mapping through the Explorer
panel, which is on the left side of the Mapping Editor.

In the Explorer panel, ensure that Available objects tab is selected.

Expand Oracle > EXPENSE_WH > External Tables. Drag EXPENSE_CATEGORIES to the canvas.

Now there are two objects on the canvas, the EXPENSE_CATEGORIES external table and the
REL_CATEGORY dimension.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Connect the source (EXPENSE_CATEGORIES external table) to the target (REL_CATEGORY


dimension) as follows.

Drag a connection line from


EXPENSE_CATEGORIES.OUTGRP1.EXPENSE_TYPE to REL_CATEGORY.TYPE.NAME

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Drag a connection line from


EXPENSE_CATEGORIES.OUTGRP1.EXPENSE_TYPE to REL_CATEGORY.TYPE.DESCRIPTION

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Drag a connection line from


EXPENSE_CATEGORIES.OUTGRP1.EXPENSE_CATEGORY to
REL_CATEGORY.CATEGORY.NAME

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Drag a connection line from

EXPENSE_CATEGORIES.OUTGRP1.EXPENSE_CATEGORY to
REL_CATEGORY.CATEGORY.DESCRIPTION

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Drag a connection line from


EXPENSE_CATEGORIES.OUTGRP1.EXPENSE_CATEGORY to
REL_CATEGORY.TYPE.CATEGORY_NAME.

Connection lines graphically represent how the data flows from a source, through operators, and
to a target.

You have just completed designing the mapping. Now get ready to generate the code for the
mapping.

In the Mapping Editor, from the menu, select Mapping > Generate. You have now generated
the code that loads the dimension. Based on the ETL logic that you design in a mapping,
Warehouse Builder generates the code required to implement your design.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [14


Mulund College Of Commerce

The Generation Results window is displayed. The Generation Results window displays the code
that has been generated for you.

Close the Mapping Editor.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

Design a Mapping between an External Table and a Cube

In the Project Explorer, expand MCC_PRJ.


Expand Databases > Oracle > EXPENSE_WH > Mappings. Right click the Mappings node and
select New.

The Create Mapping window appears.

In the Create Mapping window, enter REL_EXPENSE_MAP as the name of the mapping. Click
OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

In the Project Explorer you see an entry for the REL_EXPENSE_MAP mapping under the
EXPENSE_WH module.

The Mapping Editor is launched.

In the Explorer panel, on the left of the Mapping Editor, ensure that the Available objects tab
is selected.

Expand Oracle > EXPENSE_WH > External Tables. Drag the EXPENSE_DATA external table to
the canvas.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

The EXPENSE_DATA external table object is on the canvas.

In the Explorer panel, ensure that the Available objects tab is selected.

Expand Oracle > EXPENSE_WH > Cubes.

Drag the REL_EXPENSE cube to the canvas.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

Now, there are two objects on the canvas, the EXPENSE_DATA external table operator and the
REL_EXPENSE cube operator.

In the Mapping Editor, from the Palette panel, drag the Expression operator to the canvas.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

In this example, the Expression operator is used to transform the EXPENSE_DATE attribute in
the EXPENSE_DATA external table from a date data type to a number data type.

The target attribute in the cube is a number data type; therefore, this data type conversion is
required to match the data type.

Drag a connection line from EXPENSE_DATA.OUTGRP1.EXPENSE_DATE to


EXPRESSION.INGRP1.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

Right-click the expression operator EXPRESSION header and select Open Details

In the Expression Editor, click the Output Attributes tab. Click Add.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

Rename the OUTPUT1 attribute to EXPENSE_DATE. Ensure that the data type is NUMBER. Click
OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

In the Mapping Editor, click the expression operator EXPRESSION header, and select
OUTGRP1.EXPENSE_DATE.

In the Attribute Properties panel, click the field next to the Expression property and Click the
Ellipse button on the extreme right to launch Expression Builder.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [15


Mulund College Of Commerce

In the Expression Builder, enter the following statement in Expression for EXPRESSION.

TO_NUMBER(TO_CHAR(INGRP1.EXPENSE_DATE , 'YYYYMMDD'), '99999999')

Click Validate and then Click OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Connect the source operator to the target operator as follows:

Drag a connection line from EXPRESSION.OUTGRP1.EXPENSE_DATE to

REL_EXPENSE.REL_EXPENSE.REL_TIME_DAY_CODE

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Drag a connection line from EXPENSE_DATA.OUTGRP1.EXPENSE_TYPE to

REL_EXPENSE.REL_EXPENSE.REL_CATEGORY_NAME

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Drag a connection line from EXPENSE_DATA.OUTGRP1.REIMBURSABLE_AMOUNT to

REL_EXPENSE.REL_EXPENSE.EXPENSE

You have just completed designing the mapping. Now you can generate the code for the
mapping.

In the Mapping Editor, from the menu, select Mapping > Generate.

Warehouse Builder generates the code required to implement your design.

The Generation Results window appears. The Generation Results window displays the code that
has been generated for you.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

From the toolbar, click Save All to commit your work. Close the Mapping Editor.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Deploying Objects in the Target Warehouse

 Deployment is the process of creating your target system from the logical design or
model.
 The process includes generating scripts, such as DDL that creates data objects (such as
tables, views, and dimensions).
 The process also includes generating SQL, PL/SQL, and SQL*Loader scripts that load data
into data objects.
 When you deploy relational database or dimensional objects, such as sequences, tables,
dimensions or cube, the DDL scripts are generated and executed simultaneously to
physically create the objects.
 When you deploy ETL mappings, the deploy procedure only generates a PL/SQL script.
You need to explicitly execute the scripts to perform ETL.
 To deploy objects, Oracle Warehouse Builder provides two options: you can either use
the Control Center Manager or you can deploy objects directly from the Project
Explorer in the Design Center.
 The Control Center Manager offers a comprehensive deployment console that enables
you to view and manage all aspects of deployment, including configuration and
validation.
 In the Control Center Manager, you can view the deployment history of an object. The
deployment history is also used to automatically determine the default deployment
action.
 These options are not available if you deploy objects from the Project Explorer tree in the
Design Center.

Deploying the External Table

To deploy, you must launch the Control Center Manager. From the Tools menu, select
Control Center Manager.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

The Control Center Manager is launched. The Control Center Manager console appears
as shown in the screenshot.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Expand EXPENSE_WH_LOCATION, and then expand EXPENSE_WH. On the right, in the


Object Details panel, examine the design status; deploy status, and other details of all
the objects that you designed in previous practical’s.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

In the navigation tree on the left, expand and select External Tables.

In the Object Details panel on the right, check whether the Design Status is set to New
for both external tables, EXPENSE_CATEGORIES and EXPENSE_DATA.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

Click Default Actions (highlighted in the screenshot) and observe that Deploy Action is
changed to Create.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [16


Mulund College Of Commerce

To deploy the selected external tables, from the File menu, select Deploy > To Control
Center or click the Deploy

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

You have now successfully deployed the two external tables to the EXPENSE_WH
schema.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

To check the data loaded in External table Right Click on EXPENSE_CATEGORIES and
select Data.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Check all the data from the Flat files are loaded into External Table.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Right Click on EXPENSE_DATA and select Data.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

We can see here 1,425 Rows are inserted into EXPENSE_DATA External Table.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Deploying tables, sequences, mappings and cube

Before you deploy the dimensions and the cube, you need to deploy the relational tables and
sequences that these dimensions and cube are based on.

In EXPENSE_WH, expand Tables. Expand Sequences. To deploy all the tables and sequences,
select Tables, press and hold [Ctrl], and select Sequences.

Observe the Design Status of the three tables and two sequences.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Click Default Actions to set Deploy Action to Create.

From the File menu, select Deploy > To Control Center or click the Deploy button on the
toolbar.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [17


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

The deployment is successful. Click OK.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Deploying the Cube and the Referenced Dimensions

You can now deploy the cube. Before the cube is deployed, you should have deployed the
related dimensions.

Before you deploy the dimensions and the cube, ensure that the deployment option is set to
Deploy to Catalog Only.

To set the deployment options, right-click the appropriate dimension or cube in the design
center and select Configure from the menu. In the Configuration Properties dialog box, set the
deployment options property to Deploy to Catalog Only.

The screenshot shows Configuration Properties dialog box for REL_EXPENSE cube.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Deploying the Dimensions

In EXPENSE_WH, expand and select Dimensions. Observe that Design Status for all the objects
is set to New.

Click Default Actions to change Deploy Action to Create.

To deploy, select Deploy > To Control Center from the File menu, or click the Deploy button

And you will receive a successful Deployment message box. Click OK

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Deploying the Cube

In EXPENSE_WH, expand and select Cubes. Note that Design Status for all the objects is set to
New.

Click Default Actions to change Deploy Action to Create.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

To deploy, select Deploy > To Control Center from the File menu, or click the Deploy button

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

The REL_EXPENSE cube and the REL_TIME and REL_CATEGORY dimensions are successfully
deployed.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Deploying the Mappings

You have deployed the external tables, the dimensions, and the cube; you now deploy the ETL
mappings. When you deploy a mapping, Warehouse Builder generates appropriate scripts.

For mappings, you need to follow an extra step of executing these scripts to actually perform
ETL from the source to the targets.

In EXPENSE_WH_LOCATION, select Mappings. In the Object Details panel, three mappings are
selected with Design Status set to New.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

Click Default Actions to change Deploy Action from None to Create.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [18


Mulund College Of Commerce

From the File menu, select Deploy > To Control Center or click the Deploy button.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

The mappings are deployed successfully and are ready for execution

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Executing the Mappings

To load data into the target dimensions and cube, you need to execute the Mappings.

To execute a Mapping, you can either select Start from the File menu or click the Start button
on the toolbar or Right click the Mapping and select Start.

Executing REL_TIME_MAP

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

When you click the Start button, the Control Center Jobs panel switches to the Execution tab.

To view the execution details, double-click LOAD_EXPENSE_WH in the Job column of the
Control Center Jobs panel.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Click the Execution Results tab and monitor Row Activity. You can get a count of how
many rows were inserted in respective dimensions and the cube.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Executing REL_EXPENSE_MAP

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Executing REL_CATEGORY_MAP

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

On successful execution, all the dimensions and the cube are now loaded with data.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

Viewing Data in the Data Viewer

You can view the data loaded in the dimensions and the cube from within the Oracle
Warehouse Builder design client environment by using the Data Viewer.

To view REL_EXPENSE cube data, expand Cubes under EXPENSE_WH and right-click
REL_EXPENSE. Select Data.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [19


Mulund College Of Commerce

We can see that Data is loaded in the CUBE

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

By clicking on small triangular arrows you can explore various Levels.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

Similarly you can view the cube data from Data Object Editor within the Data Viewer
tab.

At bottom you can view the data in Graphical format by clicking on small icons.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

The Bar Graph of the Cube Data

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

The 3D view of Cube data.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

Working with Pivot Tables and Pivot Chart in Excel

PivotTables are one of the most powerful features of Microsoft Excel. They allow large amounts
of data to be analyzed and summarized in just a few mouse clicks.

How to Create a PivotTable

First, ensure that you have some raw data in a worksheet in Excel. So we start Excel and we load
such a list.

Once we have the list open in Excel, we’re ready to start creating the PivotTable.

Click on any one single cell within the list:

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

Then, from the Insert tab, click the PivotTable icon:

The Create PivotTable box appears, asking you two questions:

What data should your new PivotTable be based on, and where should it be created?

Because we already clicked on a cell within the list (in the step above), the entire list surrounding
that cell is already selected for us.

We also need to select whether we want our new PivotTable to be created on a new worksheet,
or on an existing one. In this example we will select a new one:

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of Commerce

The new worksheet is created for us, and a blank PivotTable is created on that worksheet:

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of

Another box also appears: The PivotTable Field List.

The list of fields in the top part of the box is actually the
collection of column headings from the original raw data
worksheet.

The four blank boxes in the lower part of the screen allow us to
choose the way we would like our PivotTable to summarize the
raw data.

It's important to understand how the PivotTable field List works


and the ways that you can arrange different types of fields so
that you can achieve the results that you want when you create
the field layout of a PivotTable or PivotChart report.

The figure below illustrates the functionality.

Oracle Warehouse Builder Practical Manual. Compiled By – Prof. Kirti Shirwayya. [208]
Mulund College Of

So far, there is nothing in those boxes, so the PivotTable is blank. All we need to do is drag
fields down from the list above and drop them in the lower boxes.

A perfect candidate for this this Value box in our sample data is the “Amount” field/column.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [20


Mulund College Of

Notice that (a) the “Amount” field in the list of fields is now ticked, and “Sum of Amount” has
been added to the Values box, indicating that the amount column has been summed.

If we examine the PivotTable itself, we indeed find the sum of all the “Amount” values from the
raw data worksheet.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Now if we would like to see a summary of our data, where we have a row heading for each of
the different salespersons in our company, and a total for each salesperson.

To achieve this, all we need to do is to drag the “Salesperson” field into the Row Labels box:

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Using “Payment Method” as a column heading. Simply drag the “Payment Method”
heading to the Column Labels box:

Which looks like this?

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Drag the “Package” column/heading to the Report Filter box:

Notice where it ends up….

This allows us to filter our report based on which “holiday package” was being
purchased.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

We only want to see cheque and credit card transactions (i.e. no cash transactions),
then we can deselect the “Cash” item from the column headings.

Click on the drop-down arrow next to Column Labels, and un-tick “Cash”:

As you can see, “Cash” is gone.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

How to Create a Pivot Chart

First, ensure that you have some raw data in a worksheet in Excel. So we start Excel and we load
a list. Once we have the list open in Excel, we’re ready to start creating the PivotChart.

Click on any one single cell within the list:

Then, from the Insert tab, click the PivotTable dropdown icon and select PivotChart:

The Create PivotTable with PivotChart box appears, asking you two questions:

What data should your new PivotTable be based on, and where should it be created?

Because we already clicked on a cell within the list (in the step above), the entire list surrounding
that cell is already selected for us.

We also need to select whether we want our new PivotChart to be created on a new worksheet,
or on an existing one. In this example we will select a new one:

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Use the PivotChart Filter Pane to sort and filter the underlying data and change the
appearance of the PivotChart report.

Axis fields (Categories) box: This displays items from the Row label of the associated
PivotTable report that form individual categories for which data points are charted. Categories
appear on the horizontal (category) axis, also called the x-axis, of the PivotChart report.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Legend fields (Series) box: This displays items from the Column label of the associated
PivotTable report that form the individual data series. The names of the series appear in the
legend of the PivotChart report.

The Report Filter box: If the associated PivotTable report has one or more report filters, you can
use the Report Filter box as a convenient way to summarize and quickly focus on a subset of
data without modifying your series and category information.

To start with a pivot chart lets drag the Amount field from the Field List into the Values Box,
notice that a chart is created with a label of Sum of Amount and total amount is displayed.

Now drag Salesperson from field list and drop into the Axis Field box and notice that
salesperson is listed on the X-axis with total Amount on Y-Axis.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

Similarly you have to drag Package from the Field List into the Report Filter box and Payment
method into the Legend Fields box.

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [21


Mulund College Of

You can filter the data according to Payment Method by clicking on the link on the chart and
filter out the data by ticking appropriate options.

After filtering for only Cash and Cheque

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [22


Mulund College Of

Oracle Warehouse Builder Practical Compiled By – Prof. Kirti [22

You might also like