Вы находитесь на странице: 1из 678

Oracle Warehouse Builder

Oracle Warehouse Builder User’s Guide

Release 3i

June 15, 2001


Part No. A90361-01
Oracle Warehouse Builder User’s Guide, Release 3i

Part No. A90361-01

Copyright © 1996, 2001, Oracle Corporation. All rights reserved.

Authors: Patrick Terhune, Shirinne Alison

Contributing Authors: Kavita Nayar, Yu Gong

Contributors: Thomas Lau, Edwin Meijer, Jooseph Zheng, Barry Mosbrucher, Thomas O’Shaughnassy,
Dan Gallagher, Josephine Ho, David Allen, Krishna Behara, Gary Hostetler, JaimeSingson, Robert Velisar,
Robert Paul, Joseph Klein, Josef Hasenberger, Jim Lorenz, Jean-Pierre Djicks, Olaf Fermum, Shauna
O’Boyle, Jeffrey Hutchins, Debra Phelan, Elina Sternik, John Potter, Barry Mosbrucher, Adrian Scott,
Ning Lin, Lefty Leverenz, James Jonas, Brian Jeffries, Arun Manchanda, Richard Whittington, Ramesh
Uppala.

The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent, and other intellectual and industrial property
laws. Reverse engineering, disassembly, or decompilation of the Programs is prohibited.

The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.

If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:

Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.

The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.

Oracle is a registered trademark, and of Oracle Corporation. Other names may be trademarks of their
respective owners.
Contents

Send Us Your Comments ................................................................................................................. xix

Preface.......................................................................................................................................................... xxi

1 Overview
The Developmental Phases............................................................................................................... 1-2
The Definition Phase .................................................................................................................... 1-3
Defining A Warehouse ......................................................................................................... 1-3
Defining The Data Sources and Targets............................................................................. 1-3
Defining ETL Mappings ....................................................................................................... 1-4
The Generation Phase .................................................................................................................. 1-5
The Load And Manage Phase..................................................................................................... 1-6
Taking The Next Step......................................................................................................................... 1-6

2 Getting Started on a Project


Understanding The OWB Project .................................................................................................... 2-2
About Warehouse Builder Projects............................................................................................ 2-2
Module Contents ................................................................................................................... 2-3
Object Names ......................................................................................................................... 2-3
About Multiple-User Access ....................................................................................................... 2-4
Read/Write Mode ................................................................................................................. 2-4
Read Only Mode.................................................................................................................... 2-5
Lock Synchronization ........................................................................................................... 2-6
Creating A Project......................................................................................................................... 2-7

iii
Logging On To A Repository...................................................................................................... 2-8
Using The New Project Wizard ................................................................................................ 2-10
Commit ................................................................................................................................. 2-10
About The OWB Console................................................................................................................ 2-11
Operational Environments........................................................................................................ 2-12
Project Environment ........................................................................................................... 2-12
Transformation Environment............................................................................................ 2-14
Administration Environment ............................................................................................ 2-15
The Utilities Button .................................................................................................................... 2-15
Utility Property Sheet ......................................................................................................... 2-16
The Console Tool Bar ................................................................................................................. 2-18
Property Icon and Property Sheets ................................................................................... 2-18
The Commit Icon ................................................................................................................. 2-19
About Naming Policies.................................................................................................................... 2-20
Setting The Naming Mode ........................................................................................................ 2-21
Logical Name Mode............................................................................................................ 2-21
Physical Name Mode .......................................................................................................... 2-23
Using The Warehouse Builder Wizards ....................................................................................... 2-23
Using Navigation and Help............................................................................................... 2-24
Searching Navigation Trees ............................................................................................................ 2-25
Taking The Next Step....................................................................................................................... 2-27

3 The Target Modules


About Star Schemas ........................................................................................................................... 3-2
About Dimension Tables ............................................................................................................. 3-2
About Fact Tables ......................................................................................................................... 3-3
Linking Facts to Dimensions ............................................................................................... 3-3
Physical Characteristics ........................................................................................................ 3-3
About Materialized Views .......................................................................................................... 3-4
Requirements for Query Rewrite ........................................................................................ 3-4
About Conventional Views......................................................................................................... 3-5
Creating a Warehouse Module ......................................................................................................... 3-5
Displaying the Warehouse Module ......................................................................................... 3-10
Verifying the Module.......................................................................................................... 3-10
Inspecting the Module ........................................................................................................ 3-10

iv
Creating Dimension Definitions ................................................................................................... 3-11
Defining Rules for Dimension Objects .................................................................................... 3-12
About Levels and Hierarchies ........................................................................................... 3-12
About Unique Key Constraints ......................................................................................... 3-12
About Mixed Levels of Aggregation ................................................................................ 3-13
Creating A Dimension Definition ............................................................................................ 3-14
Updating Dimension Definitions ............................................................................................. 3-21
Using The Dimension Editor ............................................................................................. 3-21
Using The Property Sheets................................................................................................. 3-22
Creating Attribute Sets ....................................................................................................... 3-29
Using the New Time Dimension Wizard................................................................................ 3-33
About the New Time Dimension Wizard........................................................................ 3-34
Creating a Time Dimension Definition ................................................................................... 3-34
Defining a Sequence Object....................................................................................................... 3-37
Creating Fact Table Definitions ..................................................................................................... 3-37
Creating a Definition for a Fact Table...................................................................................... 3-38
Updating a Fact Table Definition ............................................................................................. 3-41
Using the Fact Editor .......................................................................................................... 3-41
Importing Definitions ................................................................................................................ 3-45
Creating Materialized View Definitions...................................................................................... 3-46
Creating A Materialized View Definition ............................................................................... 3-47
Updating a Materialized View Definition .............................................................................. 3-51
Renaming a Materialized View ......................................................................................... 3-51
Creating Conventional View Definitions .................................................................................... 3-52
Creating A View Definition ...................................................................................................... 3-52
Updating a View Definition...................................................................................................... 3-56
Renaming A View ............................................................................................................... 3-57
Adding Transformations ................................................................................................................. 3-58
About Transformations ............................................................................................................ 3-58
About Transformation Parameters .......................................................................................... 3-59
About Oracle Transformation Libraries.................................................................................. 3-59
The Global-Shared Library ................................................................................................ 3-60
The Oracle Library .............................................................................................................. 3-60
Accessing Transformation Libraries................................................................................. 3-60
Creating Transformation Categories ................................................................................ 3-60

v
Defining Custom Transforms ................................................................................................... 3-61
Editing Transformation Properties .......................................................................................... 3-64
Importing PL/SQL Packages.................................................................................................... 3-64
Defining Business Areas ................................................................................................................. 3-69
About Business Areas ................................................................................................................ 3-70
Creating a Definition for a Business Area............................................................................... 3-71
Infrastructure Requirements .......................................................................................................... 3-73
Committing Your Changes.............................................................................................................. 3-74
Taking the Next Step ........................................................................................................................ 3-74

4 The Data Source Modules


Creating Source Modules.................................................................................................................. 4-2
About OWB Software Integrators .............................................................................................. 4-2
Configuring Connection Information for Database Sources.................................................. 4-2
Using The New Database Link Dialog............................................................................... 4-4
Creating A Database Link Pointing to an Oracle System................................................ 4-6
Creating A Link Pointing to an IBM DB2 System ............................................................ 4-6
Creating A Source Module for Database Definitions.............................................................. 4-7
Updating A Source Module Definition ................................................................................... 4-11
Creating A Source Module for an Oracle Designer Repository .......................................... 4-12
Creating A Source Module for Flat Files................................................................................. 4-13
Updating A Flat File Source Module ....................................................................................... 4-16
Importing Definitions From Database Sources.......................................................................... 4-16
Importing Definitions from an Oracle Database.................................................................... 4-17
Re-Importing Definitions from an Oracle Database.............................................................. 4-21
Updating Oracle Database Source Definitions....................................................................... 4-25
Creating Definitions for Flat File Sources ................................................................................... 4-28
Using The Flat File Sample Wizard ......................................................................................... 4-29
Creating a Definition for a Fixed-Length File ........................................................................ 4-31
Using The Source Module Editor...................................................................................... 4-36
Defining Multiple Records in a Fixed-Length File ......................................................... 4-36
Updating a Fixed-Length File Definition ................................................................................ 4-39
Updating a Multiple-Record Fixed-Length Definition .................................................. 4-40
Specifying Logical Records ................................................................................................ 4-41
Creating a Definition for a Delimited File .............................................................................. 4-41

vi
Defining Multiple Record Types in a Delimited File ..................................................... 4-44
Updating a Delimited File Definition ...................................................................................... 4-47
Updating a Single-Record Delimited File Definition ..................................................... 4-47
Updating a Multiple-Record Delimited File Definition................................................. 4-47
Importing Definitions for Pure Extract and Pure Integrate...................................................... 4-49
Importing Definitions from an Export File ............................................................................. 4-49
Infrastructure Requirements .......................................................................................................... 4-51
Oracle Heterogeneous Services ................................................................................................ 4-51
Transparent Gateway ......................................................................................................... 4-51
Generic Connectivity .......................................................................................................... 4-51
Flat File Sources .......................................................................................................................... 4-52
Committing Your Changes.............................................................................................................. 4-52
Taking The Next Step....................................................................................................................... 4-53

5 The Source to Target Mappings


About Mappings ................................................................................................................................. 5-2
About Rows ................................................................................................................................... 5-2
About Row-Sets ............................................................................................................................ 5-2
About Operators ........................................................................................................................... 5-3
About Operator Properties.......................................................................................................... 5-3
About Attributes And Attribute Groups .................................................................................. 5-4
About Display Sets ....................................................................................................................... 5-4
About Binding Mapping Operators........................................................................................... 5-5
About Mapping Operator Names .............................................................................................. 5-6
About Reconciliation.................................................................................................................... 5-6
When To Use Inbound Reconciliation................................................................................ 5-7
When to use Outbound Reconciliation .............................................................................. 5-8
About The Mapping Editor......................................................................................................... 5-8
About Expressions...................................................................................................................... 5-12
About Mapping Generation...................................................................................................... 5-13
Defining Mappings .......................................................................................................................... 5-13
Creating a Mapping Warehouse Object .................................................................................. 5-14
Selecting A Source Operator ..................................................................................................... 5-17
Selecting a Target Operator....................................................................................................... 5-20
Selecting A Data Flow Operator............................................................................................... 5-23

vii
Defining The Data Flow Connections ..................................................................................... 5-24
Configuring A Mapping............................................................................................................ 5-26
Setting The Load Type........................................................................................................ 5-26
Configuring Physical Properties For a Mapping............................................................ 5-28
Validating the Mapping............................................................................................................. 5-29
Generating the Mapping ................................................................................................................. 5-31
Editing Mapping Operator Attributes.......................................................................................... 5-33
Adding or Removing Operator Attribute Groups................................................................. 5-33
Editing Operator Attributes...................................................................................................... 5-33
Adding Or Removing Attributes ...................................................................................... 5-34
Renaming Attributes........................................................................................................... 5-35
Creating New Attributes ........................................................................................................... 5-35
Reconciling Your Mapping ....................................................................................................... 5-36
Reconciling Inbound Operators ........................................................................................ 5-36
Reconciling Outbound Operators ..................................................................................... 5-37
Committing Changes To The Mapping ................................................................................... 5-39
Taking The Next Step....................................................................................................................... 5-40

6 Mapping Operators and Transformations


Using Expression Builder.................................................................................................................. 6-2
About Expression Builder ........................................................................................................... 6-2
Creating Expression Components.............................................................................................. 6-4
Adding Data Flow Operators To A Mapping................................................................................ 6-6
Filtering Data................................................................................................................................. 6-6
Ordering Data ............................................................................................................................. 6-10
Splitting Data............................................................................................................................... 6-14
De-Duplicating Data .................................................................................................................. 6-19
Aggregating Data ....................................................................................................................... 6-21
Joining Data Sources .................................................................................................................. 6-25
Adding Sequences ...................................................................................................................... 6-30
Adding External Processes........................................................................................................ 6-34
Adding Data Generators ........................................................................................................... 6-36
Setting a Column to the Datafile Record Number.......................................................... 6-37
Setting a Column to the Current Date.............................................................................. 6-37
Setting a Column to a Unique Sequence Number.......................................................... 6-37

viii
Adding Expressions ................................................................................................................... 6-40
Adding Constants....................................................................................................................... 6-44
Adding Transformations ........................................................................................................... 6-49
Adding Mapping Input Parameters ........................................................................................ 6-54
Adding Mapping Output Parameters ..................................................................................... 6-59
Adding A Pre-Mapping Process .............................................................................................. 6-63
Adding A Post-Mapping Process............................................................................................. 6-68
Taking The Next Step....................................................................................................................... 6-71

7 Mapping Configuration and Code Generation


Reconciling Mapping Operators With Repository Objects ....................................................... 7-2
Reconciling Mappings ................................................................................................................. 7-2
More About Naming Mapping Objects ............................................................................. 7-3
Using Inbound Reconciliation ............................................................................................. 7-5
Inbound Reconciliation Strategies ...................................................................................... 7-5
Using Outbound Reconciliation........................................................................................ 7-10
Configuring The Mapping For Deployment............................................................................... 7-13
Configuring Attribute Properties............................................................................................. 7-13
Delete: Use For Matching ................................................................................................... 7-14
Insert: Use For Loading ...................................................................................................... 7-14
Update: Operation............................................................................................................... 7-14
Update: Use For Matching ................................................................................................. 7-15
Update: Use For Loading ................................................................................................... 7-15
Configuring The Mapping Operator Physical Properties .................................................... 7-15
Setting The Database Link or Schema Information........................................................ 7-17
Setting Partition Exchange Loading ................................................................................. 7-18
Adding Optimizing Hints .................................................................................................. 7-22
Setting Constraint Handling.............................................................................................. 7-24
Defining Code Generation Strategies For The Mapping ......................................................... 7-24
Viewing The Generated Code for a Mapping ........................................................................ 7-24
Using the Code Viewer....................................................................................................... 7-26
Configuring Loading Step Strategies....................................................................................... 7-27
Setting The Default Audit Level ....................................................................................... 7-28
Setting the Default Purge Group....................................................................................... 7-28
Setting Maximum Number of Errors ............................................................................... 7-28

ix
Setting Commit Frequency ................................................................................................ 7-28
Setting The Default Operating Mode ............................................................................... 7-28
Setting Bulk Processing ...................................................................................................... 7-30
Setting the Analyze Statistics Percentage ........................................................................ 7-30
Setting A SQL*Loader Step ............................................................................................................ 7-30
Setting Load Operator Physical Parameters........................................................................... 7-32
Setting Enable Constraints ................................................................................................. 7-32
Setting The Exceptions Table............................................................................................. 7-32
Setting SQL*Loader Parameters........................................................................................ 7-32
Setting Step Parameters ............................................................................................................. 7-34
Setting An External Process Step................................................................................................... 7-37
Setting OS Executable/Pure Integrate..................................................................................... 7-37
Setting Pure Extract .................................................................................................................... 7-37
Taking The Next Step....................................................................................................................... 7-37

8 Configure, Generate and Deploy


Configuring a Physical Instance ...................................................................................................... 8-2
Configuring Existing Logical Objects ........................................................................................ 8-3
Configuring New Physical Objects ............................................................................................ 8-4
Configuring Warehouse Modules.............................................................................................. 8-7
Database Links....................................................................................................................... 8-7
Generation Preferences......................................................................................................... 8-8
Oracle Enterprise Manager Registration............................................................................ 8-8
Run Time Directories ............................................................................................................ 8-9
Generation Target Directories ........................................................................................... 8-10
Identification ........................................................................................................................ 8-11
Configuring Dimensions ........................................................................................................... 8-11
Performance and Parallel Parameters .............................................................................. 8-12
Partition Parameters ........................................................................................................... 8-13
Storage Space ....................................................................................................................... 8-13
Generation Options for Time Dimension ........................................................................ 8-13
Generation Options ............................................................................................................. 8-13
Identification ........................................................................................................................ 8-14
Configuring Facts ....................................................................................................................... 8-14
Performance and Parallel Parameters .............................................................................. 8-15

x
Partition Parameters ........................................................................................................... 8-16
Storage Space ....................................................................................................................... 8-16
Identification ........................................................................................................................ 8-16
Configuring Materialized Views.............................................................................................. 8-16
Materialized View Parameters .......................................................................................... 8-18
Configuring Sequences .............................................................................................................. 8-18
Configuring Tables..................................................................................................................... 8-19
Indexes .................................................................................................................................. 8-20
Partitions............................................................................................................................... 8-21
Configuring Views ..................................................................................................................... 8-23
Validating Definitions ..................................................................................................................... 8-24
Rationale for Validation............................................................................................................. 8-24
Valid and Invalid Definitions .................................................................................................. 8-25
Valid Definition ................................................................................................................... 8-25
Invalid Definition ................................................................................................................ 8-25
Validating a Set of Definitions .................................................................................................. 8-26
Generating Scripts ............................................................................................................................ 8-28
The Generated Scripts ................................................................................................................ 8-30
Database Links..................................................................................................................... 8-30
Dimensions........................................................................................................................... 8-30
Views and Materialized Views.......................................................................................... 8-31
Mappings .............................................................................................................................. 8-32
Sequences.............................................................................................................................. 8-33
Tables .................................................................................................................................... 8-33
Post Generation Tasks................................................................................................................ 8-33
The Schema Objects Tab..................................................................................................... 8-34
The Transforms Tab. ........................................................................................................... 8-35
Deploying Scripts ............................................................................................................................. 8-37
Upgrading a Warehouse Physical Instance.................................................................................. 8-41
OWB and the OEM Change Management Pack (OEM/CM) .............................................. 8-42
Generating and Executing Upgrade Scripts .......................................................................... 8-43
Taking the Next Step ........................................................................................................................ 8-48

9 Periodic Loads and Updates


Loading and Updating Jobs .............................................................................................................. 9-2

xi
Scheduling Jobs............................................................................................................................. 9-2
Types of Jobs .......................................................................................................................... 9-2
Scheduling with Oracle Enterprise Manager................................................................................ 9-3
Deploying and Registering the Jobs .......................................................................................... 9-4
Registering Job Scripts .......................................................................................................... 9-4
Verifying OEM Registration ................................................................................................ 9-5
Scheduling the Jobs ...................................................................................................................... 9-7
Scheduling .............................................................................................................................. 9-7
Submitting the Job................................................................................................................. 9-7
Submitting Jobs with Parameters........................................................................................ 9-8
Managing Dependencies Using Oracle Workflow .................................................................... 9-10
Deploying to the Oracle Workflow Server ............................................................................. 9-11
Using the Workflow Deployment Wizard....................................................................... 9-11
Defining the Workflow Process................................................................................................ 9-17
Running the Process................................................................................................................... 9-20
Running the Process Immediately .................................................................................... 9-21
Scheduling the Workflow Process .................................................................................... 9-23
Viewing the Runtime Audit ........................................................................................................... 9-23
Setting the Audit Level....................................................................................................... 9-24
Using the OWB Runtime Audit Viewer.................................................................................. 9-24
Viewing By Date Range...................................................................................................... 9-26
Searching the Navigation Tree .......................................................................................... 9-27
Refreshing the Audit Viewer ............................................................................................. 9-28
Purging Runtime Entries.................................................................................................... 9-28
Understanding the Audit Viewer ............................................................................................ 9-29
Viewing the Job Audit ........................................................................................................ 9-30
Viewing the Job Instance Audit ........................................................................................ 9-30
Viewing the Task Audit ..................................................................................................... 9-32
Viewing the Task Details Audit ........................................................................................ 9-33
Viewing the Errors .............................................................................................................. 9-36
Viewing the Error Details................................................................................................... 9-38
Taking the Next Step ....................................................................................................................... 9-38

10 Administration
Repository Administration ............................................................................................................. 10-2

xii
The OWB Metadata Loader ............................................................................................................ 10-2
Metadata Export ......................................................................................................................... 10-3
The Export File..................................................................................................................... 10-3
Exporting Metadata ............................................................................................................ 10-5
Metadata Import ......................................................................................................................... 10-8
Importing Metadata .......................................................................................................... 10-11
Metadata Loader Command Line Utility.............................................................................. 10-17
Directive Keywords for the Export Utility .................................................................... 10-17
Export a Project.................................................................................................................. 10-19
Directive Keywords for the Import Utility .................................................................... 10-20
Import Selected Modules ................................................................................................. 10-21
Validation Rules Governing Import ............................................................................... 10-21
The OWB Transfer Wizard ............................................................................................................ 10-22
The OWB Transfer Wizard Overview ................................................................................... 10-22
Transfer Considerations .......................................................................................................... 10-23
Importing Metadata into Oracle Warehouse Builder.......................................................... 10-23
Launching the OWB Transfer Wizard for Import ........................................................ 10-24
Importing Metadata using the OWB Transfer Wizard ................................................ 10-25
Exporting Metadata from Oracle Warehouse Builder ........................................................ 10-29
Launching the OWB Transfer Wizard for Export......................................................... 10-29
Exporting Metadata from OWB to a Target .................................................................. 10-31
The Archive/Restore Utility.......................................................................................................... 10-35
Setting up Preferences.............................................................................................................. 10-37
Archiving a Project ................................................................................................................... 10-39
Restoring a Project.................................................................................................................... 10-41
Reports Administration ................................................................................................................. 10-45
Using the Administration Pages .................................................................................................. 10-45
Registering an OWB Repository.................................................................................................. 10-48
Administer Database Links..................................................................................................... 10-51
Unregistering a Repository ..................................................................................................... 10-54
User Access....................................................................................................................................... 10-54
Understanding Roles................................................................................................................ 10-54
Granting or Revoking Access ................................................................................................. 10-55
Assigning a Custom Report to a Role.................................................................................... 10-56
Purging Stale User Information.............................................................................................. 10-57

xiii
Registering a Custom Report........................................................................................................ 10-57

11 OWB Metadata Reports


Viewing OWB Reports..................................................................................................................... 11-1
Viewing Reports from OWB.............................................................................................. 11-2
Viewing Reports from the OWB Browser........................................................................ 11-5
Using the OWB Browser.................................................................................................................. 11-7
Browsing Your Repository ........................................................................................................ 11-7
Header................................................................................................................................... 11-8
Item Definition..................................................................................................................... 11-9
Item Details ........................................................................................................................ 11-10
Browsing Your Favorites ......................................................................................................... 11-14
Header................................................................................................................................. 11-15
Filter..................................................................................................................................... 11-15
Navigation Favorites......................................................................................................... 11-16
Reports Favorites............................................................................................................... 11-16
Customizing Your Favorites Page .................................................................................. 11-17
The Favorites Customize Display Options Page .......................................................... 11-18
Available OWB Reports................................................................................................................. 11-19
Summary Reports.............................................................................................................. 11-19
Detailed Reports ................................................................................................................ 11-20
Implementation Reports................................................................................................... 11-22
Lineage and Impact Analysis Reports............................................................................ 11-23
Lineage and Impact Analysis Diagrams ........................................................................ 11-24
Creating Custom Reports .............................................................................................................. 11-26
Creating Custom Reports for the OWB Browser ................................................................. 11-26
Creating a Custom Report in Oracle Portal................................................................... 11-26
Registering the Custom Report with the OWB Browser ............................................. 11-27
Adding a Custom Report to an OWB Browser Role .................................................... 11-28
Viewing the Custom Report from the OWB Browser.................................................. 11-28
Creating Other Custom Reports............................................................................................. 11-28

A Reserved Words
Reserved Words................................................................................................................................... A-2

xiv
B The Mapper User Interface
The Mapping Editor ........................................................................................................................... B-1
The Mapping Menu Bar............................................................................................................... B-1
The Mapping Toolbar .................................................................................................................. B-4
The Object Palette ......................................................................................................................... B-5
The Operator Property Inspector ............................................................................................... B-6
Using the Mouse in the Mapping Editor................................................................................... B-7
Left Mouse Click Operations ............................................................................................... B-7
Tool Tips ................................................................................................................................. B-8
Right Mouse-Click Operations ............................................................................................ B-8
Keyboard Operations.......................................................................................................... B-10
Other Dialogs .................................................................................................................................... B-11
The Add Operator Dialog ......................................................................................................... B-11
The Add/Remove Attributes Dialog....................................................................................... B-12
The (Inbound and Outbound) Reconcile Dialog.................................................................... B-13
The Physical Properties Inspector ............................................................................................ B-13

C OWB Public View Tables


Management ........................................................................................................................................ C-1
Data Model .................................................................................................................................... C-3
Implementation Model .............................................................................................................. C-10
Flat File/Record Model ............................................................................................................. C-11
Impact Analysis/Data Lineage Model .................................................................................... C-14
Classification Model................................................................................................................... C-17
Expression & Function Model .................................................................................................. C-18
Configuration & Deployment Model ...................................................................................... C-20
Transformation/Mapping Model ............................................................................................ C-20
Runtime Public Views................................................................................................................ C-23

D Using The XML Toolkit


Retrieving Data From Sources .................................................................................................... D-1
Storing Data In Targets ................................................................................................................ D-2
Using Runtime Controls .............................................................................................................. D-2
How to Call the XML Toolkit ..................................................................................................... D-2

xv
Typical Control Files .................................................................................................................... D-4
XML Documents Stored in Files ................................................................................................. D-5
XML Documents Stored as Other Objects.............................................................................. D-11
Document Stored as a CLOB ............................................................................................ D-11
Document Stored As An Object-Based Advanced Queue............................................ D-13
Document Stored at URL .................................................................................................. D-15
Control File Element Names and Attributes ........................................................................ D-15
Source Elements.................................................................................................................. D-15
Target Elements .................................................................................................................. D-18
Runtime Control ................................................................................................................. D-18
Document Type Definition for the Control File .................................................................... D-19
Reference Materials ................................................................................................................... D-21

E Batch Services
Overview .............................................................................................................................................. E-1
Batch Service Interface....................................................................................................................... E-1
Open and Close Repository Connection ................................................................................... E-2
Projects ........................................................................................................................................... E-2
Applications................................................................................................................................... E-3
Metadata Import ........................................................................................................................... E-3
Validation....................................................................................................................................... E-4
Generation...................................................................................................................................... E-4
Deployment ................................................................................................................................... E-5
Deployment into a File System............................................................................................ E-5
Deployment in a Database ................................................................................................... E-5
Batch Service Command Line Feature ............................................................................................ E-5
Validate .......................................................................................................................................... E-6
Generate ......................................................................................................................................... E-7
Deploy into a File System ............................................................................................................ E-7
Deploy into a Database ................................................................................................................ E-7
Metadata Loader Import.............................................................................................................. E-8
Type 1 ...................................................................................................................................... E-8
Type 2 ...................................................................................................................................... E-8
Type 3 ...................................................................................................................................... E-9
Using Batch Services Through a Parameter File ...................................................................... E-9

xvi
Parameter file ......................................................................................................................... E-9
Parameter file command line............................................................................................. E-10
Batch Service Command Line Scripts...................................................................................... E-10
UNIX ..................................................................................................................................... E-10
DOS........................................................................................................................................ E-10
Batch Service Command Line Output..................................................................................... E-10
Validation Examples ........................................................................................................... E-11
Metadata Import Examples................................................................................................ E-12
Generation Example............................................................................................................ E-14
Deployment into File System Examples .......................................................................... E-14
Deployment in to a Database Example ............................................................................ E-14

F Performance Enhancements
Overview .............................................................................................................................................. F-1
Overhead-Free INSERT ............................................................................................................... F-3
Fast Index Creation ...................................................................................................................... F-3
Fast Constraint Maintenance ...................................................................................................... F-4
Error Handling.............................................................................................................................. F-4
Minimum Target Locking ........................................................................................................... F-4
Parallel Direct-Path INSERT ....................................................................................................... F-4
When to Use Partition Exchange Loading...................................................................................... F-5
Using Partition Exchange Loading .................................................................................................. F-7
Configuring the Mapping ........................................................................................................... F-8
Configuring the Target ................................................................................................................ F-9
Create All Partitions.............................................................................................................. F-9
Create All Indexes Using the LOCAL option.................................................................. F-13
Specify the USING INDEX Option for Primary/Unique Keys .................................... F-13
Restrictions......................................................................................................................................... F-14
Restriction 1: Allow One Date Partition Key.......................................................................... F-15
Restriction 2: Allow Natural Calendar System Only ............................................................ F-15
Restriction 3: All Data Partitions Must be in the Same Tablespace..................................... F-15
Restriction 4: All Index Partitions Must be in the Same Tablespace................................... F-15
Performance Comparisons .............................................................................................................. F-15
The Internal Workings..................................................................................................................... F-16
Function Example 1: GET_PN ........................................................................................................ F-18

xvii
Function Example 2: GET_VC ........................................................................................................ F-19

G OWB Bridges: Transfer Parameters and Considerations


Transfer Parameters ........................................................................................................................... G-1
Transfer Considerations.................................................................................................................... G-6
Creating Business Areas in OWB ................................................................................................... G-6
Importing Metadata from an Object Management Group (OMG) CWM Standard System ........
G-9
Importing Metadata from Computer Associates ERwin 3.5.1................................................. G-10
Importing Metadata from Powersoft PowerDesigner 6.0 ........................................................ G-10
Exporting Metadata to Oracle Discoverer 3.1 and 4i................................................................. G-11
Configuring OWB for Dimensional Reuse............................................................................. G-12
Defining dimensions and facts in OWB .......................................................................... G-13
Defining the Dummy Tables............................................................................................. G-13
Hiding Data Prior to Transfer .................................................................................................. G-14
Importing Transferred Data into Discoverer .............................................................................. G-16
Dimensional Reuse Naming Conventions in Discoverer ............................................. G-16
Exporting Metadata to an Object Management Group (OMG) CWM Standard System .. G-18
Exporting Metadata to Oracle Express......................................................................................... G-18
OSA Configuration............................................................................................................. G-19

Index

Glossary

xviii
Send Us Your Comments
Oracle Warehouse Builder User’s Guide, Release 3i
Part No. A87327-01

Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this publication.
Your input is an important part of the information used for revision.
• Did you find any errors?
• Is the information clearly presented?
• Do you need more information? If so, where?
• Are the examples correct? Do you need more examples?
• What features did you like most about this manual?
If you find any errors or have any other suggestions for improvement, please indicate the chapter, section, and
page number (if available). You can send comments to us in the following ways:
• Electronic mail - dwhdoc_us@oracle.com
• Postal service:
Oracle Corporation
MS 2op713
500 Oracle Parkway
Redwood Shores, California 94065
U.S.A.
If you would like a reply, please give your name, address, and telephone number below.

If you have problems with the software, please contact your local Oracle World Wide Support Center.

xix
xx
Preface

Oracle Warehouse Builder 3i is a comprehensive toolset designed for practitioners


who develop and implement data warehouses. This guide contains instructions that
show you how to use OWB to:
■ Create a definition of a data warehouse.
■ Configure the definitions for a physical instance of the logical warehouse.
■ Validate the set of definitions and their configurations.
■ Generate a set of scripts to create and populate the physical database instance.
■ Deploy and initially load the physical instance.
■ Periodically refresh the physical instance with generated scripts.

Audience
This guide is intended for data warehouse practitioners which includes:
■ Warehouse Architects, Designers, and Developers
■ Data Analysts and those who develop extract, transform, and load routines
■ Developers of large-scale products based on data warehouses
■ Warehouse Administrators
■ System Administrators
■ Other MIS professionals
In order to successfully use the information in this guide, you need to be conversant
in SQL and PL/SQL. Additionally, you need to be comfortable with concepts of

xxi
Relational Database Management Systems and Data Warehouse design. Also, you
need to be at least familiar with Oracle’s relational database software products such
as Oracle8i/9i, SQL*Plus, SQL*Loader, Oracle Enterprise Manager, and Oracle
Workflow.

How This Guide Is Organized


The Oracle Warehouse Builder Builder 3i User’s Guide contains eleven chapters and six
appendices.
Chapter 1, "Overview", introduces you to Oracle Warehouse Builder and briefly
describes the design and implementation process for a data warehouse. It briefly
describes the three developmental phases for most data warehouse implementation
projects, and it describes how the chapters in this guide are patterned after these
phases.
Chapter 2, "Getting Started on a Project", shows you how to get started on a data
warehouse project using Oracle Warehouse Builder. This chapter introduces the
OWB repository, shows you how to log on to the repository using the OWB client,
how to get started on an actual project and how Builder handles multiple users on
the same module.
Chapter 3, "The Target Modules", shows you how to describe a dimensional model
using Oracle Warehouse Builder. This chapter also shows you how to modify these
definitions by directly editing their property sheets or using a OWB editor.
Chapter 4, "The Data Source Modules" shows you how to create definitions for data
sources using OWB wizards. The chapter describes how to import the definitions
from Oracle and non-Oracle database systems, and Designer repositories. It shows
you how to import data from a flat file source and create formats for the files. This
chapter also shows you how to modify definitions, generate and display diagrams
for the source objects, and print diagrams.
Chapter 5, "The Source to Target Mappings", is the first of three chapters that
describe mapping data providers to data recipients. This chapter introduces you to
the basic concepts of mapping how data providers load data into data recipients
when you deploy a data warehouse. The chapter then shows you how to create
logical definitions that map source operator attributes to target operator attributes
and how to set the logical properties for those attributes.
Chapter 6, "Mapping Operators and Transformations", is the second of three
chapters that describe mapping data providers to data recipients. This chapter
describes the various tools available for transforming data as it moves from source
to target. The chapter describes the Oracle Transformation Library, the Global

xxii
Shared (transformation) Libraries, Expression Builder, custom transformations you
define for specific needs, and SQL operations such as filters, splitters, and
aggregation functions.
Chapter 7, "Mapping Configuration and Code Generation", is the third and final
chapter describing mapping. The chapter describes how to configure your
mapping’s physical properties and how to define code generation strategies for
optimal performance during deployment.
Chapter 8, "Configure, Generate and Deploy" shows you how to configure and
validate the definitions for a specific instance. The chapter then describes how to
generate and deploy the scripts that extract, transform and load data into your data
warehouse. These scripts create and populate a data warehouse with dimensions,
facts, views, and materialized views.
Chapter 9, "Periodic Loads and Updates", shows you how to load your warehouse
with data. It then describes how to register job scripts with Oracle Enterprise
Manager to schedule periodic data loading into the warehouse.
Chapter 10, "Administration" shows you how to perform the various administrative
tasks on your warehouse using Warehouse Builder utilities. Specifically, it shows
you how to create, and drop OWB repositories using the Builder Repository
Assistant; how to install or drop a OWB Runtime Catalog using the Builder
Runtime Assistant; how to display audit statistics and error messages stored in the
Runtime tables using the Builder Runtime Audit Viewer; how to export definitions
from a OWB repository and Import definitions from a OWB Metadata file using the
Builder Metadata Loader utility.
Chapter 11, "OWB Metadata Reports", describes how to use Oracle Portal to view a
your reports as well as create your own reports on that metadata.
Appendix A, "Reserved Words" lists the words reserved for Warehouse Builder.
Appendix B, "The Mapper User Interface", describes how to define a staging
mapping that you can use to perform intermediate data transformations prior to
loading the data into your warehouse.
Appendix C, "OWB Public View Tables", lists the OWB Public Views thant can be
accessed via SQL. These views can be used to extend the reporting capabilities of
OWB.
Appendix D, "Using The XML Toolkit", describes how to retrieve and store data
from XML documents in a target schema.

xxiii
Conventions
Oracle8i refers to Oracle8i Version 8.1.7.
The SQL*Plus interface to Oracle8i may be referred to as SQL. This interface is the
Oracle8i/9i implementation of the SQL standard ANSI X3.135-1992, ISO 9075:1992,
commonly referred to as the ANSI/ISO SQL standard or SQL92.
In the examples, an implied carriage return occurs at the end of each line, unless
otherwise noted. You must press the Return key at the end of a line of input.
The following conventions are also used in this manual:

Convention Meaning
. Vertical ellipsis points in an example mean that information not
. directly related to the example has been omitted.
.
... Horizontal ellipsis points in statements or commands mean that
parts of the statement or command not directly related to the
example have been omitted.
boldface text Boldface type in text indicates a term defined in the text, the glossary,
or in both locations. May also refer to interface buttons and links.
[] Brackets enclose optional clauses from which you can choose one or
none.

Related Documents
For more information, see the following manuals:
■ Oracle Warehouse Builder 3i Installation Guide
■ Oracle Warehouse Builder 3i Release Notes
■ Oracle8i/9i Data Warehousing Guide
Oracle provides additional information sources, including other documentation,
training, and support services that can enhance your understanding and knowledge
of Oracle Warehouse Builder on the World Wide Web.
■ For more information on Oracle Warehouse Builder technical support, you can
contact Oracle World Wide Support services at
www.oracle.com/support

xxiv
■ For the latest information on, and downloads of, software and documentation
changes and updates to Oracle Warehouse Builder, visit MetaLink at
http://metalink.us.oracle.com
■ You can order other Oracle documentation by using the World Wide Web at
http://oraclestore.oracle.com

xxv
xxvi
1
Overview

Oracle Warehouse Builder is a comprehensive and powerful tool that supports the
definition and maintenance of a large scale logical model of a complete data
warehouse and the deployment of a physical instance of the data warehouse model.
This chapter describes how the Oracle Warehouse Builder 3i User’s Guide matches the
process of using OWB to design, implement and load data warehouses. In this
guide you will find instruction on how to use OWB to:
■ Create a set of definitions for a logical warehouse schema, its data sources, and
the operations that map, transform, and populate a warehouse.
■ Configure a physical instance of the logical warehouse, validate the set of
definitions for the instance, generate a set of scripts that create and load a
physical instance, and deploy a physical instance to an Oracle8i/9i database
system.
■ Populate and refresh the data warehouse, and set up Oracle Enterprise Manager
and Oracle Workflow to manage the warehouse operation. Archive and restore
projects; enable projects to be maintained through source control systems so
that they can be maintained throughout the development lifecycle.

Overview 1-1
The Developmental Phases

The Developmental Phases


This guide is organized according to three developmental phases in the data
warehouse building process: definition of the logical warehouse; configuration,
validation, and deployment of a physical warehouse instance; and implementation
of load and refresh operations. Although data warehouse deployment projects
typically develop in a non-linear and iterative fashion, three phases are commonly
recognized:
1. Definition Phase
During the Definition phase, you create numerous logical definitions that
describe a warehouse and its sources. These definitions formally describe:
■ The warehouse schema
■ A business structure
■ Data sources and targets
■ Mappings of the extract, transform, and load (ETL) operations
2. Generation Phase
A physical instance of the warehouse is described by configuring a set of logical
definitions. The configured logical definitions are validated and then used to
generate a set of scripts to create and manage the physical instance:
■ DDL scripts to create the warehouse and intermediate schema objects.
■ PL/SQL, SQL*Loader, and Tcl scripts to extract data, map and transform
the data, and then load it into the physical instance.
Once generated, OWB to runs the scripts that deploy the logical definitions as
physical objects to the physical instance. The scripts also deploy to a file system
where they can be used in conjunction with Oracle Enterprise Manager and
Oracle Workflow to schedule and manage load and refresh jobs.
3. Load and Manage Phase
After the generated scripts have been deployed to a file system, the
infrastructure for load and refresh jobs is implemented:
■ Job dependencies are described as an Oracle Workflow process
■ Oracle Enterprise Manager is used to schedule individual jobs or an Oracle
Workflow process.

1-2 Oracle Warehouse Builder 3i User’s Guide


The Developmental Phases

Refer to the Oracle8i Data Warehousing Guide for information on data warehouse
design and data warehousing strategies.

The Definition Phase


During this phase, you create numerous logical definitions to describe your data
warehouse. These logical definitions describe a data warehouse schema, your data
sources, optional intermediate schemas, and the target warehouse.

Defining A Warehouse
You begin to build your data warehouse by defining a Project. The project typically
contains the set of formal definitions that define a logical warehouse. These
definitions—referred to as Modules in OWB—correspond to either a source or a
target data warehouse.
OWB enables you to define a logical warehouse and then configure its physical
implementation parameters. Warehouse Builder then validates the definitions for a
physical instance and generates the scripts to create objects for the instance.
Chapter 2, "Getting Started on a Project" describes how to use OWB to define a
warehouse project and modules.

Defining The Data Sources and Targets


As you create a dimensional model, developers start assessing sources of data for
the warehouse. You can use the Import Metadata Wizard to import definitions of
data sources from:
■ Database Sources including Oracle Designer repositories
■ Flat File Sources
■ Pre-packaged Applications
This Warehouse Builder wizard imports logical definitions and stores them in a
repository structure called a Source Module. During a later stage, these source
definitions are used in the design, development, and implementation of routines
that extract, transform, and load data into target warehouse schemas.
Chapter 3, "The Target Modules," shows you how to create, modify, validate, and
display the formal definitions of a dimensional model using the Warehouse Module
Editor. OWB can display and print the model graphically or in tabular formats. One
tabular format displays the model’s logical properties (Property Sheets).

Overview 1-3
The Developmental Phases

Chapter 4, "The Data Source Modules" shows you how to create, modify, and
display definitions for data sources using the Source Module Editor. The chapter
describes how to create definitions for:
■ Relational databases (Oracle, SQL Server, IBM DB2)
■ Flat Files (fixed or delimited formats, etc)
■ Oracle Designer Repositories
■ Pre-packaged Applications

Defining ETL Mappings


After the target schema for the logical warehouse and its data sources have been
logically defined, you can create logical definitions that describe how to extract,
transform, and load data. These definitions are called Mappings and are stored in
the warehouse module that defines the target warehouse.
Three separate chapters describe how to define map: Chapter 5 introduces the
concepts of mapping and how to define a basic mapping; Chapter 6 shows you how
to create definitions that transform data as it moves from a source to a target, and
Chapter 7 shows you how to configure the properties of the mapping.
Chapter 5, "The Source to Target Mappings," describes the basic concepts behind the
mapper. It then shows you how to create definitions that map source object
attributes to target object attributes. It then shows you how to configure the
attributes of the mapping objects and how to validate, reconcile, and edit the code
generated by the mapper.
Chapter 6, "Mapping Operators and Transformations," shows you how to add
operators and transformations at specific points within the code that implements a
mapping to modify the data before it is loaded into a target table; chapter six
describes how to build PL/SQL operations using Expression Builder. The chapter
also describes how to use the Oracle Transformation Library to create custom
transforms for a specific need and store it in a Global Shared Library within your
project. And finally, this chapter shows you how to configure the logical properties
of the mapping objects.
Chapter 7, "Mapping Configuration and Code Generation", describes how to
prepare your mappings for deployment. The chapter describes how to configure
properties for code generation and how to set up strategies for the code generation.
This chapter marks the end of the definition phase.

1-4 Oracle Warehouse Builder 3i User’s Guide


The Developmental Phases

The Generation Phase


Once you’ve defined your logical definitions, you can configure Warehouse Builder
to create and load a physical instance of the warehouse. This phase takes four steps.
1. Configure a set of definitions for a physical instance
2. Validate the set of definitions
3. Generate scripts from the set of definitions
4. Deploy objects to the physical instance and/or deploy the scripts to a file
Warehouse Builder generates the following kinds of scripts from a configured set of
definitions:
■ DDL scripts that create objects for the physical instance
■ PL/SQL and SQL*Loader routines
■ Tcl scripts
Chapter 8, "Configure, Generate and Deploy" describes the tasks you need to
perform to generate these scripts. Specifically, the chapter describes
■ Configuring The Logical Definitions
The configuration parameters determine how an object is deployed, the
processing characteristics of selected objects, location of deployed scripts,
the physical properties of warehouse objects, and many other properties.
■ Validating The Logical Definitions
After you configure a physical instance, you validate the set of definitions
before Warehouse Builder generates the scripts that implement that
instance. The Validate utility detects script errors such as foreign key
references, invalid object references in mappings, and data type
mismatches.
■ Generating The Deployment Scripts
After you have a validated the set of configured definitions describing a
physical instance, you generate a set of scripts that is used to deploy objects to a
physical instance and another that is used to load and refresh jobs.
After Warehouse Builder generates the scripts for a physical instance, you can
immediately deploy the database objects (database links, tables, dimensions,
facts, materialized views, synonyms, and PL/SQL packages) to one or more
instances. You can also deploy the scripts that create the objects to a file system,

Overview 1-5
Taking The Next Step

and then deploy the objects by manually executing the deployed scripts. And
finally, you can deploy the scripts to a set of directories. These directories
include DDL, PLS, Tcl, SQL*Loader control file directory, and others.
After deployment, you can use the Workflow Deploy Wizard to register the Tcl
scripts that define load and refresh jobs to an Oracle Enterprise Manager
repository. You can also register the scripts with an Oracle Workflow server to
manage job dependencies such as the dependence of fact tables on its
dimensions.

The Load And Manage Phase


The warehouse objects have been deployed to a physical instance and the jobs that
initially load or periodically refresh the instance have been deployed to a directory
and registered with Oracle Enterprise Manager.
Chapter 9, "Periodic Loads and Updates" shows you how to set up and schedule
jobs that initially load and periodically refresh a data warehouse. Jobs that load new
data or refresh existing data in a data warehouse must be run in a strict sequence to
insure that all foreign key references can be satisfied.
Chapter 10, "Administration" shows you how to complete administrative tasks
using Oracle Warehouse Builder utilities. This chapter discusses the Repository
Assistant, the Run Time Audit Viewer, the Metadata Loader Utility. It also describes
the Archive/Restore facility which allows versioning control throughout the
development lifecycle and provides for smooth interaction with source control
systems used in development.
Chapter 11, "OWB Metadata Reports", describes how to use Oracle Portal to view
the metadata your repository. OWB contains a browser that you use to navigate the
metadata and use Portal to see. You can also build customized reports to suit your
OLAP needs using Oracle Portal.

Taking The Next Step


The next chapter, "Getting Started on a Project," shows you how to log onto a OWB
repository with the Oracle Warehouse Builder client, create a repository structure
called a Project, and customize the OWB console. After you create a Project, you can
start creating definitions for that warehouse.

1-6 Oracle Warehouse Builder 3i User’s Guide


2
Getting Started on a Project

This chapter shows you how to get started on a design and implementation project
using Warehouse Builder. To get started, you must first create a place within OWB’s
repository where you can store and manage the definitions that formally describe
the initial logical warehouse. OWB stores these definitions in a repository structure
called an OWB Project.
This chapter summarizes the contents and structure of a OWB Project, and then
shows you, step by step, how to log on to a OWB repository and create a Project.
The chapter closes with a few topics that will help you get off to a smoother start: a
description of the policies that govern business and physical names, a discussion of
how to move about OWB wizards, and how to personalize the OWB console so that
it meets your own specific needs.
This chapter includes the following sections:
■ Understanding The OWB Project
■ Creating A Project
■ About The OWB Console
■ About Naming Policies
■ Using The Warehouse Builder Wizards
■ Searching Navigation Trees
■ Taking The Next Step

Getting Started on a Project 2-1


Understanding The OWB Project

Understanding The OWB Project


A Warehouse Builder Project is a high-level repository structure that stores and
organizes the formal descriptions that define a data warehouse. These definitions
include descriptions of data sources, target warehouse objects, mappings of source
data to various targets, transformation operations, and configuration parameters.
Warehouse Builder generates and stores numerous scripts in a Project. As a
warehouse project evolves, developers use OWB to configure and validate
warehouse definitions and then use OWB to generate scripts to create and load the
data warehouse. OWB also deploys scripts to a file system so the operations staff
can run the daily operation using Oracle Enterprise Manager and Oracle Workflow.

About Warehouse Builder Projects


At the highest level, Warehouse Builder Projects are subdivided into containers
called "modules." There are two kinds of modules: source modules and warehouse
modules. Modules can contain various object types. For example, warehouse
modules are subdivided into dimensions, facts, materialized views, and other
warehouse objects. The definitions for the objects occur on the lowest level of the
Project hierarchy. Figure 2–1 maps the structure of a OWB Project.

Figure 2–1 The Warehouse Builder Project Structure

Projects Modules Object Types Definitions

2-2 Oracle Warehouse Builder 3i User’s Guide


Understanding The OWB Project

Module Contents
OWB Projects are divided into source modules and warehouse modules.
■ Source Modules contain definitions of:
– Relational database objects
– Flat files
– Proprietary structures
■ Warehouse Modules contain definitions of:
– Dimensions
– Facts
– Relational database tables
– Mappings
– Transformation operations
– Materialized Views
– Views
– Sequences
– Scripts generated by OWB

Object Names
Using business names, developers can make a warehouse schema resemble the
business being modeled. The OWB technical term for business names is logical
names. However, before you can generate the DDL for a named object all the logical
names used to define that object must be translated into physical names. These
physical names must conform to the syntax rules defined in the Oracle8i/9i SQL
Reference.
OWB maintains a logical and a physical name for each object stored in its
repository. When you create an object and give it a logical name, OWB
automatically creates a legal physical name for the object. And, vice-versa, when
you create an object and give it a physical name, OWB validates the physical name
and automatically creates a logical counterpart. Thus, no translation is required
when DDL or another kind of script must be generated for an object.

Naming Mode You can run the OWB client in either the logical or physical name
mode, but to create or modify logical or long descriptive names, you must configure

Getting Started on a Project 2-3


Understanding The OWB Project

the OWB client to run in the Logical Name mode—by default, OWB starts in
Physical Names mode. To set OWB to operate in the logical naming mode, open the
Preferences window and click the appropriate check boxes on the Naming panel.
For specific information on how to set these preferences, see "About Naming
Policies" on page 2-20.

Note: OWB Projects do not appear in any SQL (no code is


generated), so their names need not conform to the syntax rules for
physical names except their length must not exceed 30 characters.

About Multiple-User Access


Before logging on to Warehouse Builder, you should know about the multiple-user
access feature.
The OWB Multi-User Access feature ensures only one user has write privileges to a
warehouse object while simultaneously enabling other users to maintain read-only
privileges to that same object or module. The lock is maintained for the duration of
any transaction started by the write-privileged user. The lock is released when the
user commits (or performs a rollback) and then closes all editors associated with the
warehouse object.

Note: If you generate code at any time during your Warehouse


OWB Session, Multi-User Locking feature will remain in effect until
after you commit your changes.

Write locks occur whenever you access data warehouse object for editing purposes.
Acquiring a write lock prevents other users from editing the object while you are
active in that object. You will acquire a Folder-in-Use Lock whenever you access any
object within any OWB-related hierarchy. This lock prevents other users from
deleting any parent object in the hierarchy as long as you are active in the hierarchy.
For instance, you cannot delete a module from the Logical Tree in the OWB Console
while other users are active in that module because those users hold a folder-in-use
lock.

Read/Write Mode
To enter Read/Write mode for and object (and lock the object), you either:

2-4 Oracle Warehouse Builder 3i User’s Guide


Understanding The OWB Project

■ open an editor, property sheet or dialog; by default, the user interface


attempts to access existing OWB metadata objects in Read/Write mode.
■ transition to another editor that is available in Read/Write mode from one
currently open in Read/Write mode.
All editor(s) associated with it will display READ/WRITE in the status bar of the
editor. Property sheets or dialogs will indicate in the title bar that the object is in
read/write mode. You can freely edit the object in the property sheet or dialog,
using the provided controls.

Figure 2–2 The Read-Write Indicator In An Object Title Bar

To end the Read/Write access mode for an object (and unlock the object for others)
and access the object in Read-Only, you can either
■ Close all of the object’s editor(s) and commit/rollback current transaction.
■ Exit OWB.

Read Only Mode


If OWB cannot open the editor, property sheet or dialog in read/write mode, then it
is because the object is locked by another user. You will know if you are activating a
locked warehouse object or module if the object editor’s status bar displays the text
LOCKED BY [SESSION ID].
If you attempt to open a locked object, OWB will alert you and prompt you either to
cancel the request or access the object in Read-Only mode.

Getting Started on a Project 2-5


Understanding The OWB Project

Figure 2–3 The Locked Object Alert

If you choose to continue in Read-Only mode, the editor will indicate in the title bar
that the object is Locked and will show the ID of the user currently locking the
object. You can move objects around on the editor canvas, minimize and maximize
containers. However, you cannot edit the object in Read-Only mode; any attempt to
modify the object will cause the following dialog to appear:

Figure 2–4 A Read-Only Alert

For any property sheet activated in Read-Only access mode, the ‘OK’ button will be
disabled.

Lock Synchronization
Whenever an OWB data warehouse object is locked by a user, the changes can be
visible to all users with Read-Only access to that object. The Read-Only users will
see the changes on a locked object as it happens by using the Synchronize feature
To invoke synchronization, select View > Synchronize in the Warehouse Module
Editor.

2-6 Oracle Warehouse Builder 3i User’s Guide


Understanding The OWB Project

Figure 2–5 The Synchronize Menu Choice

OWB includes two types of synchronization options:


■ Automatic Synchronization—OWB automatically synchronizes upon
accessing an object in Read-Write mode.
■ Tree Synchronization—You may also choose explicitly to synchronize
OWB from the trees by selecting View > Synchronize. This method picks
up objects that have been added or removed that do not show up with
automatic synchronization.

Creating A Project
To create a Warehouse Builder Project, you must log on to a repository, switch to the
Administration environment, and then open the Create New Project wizard. After
you supply a name and description for the Project, the wizard creates your Project
in the OWB repository.
A OWB repository is a collection of database objects installed into an Oracle8i/9i
schema that has been initialized by the Repository Assistant with the following:
■ The Oracle Library of transformation operations
■ A Global Shared Library
■ A Project shell named My Project

Getting Started on a Project 2-7


Understanding The OWB Project

The project shell is required for the initial logon sequence (you always log on to a
specific project) and can be deleted after you create your own projects. For
additional information on how to create and initialize a repository, see "Repository
Administration" on page 10-2

Note: You cannot delete the currently active project.

Logging On To A Repository
The following instructions show you how to start the OWB client, log on to a
repository and then create a project.

To log on to a repository:
1. Select Start > Oracle > OWB Client
OWB returns the logon dialog
box.
2. Enter the logon information:
■ Name and password of the
repository’s owner .
■ Host Name
■ Port Number
■ Oracle SID
This is the standard information
required to connect with an
Oracle8i/9i database instance.
3. Click Logon.
OWB returns the Project dialog
box.
This repository is empty and
contains only the shell Project
"My Project."
When a repository contains
multiple Projects, you can select

2-8 Oracle Warehouse Builder 3i User’s Guide


Understanding The OWB Project

a specific project from the drop-down list. This list includes all projects in the
repository.

Note: If the Oracle8i/9i database instance is inactive, OWB returns


a connection error message.

4. Click OK.
OWB returns its console in a window. This window remains open and available
during the entire session.

Menus

Toolbar

Navigation Tree

Project (default)

Transformation Library ENVIRONMENTS

Administration

Utilities

The above illustration shows OWB’s console in its initial state (Project
environment). In this state the console:
■ Operates in the Project environment
■ Displays the navigation tree for the Project selected during the logon sequence
When you switch to another Project within the repository (Project > Switch Project)
or to a different context (Transformation Library or Administration), the console

Getting Started on a Project 2-9


Understanding The OWB Project

displays the navigation tree for that Project or environment and resets the
drop-down lists under each menu item. For additional information on different
environments, see "Operational Environments" on page 2-12.

Using The New Project Wizard


To create a Project, you must switch to the Administration environment from the
Warehouse Builder console.

To create a new project:


1. Click the icon for the Administration environment.
OWB points to the Administration navigation tree and updates the menu items
to reflect this new context.
2. Click the plus sign next ADMINISTRATION.
OWB displays the navigation tree’s Projects and Integrators branches.
3. Right-click Projects > Create Project
OWB returns the welcome page for the New Project wizard.
4. Click Next.
OWB returns the Name page. This page contains a text box for the new Project’s
name and a text area for a brief description.
5. Enter the Project’s name, a concise description, and then click Finish.
OWB creates a Project and inserts its name in the
PROJECTS branch.

Commit
OWB does not commit a newly created Project to the repository until you click the
Commit icon on the toolbar, or exit OWB and click Yes on the pop-up Commit
Confirmation panel .
You now have a place to store and modify all the definitions for the data warehouse.
OWB also uses this space to validate these definitions and generate scripts that
create and load your warehouse.

2-10 Oracle Warehouse Builder 3i User’s Guide


About The OWB Console

The next section familiarizes you with the console and its different operational
contexts.

About The OWB Console


The OWB console has six major components:
■ Set of menu selections
■ Toolbar
■ Wizard button
■ Icons to switch context
■ Utilities button
■ Window with a navigation tree
When you switch to another mode of operation the icons all remain constant, but
the menu selections and navigation tree change. The illustration below shows the
console in its initial state: the Project context.

Getting Started on a Project 2-11


About The OWB Console

Figure 2–6 The OWB Console

Menus

Toolbar

Wizard button Navigation Tree

Project (default)

Transform Library

Administration

Utilities button

Operational Environments
The OWB console operates in three environments:
■ Project (initial environment)
■ Transformation Library
■ Administration
When the OWB client starts, the console begins in
the Project environment and displays the navigation
tree for the project selected during the logon
sequence. To change environments during a session, click one of the context icons.

Project Environment
When you are in the Project environment, you can:

2-12 Oracle Warehouse Builder 3i User’s Guide


About The OWB Console

■ Create and modify definitions


for repository objects such as
dimensions, facts, relational
tables, materialized views,
sequences, and views
■ Create, modify, and import
definitions for data sources such
as relational schema objects and
flat files
■ Create and modify
transformation operations
■ Create and modify mappings to
direct the flow of data from
sources to transformations and
on to target schemas
(warehouse or temporary
staging areas)
■ Configure and validate
definitions
■ Generate, deploy, and run scripts based on the definitions to create, load, and
operate target warehouses or staging area schemas
■ Export metadata for an entire Project, its modules, or individual definitions
Warehouse developers operate mostly with the OWB console in this environment.
The navigation tree includes:

Table 2–1 Modules in a Typical Warehouse Project


Module Name Type Contents
SRC_ Source Module Definitions for objects.
SRC_ Source Module Definitions for flat flies
STG_ Warehouse Module Definitions for the intermediate work area
TRG_ Warehouse Module Definitions for the target schema

Before you can create any of these definitions, whether for data sources or
warehouse objects, you must first create the modules where you can store, modify,
and manage the definitions. Each chapter in this guide shows you how to create the

Getting Started on a Project 2-13


About The OWB Console

required containers before it shows you how to create the definitions themselves.
For example, Chapter 3, "The Target Modules," shows you how to create warehouse
module before it shows you how to create and modify the definitions that formally
describe the star schema.
At any time during the development process, you can configure and validate the set
of working definitions. Thus, incremental corrections can be made as the project
moves forward and, should large scale corrections be necessary, OWB can do most
of the work.
Once a set of valid definitions have been created, the team can generate scripts to:
■ Create an instance of a warehouse
■ Extract and transform data for that instance
■ Perform initial and incremental loads
■ Maintain the data warehouse using Oracle Enterprise Manager and Oracle
Workflow
The development team can then turn around, reconfigure the set of definitions,
validate the reconfigured set, and then generate another set of scripts for a different
version of the warehouse.

Transformation Environment
You can create transformation
libraries and transformations
within these libraries when the
console is in this environment. You
can also modify the properties of
warehouse and source modules.
The illustration shows the fully
expanded navigation tree for the
Transformation Library. The tree
provides access to the built-in
Oracle Library as well as the
transformation operations created
by developers for your warehouse.

2-14 Oracle Warehouse Builder 3i User’s Guide


About The OWB Console

Administration Environment
When you are in the Administrative
environment, you can:
■ Create, modify, and display the
properties of a Project
■ Import metadata from a OWB export
file
The illustration shows the Administration
tree fully expanded. The tree contains
three Projects and the Integrators
supplied with OWB. The Integrators can
retrieve metadata from applications based
on relational databases, flat files, and
proprietary systems. This guide shows
you how to use the Flat File and Oracle
DB Integrators to extract data from
applications (see Chapter 4, "The Data
Source Modules", for more information).

The Utilities Button


You can run a utility directly from the
OWB console using the Utilities icon. For example, to run SQL*PLUS from the OWB
console:
1. Click the Utilities icon.
OWB expands the icon into the
Utilities drawer.
2. Click the icon of a utility that
occurs in the drawer (SQL*PLUS).
OWB calls the utility.
The Utilities Drawer is
pre-configured with five utilities:
■ SQL*PLUS

■ Developer Reports Runtime


■ Oracle Enterprise Manager

Getting Started on a Project 2-15


About The OWB Console

■ Oracle Workflow
■ CWM Bridge
Most likely, you will need to update the configurations of these icons so that they
reference the utilities as they are installed at your site.

Utility Property Sheet


To update or delete an existing icon or add a new one, you must call the OWB
Console’s Preferences sheet. This sheet actually includes three sheets that are
addressed by tabs: OEM, Browse, and Archive/Restore. You can call this set of
property sheets from the Console’s toolbar.
To call the Console’s Preferences sheet:
1. Select Project > Preferences
OWB returns its Preferences Sheet
2. Select Utility on the tab bar.
OWB returns the configuration panel for configured utilities.
The following instructions describe how to add a new utility, update the
configuration of an existing utility, and delete an existing utility.

Add a Utility To add a utility to the Utilities Drawer:


1. Click Utility on the tab bar of the Preferences Sheet.
2. Select the name of a tool.
OWB returns its configuration information.
3. Enter the information.
■ Name of the utility.
■ Location of the utility. Click Browse to search directories.
■ Location of the icon for the utility. Click Browse to search icon folders.
■ Description of the utility.
4. Click Add.

2-16 Oracle Warehouse Builder 3i User’s Guide


About The OWB Console

Update a Utility To update the configuration of an existing utility:


1. Click Utility on the tab bar
of the Preferences window.
2. Select the utility’s name
from the Contents box (e.g.,
SQL*PLUS).
OWB returns its
configuration information.
3. Modify the configuration
details:
■ Name of the utility.
■ Location of the utility.
Click Browse to search
for program folders
and files.
■ Location of the icon for
the utility. Click
Browse to search for
icon folders and files.
■ Description of the utility.
4. Click Update.
OWB stores the changes in the repository.

Remove a Utility To remove a utility from the Utilities Drawer:


1. Select the name of an existing tool.
OWB highlights the name of the selected utility and returns its configuration
information.
2. Click Remove
OWB removes the utility from the Utility Drawer.

Getting Started on a Project 2-17


About The OWB Console

The Console Tool Bar


From the console tool bar, you can:
■ Commit changes to the repository
■ Search the repository for an object
■ Look at the properties of an object
■ Call the Help system
You can also perform these actions from drop
down menus. The function and usage of the
Find and Help buttons are self-explanatory.

Property Icon and Property Sheets


The function and usage of the Property icon on the Console toolbar is always the
same: return the property sheets for the selected object.

Each object stored in a OWB Project has its own property sheet, and this property
sheet defines the object. You can resize the property sheet to fit your window.
Property sheets vary by object. The property sheet for a Project contains two sheets
but the property sheet for a warehouse module contains three, and that for a
Dimension contains five.

2-18 Oracle Warehouse Builder 3i User’s Guide


About The OWB Console

Example 2–1 Property Sheet for a Dimension

Edit a Definition Definitions for objects such as dimensions, tables, facts, and
mappings are created manually using a wizard or imported from an external
source. After a definition has been created for an object and stored in a OWB
Project, you can update the definition by editing its property sheet.

The Commit Icon


The Commit icon is important for this reason:
When you create or modify any part of your warehouse, OWB does not
automatically commit the change. You must explicitly commit changes.
You can commit changes at any time during a OWB session or defer the operation
until you terminate your session. To commit changes during a session, make the
console the active window and click the Commit icon on the tool bar. OWB returns
a Commit Confirmation dialog box. Click OK to commit the changes. If you have
not committed and exited OWB, the commit confirmation dialog box appear. Click
Yes to commit any changes you have made.

Getting Started on a Project 2-19


About Naming Policies

About Naming Policies


Warehouse developers often use long descriptive names for dimensions, fact tables,
materialized views, and other objects to promote communication. Using business
names, developer’s can make a warehouse schema resemble the business being
modeled. The OWB technical term for business names is "logical names."
Before you can generate DDL for a named object, all of the logical names for that
object must be translated into physical names so that they conform to the syntax
rules for basic elements as defined in the Oracle8i SQL Reference manual.
Additionally, selected physical names must be unique within their category:
■ Module names must be unique within a OWB Project
■ Warehouse object names must be unique within a warehouse module. This
includes the names of:
– Dimensions
– Facts
– Mappings
– Materialized Views
– Sequence Names
– Views
■ Transformation names must be unique within a transformation category.
OWB maintains a logical and a physical name for each object stored in its
repository. When you create an object and give it a logical name, OWB
automatically creates a legal physical name for the object. And vice-versa, when you
create an object and give it a physical name, OWB validates the physical name and
automatically creates its logical counterpart. Thus, no translation is required when
DDL or another kind of script must be generated for an object.
OWB remembers your Naming preferences from session to session provided you
always use the OWB client from the same Windows NT workstation. The Naming
mode preference set for a specific host is stored in the Preference.properties file.
Hence, if you work on a repository from different workstations, the Naming mode
may vary.

Note: OWB Projects are not deployed (no code is generated), so


their names need not conform to the syntax rules for physical
names except their length must not exceed 30 characters.

2-20 Oracle Warehouse Builder 3i User’s Guide


About Naming Policies

Setting The Naming Mode


To create a logical name for an object or rename an existing object, the OWB client
must be in the Logical Name mode. Similarly, to create a physical name for an object
or rename an existing object, you must put the OWB client in the Physical Name
mode.
The default naming mode for the client is Physical Name mode.The default naming
preferences for the OWB client are:
■ Mode: Physical Name Mode
■ Propagation: Propagate physical name to logical name
You can change these from the console’s Preferences sheets. The following
procedure describes how to set the naming mode using the Preference sheets.
There are two icons for the name and propagation modes located in the lower right
corner of the various editors. These icons indicate the mode in which you are
currently active.
To set the name mode:
1. Open the Warehouse Builder Console and select the Project Environment.
2. Select Project > Preferences.
OWB returns the Preferences window.
3. Select the Names tab card.
OWB returns the Names panel. You can select either physical or logical name
modes and you can select how the names propagate. You can switch Naming
mode at any time during a session.

Logical Name Mode


You can create a logical name for an object or change the logical name of an existing
object when OWB is in the Logical name mode. OWB editors, wizards, and property
sheets also display the logical names of objects when in this mode.

Getting Started on a Project 2-21


About Naming Policies

A logical name must conform to these rules:


■ The length of a name cannot exceed 200 characters.
■ The name must be unique within its category (for example, the same
column name can be used in different tables but not the same table).
■ All source modules reflect the case of the imported source and are subject to
the double-quotes rules as defined in the Oracle8i SQL Reference.
■ Copy operations from a source to a target in a mapping does not propagate
case.
When you create a logical name, OWB automatically generates a legal physical
name that resembles the logical name. If you create a logical name that duplicates
an existing physical name, OWB appends an underscore and a numeral to the
logical name to avoid a name collision.
When OWB is in the Logical name mode and you change the logical name of an
object, you can choose whether to propagate this change to the object’s physical
name. To propagate the changes, check Propagate logical name to physical name.

2-22 Oracle Warehouse Builder 3i User’s Guide


Using The Warehouse Builder Wizards

Physical Name Mode


You can create a physical name for an object or change the physical name of an
existing object when OWB is in the Physical name mode. OWB editors, wizards,
and property sheets display physical names of objects when in this mode. Physical
names are automatically converted to upper case.
A physical name must contain no more than 28 characters (two characters are
reserved for Warehouse Builder) and conform with the basic syntax rules for
schema objects defined by the rules set down in the Oracle8i SQL Reference. OWB
enforces these syntax rules when in is in the Physical name mode: you cannot enter
an invalid physical name. For example, you cannot enter a duplicate name, a name
with too many characters, or misuse reserved words.
When OWB is in the Physical name mode and you change the physical name of an
object, you can choose whether to propagate this change to its logical counterpart.
To propagate the change, check Propagate physical to logical name.

Using The Warehouse Builder Wizards


Oracle Warehouse Builder provides numerous wizards to simplify the design,
creation, and implementation process. These wizards can be invoked in a number of
ways but mostly by right-clicking on the object type and selecting Create from the
popup menu.
Each wizard is divided into one or more pages. The first page is always the
welcome page. This page lists the number of pages in a specific wizard and
describes the task performed by each page.

Getting Started on a Project 2-23


Using The Warehouse Builder Wizards

You can configure individual wizards so they do not return their welcome pages
using the check box. To re-enable this behavior, at a later time, you must open the
Preferences sheets and click the button "Display Welcome page on all wizards."

Using Navigation and Help


To navigate through individual pages of a wizard, click the Back and Next buttons.
When you define a warehouse object, you will often need to traverse these pages to
make corrections or additions. Click Cancel to exit without saving your work.
For help regarding a specific topic within a wizard, click the Help button at the
bottom of the wizard page for context-sensitive help instead of the general help
button on the tool bar.

2-24 Oracle Warehouse Builder 3i User’s Guide


Searching Navigation Trees

The wizard pages solicit information in a variety of ways: down-arrow lists,


text-boxes, check boxes, radio buttons for various functions including Add, Update,
and Remove buttons.

You can move around a specific page using a mouse or using the Tab key. When you
tab to the last text box, you must then use the CTL-Tab combination to move the
cursor down to and across the control buttons.

Searching Navigation Trees


Definitions and other objects stored in a OWB repository are usually organized by a
navigation tree.You can click on the tab cards or press the tab key to switch between
the tab sheets of different trees: press the tab key, and press the arrow key to switch
between pages.

Getting Started on a Project 2-25


Searching Navigation Trees

Definitions stored in a warehouse module, for example, are organized by the


navigation tree displayed by the Warehouse Module Editor. Or, Projects defined
within a repository are organized by the Project navigation tree displayed by the
OWB console.
To find an object in the repository, you can manually search for the object or use the
Find button to call the Object Find Dialog panel. To manually search for an object,
expand each branch of the navigation tree until you find it (click the plus sign). To
use the Object Find Dialog panel, click the Find button and describe your search.

You can include the complete name of an object or use the ’*’ wildcard character to
match zero or more characters. You can attach the wildcard character as a prefix or
suffix to any substring. The wildcard character matches any character.

2-26 Oracle Warehouse Builder 3i User’s Guide


Taking The Next Step

Taking The Next Step


This chapter summarized the preliminary steps in setting up a Warehouse Builder:
1. Logon to a OWB repository.
2. Create a OWB Project where you can store and manage all the definitions that
formally describe your data warehouse.
3. Review the operation of the OWB console.
4. Familiarize yourself with naming conventions.
The next chapter, "The Target Modules," shows you how to create a complete set of
definitions for a dimensional model that serves as the target schema for the Global
Computing Company’s data warehouse.

OWB Project: Repository structure where warehouse developers


store and modify the formal descriptions that define a data
warehouse, and where OWB stores generated scripts used to create
and load the warehouse.

Getting Started on a Project 2-27


Taking The Next Step

2-28 Oracle Warehouse Builder 3i User’s Guide


3
The Target Modules

This chapter describes how to define a dimensional model using Oracle Warehouse
Builder. The definitions for this logical model are created using a OWB wizard or
imported from external sources. This chapter also shows you how to modify these
definitions by directly editing their property sheets or using a OWB editor. The
OWB editors can also display and print diagrams as well as detailed reports about
the logical warehouse’s objects.
An introductory section summarizes a dimensional model, that serves as the target
warehouse for this guide. The next section shows you how to create a place to store
these definitions into a warehouse module. The remaining sections show you how
to create and modify each of the definitions required to formally describe a data
warehouse model.
This chapter includes the following sections:
■ About Star Schemas
■ Creating a Warehouse Module
■ Creating Dimension Definitions
■ Creating Fact Table Definitions
■ Creating Materialized View Definitions
■ Creating Conventional View Definitions
■ Infrastructure Requirements
■ Committing Your Changes
■ Taking the Next Step

The Target Modules 3-1


About Star Schemas

About Star Schemas


A typical dimensional model used as the target schema for a logical data warehouse
may contain a fact table, dimensions, materialized views, and a conventional view.
This schema, known as a Star Schema, is central to the concept of Data Warehouse
design.
The following illustration describes a fact table linked to a set of dimensions over
foreign key constraints.

For background and specific information on star schemas and dimensional models,
see the Oracle8i/9i Data Warehousing Guide.

About Dimension Tables


Dimension tables contain descriptive details that give meaning to the billions of
numbers that populate fact tables. Dimensions provide the context for what would
otherwise be faceless numbers and describe the fastest access path to sets of those
numbers.
Query performance can be further improved in many cases because users often
analyze data by drilling down known hierarchies using slice-and-dice techniques.
These hierarchies may include a temporal hierarchy Year > Quarter > Month > Day
and the brand hierarchy Category > Brand > Product. Oracle8i/9i can then exploit
defined hierarchies by rewriting queries to fetch data from summary rather than
detail tables. The rewritten queries run much faster.
Typical dimension tables usually possess the following characteristics:
■ A single column primary key populated with values called "warehouse
keys."

3-2 Oracle Warehouse Builder 3i User’s Guide


About Star Schemas

■ Warehouse keys provide administrative control over the dimension,


support techniques that preserve dimension history, and reduce the size of
fact tables.
■ One or more hierarchies that are explicitly defined as dimension objects.
Hierarchies defined by a Create Dimension statement maximize the number
of query rewrites by the Oracle8i/9i server.
This chapter shows you how to create definitions for dimension objects and their
underlying tables using the New Dimension Wizard. This chapter also shows you
how to modify the definitions of dimension objects and their underlying table by
editing their respective property sheets or using the Dimension Editor.

About Fact Tables


Fact tables contain measures and links to a set of dimension tables. For the most
part, a fact table’s measures are additive. Common additive measures include
dollars, units, and cost. Some fact tables, however, include non-additive and
semi-additive measures such as margins, averages, and balances. Event fact tables,
on the other hand, contain no measures but only links to a set of dimension tables.

Linking Facts to Dimensions


Fact tables are linked to a set of dimension tables over foreign key constraints. These
constraints are critical in a data warehousing environment where data integrity is
paramount: the constraints enforce referential integrity during the daily operation
of the data warehouse. Referential integrity constraints can impose a significant
performance penalty during the load of data into the warehouse because they can
incur an enormous number of look-up operations. Developers can avoid this
penalty by verifying the truth of the constraint during the extraction and
transformation process and disabling the constraint during the load process. The
constraints are then enabled after the load.
When dimensions are designed with warehouse keys, the fact table row length is
usually reduced significantly because warehouse keys are usually much shorter
than their natural counterparts. The result is improved query performance.

Physical Characteristics
Like dimension tables, fact tables vary by practitioner and project, but typical fact
table has two characteristics:
■ A primary key defined on the set of foreign key reference columns or, in the
case of a data list, on an artificial key or a set of warehouse key columns. When

The Target Modules 3-3


About Star Schemas

the fact table is a data list, the foreign key reference columns do not uniquely
identify each row in the fact table.
■ A set of foreign key reference columns that link the table with its dimensions.
When you create a definition for a fact table, you must define its measures and its
foreign key references. To define a foreign key reference, you must include the name
of the referenced dimension and its primary key column. Consequently, definitions
for dimension tables should be created before those for fact tables.
This chapter shows you how to create a definition for a fact using the New Fact
Wizard and modify the definition by editing its property sheet and using the Fact
Editor.

About Materialized Views


Materialized views are summary tables used by the Oracle8i/9i server to rewrite
queries so they execute faster. The basic idea is simple: a query that retrieves
product totals from a monthly summary table will run much faster than a query
that retrieves data from a detail table and then calculates the monthly subtotals. The
first query retrieves far fewer rows and performs fewer calculations; consequently,
the first query executes much faster.
The Oracle8i/9i server makes this technique viable because end-users need not
know whether the materialized views exist nor how to rewrite queries: the server
automatically does this work transparently. Moreover, the Oracle8i/9i server can
refresh materialized views as the detail data changes.
After proper dimensional design, materialized views are the next best way to boost
query performance, and this chapter shows you how to create the definition for
materialized view using the New Materialized View Wizard. This chapter also
shows you how to modify these definitions using the Materialized View Editor.

Requirements for Query Rewrite


To take advantage of query rewrite, you must create the materialized views and
enable the query rewrite feature. To maximize the number of query rewrites, create
dimension and fact tables so they include the physical characteristics of dimensions
and facts as outlined on page 3-2 and on page 3-3. See the Oracle8i/9i Data
Warehousing Guide, Release 2 for more information about query rewrites.
The Oracle8i/9i server can rewrite and speed up the execution of a large number of
queries using these two materialized view provided the dimension and fact tables
have the physical characteristics of classic dimensions and facts. Appendix B, “The
Mapper User Interface” includes the DDL for a materialized view.

3-4 Oracle Warehouse Builder 3i User’s Guide


Creating a Warehouse Module

About Conventional Views


Conventional views simplify and secure data within a data warehouse without
requiring additional physical storage space. For example, a view could calculate
and return standard deviations for brand summaries rather than a list of details.
This simplifies access for users. Another view could restrict access to the sales
values of specific products. This kind of view simplifies management of the data
warehouses for the Database Administrator.
The procedure for creating a definition for a view is similar to creating a
materialized view. The objects themselves, however, differ considerably. A
materialized view occupies storage space; a view does not. A materialized view
speeds queries; a view has a different purpose. Materialized views are principally
designed for the server and users need not know about their existence; views are
typically advertised to users.
This chapter describes how to create a view definition using the New View Wizard.
This chapter also shows you how to modify the definition by editing its property
sheet or using the View Editor.
Before you create definitions for a star schema, you first create a warehouse module
in the Warehouse Builder repository where the definitions can be stored. The next
section shows you how to create such a module.
You should create schema objects in the following order:
1. Dimensions
2. A fact table
3. Views
Typically, dimensions are created first and objects that reference the dimensions
(facts and views) second. You could create the definition for the fact table first by
omitting the foreign key reference columns and add them later after the dimensions
have been defined. You should also note that when a fact table relies on the server
to verify foreign key references, this same order must be followed.

Creating a Warehouse Module


Before you create definitions for a schema’s dimensions, fact table, and materialized
views, you must first create a place where OWB can store them. OWB stores
definitions for target schemas in warehouse modules, and this section shows you
how to create one for the warehouse schema.

The Target Modules 3-5


Creating a Warehouse Module

To create a warehouse module:


1. Click the navigation tree’s plus sign.
OWB expands the navigation tree.
2. Select MODULES > Create Module
OWB returns the New Module Wizard’s
welcome page.
3. Click Next.
The wizard returns its Name and Other
Information page which solicits:
■ Name of the module
■ Status of the module
■ Type of the module
A module can be Data Source or
Warehouse Target.
■ Description of the module
4. Enter the requested information.
5. Click Next.
OWB returns the Target page. This page
requests:
■ Application
■ Application Version or System Type
■ Integrator used to access other
database dictionaries for definitions
Select the Application, Type, and
Integrator using the drop-down list
activated by down-arrow buttons.
6. Click Next.
OWB returns the Connection Information page. This page solicits information
required to create a database link. OWB can use this link to import definitions
from another schema or from an Oracle Designer repository.

3-6 Oracle Warehouse Builder 3i User’s Guide


Creating a Warehouse Module

Check for a
Designer
Repository.

If you intend to import definitions from another schema or an Oracle Designer


repository, then you need to supply the connection information. Otherwise, you
can simply skip this page. The following steps show you how to crate a link to
an Oracle Designer repository:
7. Select the button for the Oracle Designer Repository.
8. If a link to the Designer repository already exists in the OWB repository, click
the down-arrow, and select its name from the drop-down list. Otherwise, you
must provide the necessary link information.

The Target Modules 3-7


Creating a Warehouse Module

To create a new database link:


1. Click New DB Link
OWB returns the New Database Link
window. Enter the following:
* A name for the new link.
Enter an SQL*Net connect string
or complete host information.
This connect string must be
defined before you can test the
connection.
* Enter a user name and password
for the target schema: StarMart.
2. Click Create and Test.
OWB attempts to connect with the
Designer Repository using the
connection information and returns a
status message in the message box
below the Create and Test button.

Note: A OWB warehouse module can connect only with an


Oracle8i/9i database instance.

3. Click OK.
OWB stores the database link in the repository and its list of available
database links.
4. Click the down-arrow and select the database link from the drop-down list.
The link has been created, tested, and you can now import definitions from
the Oracle Designer Repository.
To import definitions from an Oracle8i/9i data dictionary, select Oracle Data
Dictionary instead of Oracle Designer Repository in step six above.
9. Click Next.
OWB returns the Finish page. This page summarizes the information you
entered on each of the wizard’s pages.

3-8 Oracle Warehouse Builder 3i User’s Guide


Creating a Warehouse Module

Note: OWB returns a Warning panel when the character set of the
database instance differs from the character set of the host for the
OWB client.

If the information displayed on the summary page is incorrect, navigate back


through the wizard pages using the Back button to make corrections.

10. Click Finish.


OWB creates the module in the active project and inserts its name in the
MODULES branch of the navigation tree.
OWB does not automatically commit your work to the repository, that is your
responsibility. You can commit your work immediately or defer this action until you
exit a OWB session. To commit your work immediately, click the Commit icon on
the toolbar. OWB returns a Commit Confirmation panel: click Yes. You can also
defer this action until you exit a OWB session. On exit, OWB always returns an Exit
Confirmation panel: click Yes to commit your work.

The Target Modules 3-9


Creating a Warehouse Module

Displaying the Warehouse Module


You can now verify that OWB created the warehouse module and then use the
Warehouse Module Editor to inspect its initial structure.

Verifying the Module


To verify that OWB created a warehouse module, fully expand the navigation tree
using the Warehouse Module Editor. The name of the warehouse module will
appear in the navigation tree.
The navigation tree shows the modules within
the Project. Typically, the modules are a target
warehouse and source modules. OWB represents
these modules using different icons:
■ Warehouse modules with a warehouse icon.
■ Source modules for relational database
sources with a disk icon
■ Source modules for files with a file icon.
To open a module with an editor, double-click the module’s name.

Inspecting the Module


You can use the Warehouse Module Editor
to inspect the structure of the empty
module or create and store objects in it.
To open the Warehouse Module Editor:
1. Expand the MODULES branch.
OWB lists all of the project’s modules.
2. Double-click the warehouse module’s
name.
OWB opens a new window for the
Warehouse Module Editor, and
displays its navigation tree.
The navigation tree in this window is the
starting point for the remaining instructions
in this chapter.

3-10 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

Creating Dimension Definitions


This section shows you how to create and update a complete definition for a
dimension. Actually, two definitions are associated with each dimension: one
describes the dimension object and the other describes the underlying table.
You create definitions for most dimensions using the New Dimension Wizard.
When the dimension is a time dimension, however, you can speed the process by
using the New Time Dimension Wizard instead. This section describes how to
create definitions for a dimension using the New Dimension Wizard and a Days
dimension using the New Time Dimension Wizard. This section also shows you
how to modify the definitions using their respective property sheets.
When you create a definition for a dimension, you enter detailed information about
the dimension into a series of pages for the New Dimension Wizard. Most of this
information is about the dimension object. Table 3–1 summarizes the kind of
information solicited by each page of the wizard (both wizards have the same set of
pages).

Table 3–1 The New Dimension Wizard Pages


Page Details Example
1 Name of the dimension table Days
2 Levels of aggregation YearL, QuarterL, MonthL, WeekL, DayL
3 Attributes within each level MonthL: day_of_month, month_desc
4 Name of each hierarchy Calendar, Fiscal
5 Order of levels within each hierarchy YearL > QuarterL > MonthL

Defining a dimension table begins from the Navigation Tree in the Warehouse
Module Editor.
To display the navigation tree:
1. Open the Project
2. Fully expand its navigation tree
3. Double-click the module’s name in the expanded tree

The Target Modules 3-11


Creating Dimension Definitions

Defining Rules for Dimension Objects


When you create a definition for a dimension, you create two definitions: one for a
dimension object and the other for a dimension table. Dimension objects are subject
to a few rules which are described in this preliminary section.

About Levels and Hierarchies


Dimension objects consist of a set of levels and a set of hierarchies defined over
those levels. The levels represent "levels of aggregation" and hierarchies describe
parent-child relationships among a set of levels. For example, city is the child of
state because you can aggregate city values into a state value.

For example, a typical calendar dimension could contain five levels and two
hierarchies could be defined on these levels:
H1: YearL > QuarterL > MonthL > WeekL > DayL
H2: YearL > WeekL > DayL
The hierarchies are described from parent to child, so that Year is the parent of
Quarter, Quarter the parent of Month, and so forth.

About Unique Key Constraints


When you create a definition for a hierarchy, OWB creates an identifier key for each
level of the hierarchy and a unique key constraint on the lowest level. OWB uses the
identifier keys during the generation phase to build a DDL script to create the
dimension object.
Subsequently, when you create a foreign key reference constraint on a fact table that
points to a dimension, OWB shows the unique key constraint as well as the other
identifier keys as candidate for the referenced column. A fact table can reference,
however, only the lowest level of a hierarchy: namely, the only level within the
hierarchy with a unique key constraint. Select any other level and the definition is
invalid.

3-12 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

Not valid as targets for a


foreign key reference

About Mixed Levels of Aggregation


An application can require two hierarchies that start at different levels of
aggregation. For example, three hierarchies where:
H1: YearL > QuarterL > MonthL > WeekL > DayL
H2: YearL > WeekL > DayL
H3: YearL > QuarterL > MonthLowL
To model this mixed case using OWB:
■ The dimension table must contain the additional column MonthLow.
■ The MonthLow column must be populated with unique values.
■ A separate MonthLow level must be defined for the dimension.
For this set of hierarchies, OWB generates six level identifiers and two unique key
constraints. One unique constraint is defined on the Days column and the other on
the MonthLow column. Because DayL and MonthLowL are at the bottoms of their
respective hierarchies, they can serve as targets of a foreign key references.

Denormalized Dimensions OWB generates a dimension as a single denormalized table


with a set of levels and hierarchies defined on that table. Each level can have an
arbitrary number of columns.

The Target Modules 3-13


Creating Dimension Definitions

Table 3–2 OWB Rules for Dimension Objects


Rule Description
Denormalized A generated dimension object is defined on a single table.
OWB does not currently support the definition of a dimension
object on a set of normalized tables.
Functional Child values must uniquely determine their parent’s value.
Dependence
For example, a city determines a state, a month determines a
quarter, and a product determines a brand. These relationships
must obtain in the physical data else queries can return
incorrect result sets.
Unique Key OWB generates a unique key constraint only on the lowest
Generation level of a hierarchy.
Foreign Key A table can reference only the lowest level of a hierarchy
References (where the unique key constraint is always defined).

Creating A Dimension Definition


To create definitions for this dimension, you need several specific details about the
table and its dimension object.
Specifically, you need to name the Dimension table and define a primary key
constraint on its warehouse key column. When you define each column, Oracle
recommends setting the constraint to NOT NULL to prevent inconsistent result sets
and to maximize the number of query rewrites.
You also define the dimension hierarchy and its levels of aggregation. Table 3–3
describes an example dimension table with each level of aggregation, a prefix for
each level, and the attributes defined on each level. The levels occur in parent to
child order: class is the parent of family, and family the parent of product.

Table 3–3 An Example of a Dimension Object


Level Prefix Attribute Data Type Description
class cl class_id number Level identifier or key
class_desc varchar(20) Description of product class
family fa family_id number Level identifier or key
family_desc varchar(20) Description of product family
product pd prod_WH number Base level or warehouse key

3-14 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

Table 3–3 An Example of a Dimension Object


Level Prefix Attribute Data Type Description
item_desc varchar(35) Description of the product
product_upc varchar(11) Universal product code (natural key)
item_source varchar(30) Supplier for product
packaging varchar(20) Packaging for the product

To create a dimension definition, open the warehouse module editor, select the
warehouse module and then fully expand its navigation tree.
To create a dimension definition
1. Right-click, then select Dimensions >
Create Dimension.
OWB returns the welcome page for the
New Dimension Wizard.
2. Click Next.
The wizard returns its Name page.
3. Provide information as required,
including:
■ The name of the underlying table.
The wizard automatically
generates a unique name for the
dimension object.
■ A prefix.
Every hierarchy is anchored on a
base level of aggregation, and the
wizard always generates a Unique
Key constraint on the column that
serves as the key column for the base level. The wizard uses the table prefix
to generate a unique name for the UK constraint. If you leave the prefix
blank, OWB uses the table’s name as the default.
■ A description of the dimension.

The Target Modules 3-15


Creating Dimension Definitions

The description field is optional but should be used to fully document


warehouse objects.
4. To name the dimension: enter the dimension’s name, a prefix , and a useful but
concise description.
5. Click Next.
The wizard returns its Levels page. Use this page to explicitly name levels of
aggregation known to exist in the actual data. These levels are used in a
subsequent page to explicitly define the dimension’s hierarchies.

Note: Dimensions contain at least one level of aggregation. You


can define a dummy or default level of aggregation to satisfy this
requirement and include additional levels as required.

To define a level of aggregation, enter the following information:


1. The name of the level: Product, Family, or Class
2. A prefix for the level: pro, fa, or cl (the default is the name of the level)
3. A brief description of the level
4. After you finish entering the information for a level, click Add.
The wizard stores the information about the level and clears the text boxes.
Continue this process until you have defined each level of aggregation.
Prefixes are useful because they:

3-16 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

■ Reduce the number of attributes you need to enter manually: The wizard
automatically generates an ID attribute for each level and assigns it the
name levelprefix_ID.
■ Allow you great flexibility in attribute names: you can reuse attribute
names. This is a common practice when you build dimensions for higher
levels of aggregation.

Note: The dimension prefix is used to form the names of level


unique keys. Once a unique key name is generated, changing the
dimension prefix does not change the names of existing levels
because fact foreign keys may already refer to the generated level.
If you change a dimension prefix, however, any unique key name
generated subsequently will use the new prefix.

6. Click Next.
The wizard returns its Level Attributes page. Use this page to completely define
each level’s attributes. A level can have one or more attributes, and the wizard
always generates an ID attribute for each level.
The ID attribute for a level is special: it serves to identify the level, or you could
say the attribute is the level’s logical key column. This attribute is used in the
CREATE DIMENSION statement to define the level, and the defined level is
used in the statement’s DETERMINES clause to specify all the other columns
within that level (dependent columns). See the Oracle8i/9i SQL Reference and the
Oracle8i/9i Data Warehousing Guide for a complete discussion.
You can use the default name prefix_ID or change ‘ID’ to something else using
the Update button. The following procedure shows you how to define an
attribute, including its aggregation level, data type, and data type parameters.

The Target Modules 3-17


Creating Dimension Definitions

To define an attribute:
1. Click the down-arrow to
select a level of aggregation.
2. Enter a name for the attribute.
3. Select a data type for the
attribute from the drop-down
list under Data Type.
OWB supports the following
Oracle8i/9i data types:
* CHAR
* DATE
* FLOAT
* NUMBER
* VARCHAR
* VARCHAR2
4. Enter the precision, length, or scale as appropriate for the data type and
your application.
5. Click Add or Update.
The wizard records this information in the warehouse module and clears all
of the text boxes.
You can now define another attribute for the active level, or you can change to
another level and define its attributes. Continue this process until you have
defined all the attributes for each level.
The following procedure shows you how to rename the ID column and set the
Hierarchical levels.

3-18 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

To rename the ID column:


1. Select ID in the Level Attributes text box
■ Enter a new name in the Name text box
■ Enter a brief description
■ Click Update.
2. Click Next.
The wizard returns its Hierarchies page.
3. Define the hierarchy.
■ Enter a name and prefix for each hierarchy.
■ Enter a concise description of the hierarchy.
4. Click Next.
The wizard returns its Levels Relationships page.

The Target Modules 3-19


Creating Dimension Definitions

Use this page to order the levels that participate within each hierarchy.
5. Define the levels within a hierarchy:
■ Click the down-arrow and select a hierarchy from the drop-down list.
■ Move the names of levels that participate in a selected hierarchy from
Available Levels to Selected Levels.
■ Order the levels so they reflect the parent to child order.
6. Click Next.
The wizard returns its Finish page. Verify the description.
7. Click Finish.
The wizard creates a definition for
the dimension, stores the definition
in the warehouse module, and inserts
its name in the navigation tree. To
confirm this action, fully expand the
Warehouse Module editor’s
navigation tree. The name of the
dimension now occurs under
DIMENSIONS.
The wizard always generates a
unique key constraint for a dimension table, and this constraint is always on the
ID column that represents the dimension’s base level of aggregation.
Dimensional designs often call for a PK (primary key) rather than a UK
constraint. After you complete a definition for a dimension, you can change the

3-20 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

UK to a PK constraint. See "Changing Key Constraints" on page 3-44 for more


information on how to change the generated UK constraint to a PK constraint.

Updating Dimension Definitions


You can update the definition for a dimension object with the Dimension Editor or
by editing entries in the definition’s property sheet.

Using The Dimension Editor


To update a dimension object, right-click its name in the navigation tree and select
Edit from the pop-up list. OWB returns the Dimension Editor in a separate window.

The Target Modules 3-21


Creating Dimension Definitions

This editor displays its tool palette and the


dimension object. To add an element to the
dimension object, drop an icon from the tool
palette onto a one of the dimension elements. The
tool palette contains three icons: Attribute, Level,
and Hierarchy.
To add an attribute to a level:
1. Fully expand the Level where you want to add
the new attribute.
2. Drop the Attribute icon onto the Level.
OWB adds a dummy attribute (attribute1) in
the level with data type of Number.
3. Enter a name for the attribute.
4. To declare a different data type, double-click
the attribute’s name.
The Dimension Editor returns the dimension
object’s property sheet.
5. Select the Level Attributes tab.
The Dimension Editor returns the Level
Attributes sheet.
6. Change the data type using the drop-arrow list.
After you select a data type from the
drop-down arrow list, you may need to change
the Length, Scale, or Precision depending on
the data type selected.
To print the diagram, click the Print icon on the
Dimension Editor’s toolbar.

Using The Property Sheets


You can update the definition for a dimension table by editing entries in its property
sheet. While you cannot edit a dimension table’s definition using the Dimension
Editor, you must open the Dimension Editor before you can open the property sheet
for its definition.Each definition stored in a OWB repository has an associated
Property Sheet, and you can update the definition directly by editing its property
sheet.

3-22 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

To display the property sheet for a dimension object from either the Warehouse
Module Editor or the Dimension Editor:
Select Edit > Properties or click the Properties icon
You can also display the sheet from the Warehouse Module Editor’s navigation tree:
Select Products > Properties
In all three cases, OWB displays the property sheet for the dimension object:

The property sheet for a dimension object has five tabs:


■ Name
■ Levels
■ Level Attributes
■ Hierarchies
■ Level Relationships
You can edit this sheet, delete items, or use an Add button to include new items.
To display the property sheet for a dimension table:
1. Open the Warehouse Module Editor and fully expand the branch that contains
the names of dimensions.

The Target Modules 3-23


Creating Dimension Definitions

2. Select the dimension name from the navigation tree.


3. Select Edit > Edit Object from the menu.
OWB returns the Dimension Editor.
4. Select Edit > Table Properties from the menu.
OWB returns the dimension table’s Property Sheet.

The property sheet for the dimension table contains four tabs:
■ Name
■ Columns
■ Constraints
■ Attribute Sets

3-24 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

The following examples show you how to order columns within a table’s definition,
change a UK to a PK constraint, create a check constraint, and create attribute sets.

Ordering the Columns By default, the column names within a table’s property sheet
are ordered alphabetically. You can reorder a column by selecting it in the gray box
to the left of the column name and then drag the row to the up or down the list
depending on where you want the column to be in the physical order. After
re-ordering the column names, the names with position numbers occur first in
ascending order followed by the remaining names in alphabetic order.
The order of column names in the property sheet is significant because this ordering
is propagated to the DDL script that OWB generates to create the table. The default
ordering could result in problems when an application is sensitive to the order of
columns in a table. Also, you can order the columns so that a OWB generated
concatenated key (for a fact table) corresponds to expected query usage. This
ordering can greatly influence query performance.
To assign a position number:
1. Open the table’s Property Sheet.

2. Select the Columns tab.


OWB returns the information on all columns defined in the table.

The Target Modules 3-25


Creating Dimension Definitions

3. Enter numbers in the Position column.


The editor orders the columns with position numbers first (increasing value)
and the columns without position numbers second (alphabetic).
You can order the following warehouse objects:
■ Dimensions
■ Facts
■ Tables
■ Views (conventional and materialized)
To change a position number, edit the property sheet.

Changing a Constraint OWB automatically generates a UK constraint for each Level


defined within a dimension. The generated constraint is always on the column
defined as the Level’s ID column, and except for the lowest-level, these constraints
are purely "logical constraints" which are not used when DDL is generated to create
the table. You can edit these constraints but you cannot remove them. If you attempt
to remove one of these constraints, OWB returns an error message.

Figure 3–1 Generated UK Constraints

When you declare a PK or UK constraint, you cannot later change it to a FK or CK


constraint: you must drop the constraint and create a new one. Similarly, if you

3-26 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

create an FK constraint, you cannot change it to any other kind of constraint: you
must drop the constraint and create a new one.
OWB automatically generates a UK rather than a PK constraint on the column that
defines the lowest level of aggregation for a dimension table.
To change a constraint type:
1. Open the table’s Property Sheet.

2. Select the Constraints tab.


OWB returns the information on all constraints defined in the dimension table.

3. Click the drop-down arrow under the Type column and select Primary Key.
4. Change UK in the constraint name to PK.
Note that the editor only allows you to select a UK or PK constraint.
5. Change the name of the constraint to reflect this change.
6. Click OK.
OWB updates the definition of the underlying table.

Note: You cannot remove a generated UK constraint or column


for a dimension’s Level ID.

The Target Modules 3-27


Creating Dimension Definitions

Adding Check Constraints You can add a check constraint to any of a table’s columns.
These constraints typically enforce business rules on values stored in a dimension,
fact, or table but can also be used to define a not null constraint. However, using the
Add Check Constraints feature may slow your load performance.
To add a check constraint:
1. Open the dimension table’s Property Sheet and select the Constraints tab.
OWB returns information on all the constraints defined in the dimension table.
2. Click the Add button.
OWB inserts a row in the sheet’s top pane.
3. Enter a name for the constraint, select Check Constraint, and enter a condition.

4. Click OK.
OWB stores the CHECK constraint in the property sheet.
A CHECK integrity constraint requires that a condition be true or unknown for
every row of the table. If a statement causes the condition to evaluate to false,
then the statement is rolled back.
The condition of a CHECK constraint has the following limitations:
■ The condition must be a Boolean expression that can be evaluated using the
values in the row being inserted or updated.

3-28 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

■ The condition cannot contain subqueries or sequences.


■ The condition cannot include the SYSDATE, UID, USER, or USERENV SQL
functions.
■ The condition cannot contain the pseudocolumns LEVEL, PRIOR, or
ROWNUM.
For additional information on CHECK constraints, see the Oracle8i/9i
Application Developer’s Guide - Fundamentals.

Notes:
■ The column name referenced in the condition of the CHECK
constraint must exactly match a physical name defined for the
table in the table’s Property Sheet.
■ OWB does not check the syntax of the condition. This can result
in problems during the code generation phase when OWB
generates a Create Table statement to deploy the table.

Creating Attribute Sets


Each table in the warehouse module has a predefined attribute set consisting of all
the table’s columns and another attribute set for each constraint. You can create
additional named attribute sets containing any number of the table’s columns in the
order you specify.
A table can have three types of attribute sets:
■ Predefined: attribute sets generated by OWB. You cannot modify or delete
these attribute sets, but OWB will delete an attribute set for a user-defined
constraint if you delete that constraint.
■ User-defined: optional attribute sets that you can create, modify, or delete in the
Table Properties sheet.
■ Bridge-type: an optional attribute set that can be transferred across a bridge for
viewing in another software program. You can create, modify, or delete a
bridge-type attribute set in the Table Properties sheet. A table can have only one
bridge-type attribute set.
All three types of attribute sets can be used in mappings.
To add a named attribute set:
1. Open the dimension table’s Property Sheet and select the Attribute Sets tab.

The Target Modules 3-29


Creating Dimension Definitions

OWB returns information on all the attribute sets defined in the dimension
table.

2. Click the Add button.


OWB inserts a row in the sheet’s top pane.

3-30 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

3. Enter a name for the attribute set, select USER_DEFINED or BRIDGE_TYPE,


and enter a description in the appropriator columns.
4. In the Table Properties sheet’s bottom pane, click the checkbox for each column
(attribute) you want to include. The order in which you select the columns
determines their initial order in the attribute set. (This order appears after you
click OK to create the attribute set and then reopen the Table Properties sheet.)
To change this order, drag and drop the columns to new locations.

The Target Modules 3-31


Creating Dimension Definitions

Note: When you view an attribute set that was created previously,
the attributes that are not selected appear after the selected
attributes in their original order. Changing the order of
non-selected attributes has no effect after you close the Table
Properties sheet.

5. If you selected BRIDGE_TYPE, click the Advanced... button to specify


additional properties of the bridge-type attribute set. (The Advanced... button is
enabled only for a bridge-type attribute set.)
OWB returns the Advanced Attribute Set Properties sheet.

3-32 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

For each attribute in the bridge-type attribute set, specify the properties:
■ Aggregation: Select SUM, MIN, MAX, AVG, COUNT, or DETAIL for no
aggregation. The default is MIN.
■ Position: Select DATA POINT, PAGE, SIDE, TOP, or TOP/SIDE. The default is
PAGE.
■ Item Class: Check for TRUE or no check for FALSE. The default is FALSE.
■ Heading: Enter the heading text.
■ Format: Enter the text for the format field.
■ Custom: Enter the text for the custom field. You can use this field as an escape
extra attribute.
After you have specified the properties for each attribute, click OK.
6. Click OK.

Using the New Time Dimension Wizard


OWB uses the definition created by the Time Dimension Wizard to generate an SQL
insert statement that can be used to populate the dimension. This eliminates the
need for a data source, the definition of a mapping of the source to the dimension,
and load routines to extract and load data. To set the start and end dates for the
statement that generates the data, you must configure the dimension (see
"Configuring Dimensions" on page 8-11 for more information).
This section describes how to use the New Time Dimension Wizard. how to
generate and execute an insert statement that populates the dimension with values.

The Target Modules 3-33


Creating Dimension Definitions

With the New Time Dimension Wizard, you enter information similar to that in the
New Dimension Wizard (see Table 3–1 on page 3-11).

About the New Time Dimension Wizard


The Time Dimension Wizard uses predefined names and prefixes for levels,
hierarchies, and attributes to speed up the process. The attributes also have
predefined data types. When you call the wizard, you simply check off the elements
your dimension requires. You can also define custom hierarchies within the wizard.
After you create the definition, you can edit its property sheet to tailor the definition
to your own specific needs.

Note: Time dimensions differ considerably and many designs


depend on multiple time dimensions. The New Time Dimension
Wizard covers a limited number of cases. If the wizard doesn’t meet
your needs closely, use the New Dimension Wizard instead.

Creating a Time Dimension Definition


The following procedure describes how to set up a time dimension definition. From
the Warehouse Module Editor, open the appropriate warehouse module and then
fully expand its navigation tree.
1. Select Dimensions > Create Time Dimension.
OWB returns the welcome page for
the New Time Dimension Wizard.
2. Click Next.
The wizard returns its Name page.
This page solicits:
■ The name of the underlying table.
The wizard automatically
generates a unique name for the
object.
■ A prefix.
■ A description of the dimension.
The role of the prefix is described on page 3-16.
3. Click Next.

3-34 Oracle Warehouse Builder 3i User’s Guide


Creating Dimension Definitions

The wizard returns its Levels page. This page contains several predefined levels
of aggregation and a prefix for each level.

4. Check the levels of aggregation required to support your dimensional model.


5. Click Next.
The wizard returns the Level Attributes page. This page contains a set of
predefined attributes for each level.

down-arrow

■ Click the down-arrow and select a level of aggregation.


■ Check the required attributes for that level.
Continue this process until attribute sets are selected for each level.
6. Click Next.
The wizard returns the Hierarchies page. This page contains a set of predefined
attributes for each level.

The Target Modules 3-35


Creating Dimension Definitions

7. Check the predefined hierarchies required by the time dimension.


8. Add custom hierarchies required by the time dimension.
To add a custom hierarchy, click Add, name the hierarchy, and briefly describe
the hierarchy.
After the definition has been created, you can change the name by editing its
property sheet.
9. Click Next.
The wizard returns the Level Relationships page. Use this page to define the
levels for each custom hierarchy. order the levels within each hierarchy. To
define the levels, move the level’s name from the Available Levels box to the
Selected Levels box. The wizard automatically orders the levels.
10. Click Next.
The wizard returns the Finish page. Verify the levels, attributes, and hierarchies
and make corrections to individual elements (use the Back button to navigate).
11. Click Finish.
The wizard stores the definition in the warehouse module.

3-36 Oracle Warehouse Builder 3i User’s Guide


Creating Fact Table Definitions

The New Time Dimension Wizard generates the attributes you select plus
additional attributes and constraints. In addition to the selected attributes, the
wizard generates:
■ An ID attribute for each level
■ A Smart_key attribute for the base level
■ A UK constraint on the ID attribute for each level, which you can modify but not
remove (see the discussion in "Changing a Constraint" on page 3-26)
■ A PK constraint on the Smart_key attribute
You can modify the names of these elements and change the constraint type.
The predefined names for the levels, attributes, and hierarchies in the Time
dimension differ from those in other dimensions. You can change these names
quickly by editing the dimension object’s property sheet. For additional information
on editing a dimension object, see the discussion on page 3-21.

Defining a Sequence Object


A sequence object populates the warehouse key column for a dimension. To define
a sequence object, you use the New Sequence Wizard to name the sequence. You
can configure these settings for use in creating ETL mappings. These settings are
described in "Adding Sequences" on page 6-30.
To define a sequence object:
1. Select SEQUENCE > Create Sequence.
2. Enter a name and description for the sequence in the appropriate fields.
3. Click Finish.

Creating Fact Table Definitions


This section shows you how to create and update a definition for a fact table. You
create a definition for a fact table using the New Fact Table Wizard, and you update
the definition by editing its property sheet. You can also import definitions for
tables from another database source or an Oracle Designer Repository.
When you create a definition for a fact table, you use the New Fact Table Wizard to
enter detailed information about the table using a series of pages. This information
includes details regarding foreign key references, measures, and the data types of all

The Target Modules 3-37


Creating Fact Table Definitions

the table’s columns. Table 3–4 summarizes the kind of information to enter into each
wizard page..
Table 3–4 New Fact Table Wizard Pages
Page Details Examples
1 Name of the fact table Sales, Telephone Calls, Poll Answers
2 Define Foreign Keys Days, Products, Customers, Channels
3 Define Measures Dollars, Units, Cost, Margin

To create a fact table definition, open the warehouse module editor, select the
warehouse module and then fully expand its navigation tree. To display this
navigation tree:
1. Open a project
2. Fully expand its navigation tree
3. Double-click the module’s name in the expanded tree.

Creating a Definition for a Fact Table


This section describes how to create a fact table definition. From the Warehouse
Module Editor, open the warehouse module and expand its navigation tree.
To create a fact table definition:
1. Select FACTS > Create Fact.
OWB returns the welcome page for
the New Fact Wizard.
2. Click Next.
The wizard returns its Name page.
Into the appropriate fields, enter
■ The name of the fact table
■ A description of the fact table
The description field is optional but
should be used to fully document
warehouse objects.
3. Enter the fact table’s name and a description into the appropriate fields.

3-38 Oracle Warehouse Builder 3i User’s Guide


Creating Fact Table Definitions

4. Click Next.
The wizard returns the Define Foreign Keys page. Use this page to explicitly
define each of the table’s foreign key references.

To define a foreign key reference:


1. Click the first down-arrow to select the name of a dimension (Days).
2. Click the next down-arrow to select the base or warehouse key Level (dayL).
3. Click the third down-arrow to select the Primary Key column constraint
defined on the dimension.
4. Click Add.
The wizard generates a name for the foreign key reference constraint and
inserts a line in the text box that lists the table’s foreign keys.

Note:
■ The Fact Wizard displays the name for each generated PK
constraint on a dimension’s level columns. Only the lowest
level PK constraint is an actual physical constraint.
■ You cannot modify the name or data type of the foreign key
reference columns. You can only do this by editing the
definition for the referenced table.
■ If you add a column to a PK or UK constraint on a dimension,
you must also update the fact table foreign key references.

Repeat this four-step procedure to define a foreign key constraint for each
dimension referenced by the fact table. Always choose the lowest level of
aggregation for the foreign key reference target.

The Target Modules 3-39


Creating Fact Table Definitions

You can modify the name of the generated foreign key reference constraint to a
more meaningful one: select the generated name and type over it. The name
must be unique within the Project.

5. Check the box at the bottom of the page that says "Create segmented unique
key automatically from foreign keys."
6. Click Next.
The wizard returns the Define Measures page. Use this page to define each of
the fact table’s measures.

To add a measure:
■ Click Add.
■ Enter its name.
■ Set its data type.
Continue these steps until all of the fact table’s measures have been defined.
7. Click Next.
The wizard returns the Attribute Sets page. Create attributes as described in
"Creating Attribute Sets" on page 3-29.
8. Click Next after you have created Attribute Sets.
The wizard returns the Finish page. This page describes the fact table. Verify
the description and click Back if you need to modify any of the elements.
9. Click Finish.

3-40 Oracle Warehouse Builder 3i User’s Guide


Creating Fact Table Definitions

The wizard creates a definition for a fact table, stores it in the warehouse
module, and inserts its name in the warehouse module’s navigation tree. You
can confirm this by fully expanding the editor’s navigation tree. The name of
the dimension occurs under the FACTS branch.

Updating a Fact Table Definition


A fact object—like a dimension object—has two property sheets: one for the Fact
Object and another for the Fact Table. You can update a fact object’s properties by
editing entries in these property sheets. In addition, you can add foreign key
references or measures to a fact object using the Fact Editor. You can also use to Fact
Editor to display a fact object’s property sheets as well as all the property sheets of
the dimensions it references.

Using the Fact Editor


The Fact Editor displays a diagram of a fact object and its dimensions. To edit the
Sales fact table using this editor, right-click the name of the fact table in the
Warehouse Module Editor’s navigation tree and then select Edit from the pop-up
menu. OWB returns the Fact Editor in a new window. This editor returns its tool
palette and a diagram of the fact table and its dimensions.

To print the diagram, click the printer icon on the editor’s tool bar.

The Target Modules 3-41


Creating Fact Table Definitions

The fact table diagram is a live display. For example, drop one of the icons from the
tool palette on the fact table, and the editor returns the welcome page for the Add
Measure or Foreign Key References Wizard.
To edit a Fact table’s properties, right-click on the table object
in the Fact Editor or select Fact > Fact Properties from the
Fact Editor menu. The editor returns a pop-up list that
contains several selections.
Select Properties from the pop-up list and the editor returns
a property sheet that describes the object’s properties. These
properties include the object’s name and description, its foreign key references, its
measures, and its attribute sets.
Click the Foreign Keys tab to display a list of all the object’s foreign key references.

From these sheets, you can:


■ Change the name and description of the object.
■ Add or Remove a foreign key reference constraint.

3-42 Oracle Warehouse Builder 3i User’s Guide


Creating Fact Table Definitions

This panel shows all of the UK constraints defined on a dimension: the base level of
aggregation and each higher level of aggregation. OWB generates DDL only for the
constraint defined on the base level of aggregation.
■ Change the name of a foreign key reference constraint.
■ Add, Remove, or edit a measure (name, data type, and description).
You edit the table’s property sheet if you want to change its physical properties.
Select Table Properties from the pop-up list and the editor returns the property
sheet that gives a view of the underlying fact table. The property sheet describes the
fact table according to its constraints and columns.

From these sheets, you can:


■ Change the name and description of the object.

The Target Modules 3-43


Creating Fact Table Definitions

■ Add a new column, edit the name, data type, column position, and
description of an existing column, or Remove a column. For a description of
the Position column, see discussion on page 3-25.
■ Add, Remove, or edit a foreign key reference constraint.
■ Add, Remove, or edit Attribute Sets

Note: You can change a UK constraint to a PK constraint or


vice-versa; however, you cannot change an FK constraint to another
kind of constraint. You must first remove the constraint and create a
new one.

If you click a dimension instead of the fact, the Fact Editor returns a pop-up list
specific to dimensions. From this list, you can display the property sheets for the
selected dimension and also call the Dimension Editor.

Changing Key Constraints The Oracle8i/9i server can automatically refresh


materialized views provided that a materialized view log file is created for the
underlying fact table. You cannot build the log file, however, unless the fact table
has a PK constraint. To change the composite UK constraint defined on a fact table to
a PK constraint, display the Constraints property sheet for the fact table.

From this sheet:

3-44 Oracle Warehouse Builder 3i User’s Guide


Creating Fact Table Definitions

■ Select the generated segmented key name.


■ Select Primary Key from the down-arrow for the Type column.
■ Change the name of the constraint to reflect its new property.
■ Click OK.

Importing Definitions
If a warehouse module is configured for connection with an Oracle8i/9i database
instance or with an Oracle Designer Repository, you can import definitions for
tables, Views and Sequences using the Import Metadata Wizard.
To import definitions from an Oracle8i/9i database or an Oracle Designer
Repository:
1. Configure the warehouse module to connect with the source.
2. Open the warehouse module.
3. Select Module > Import from the Warehouse Module Editor’s toolbar.
OWB returns the welcome page for the Import Metadata Wizard.
4. Click Next.
The wizard returns its Filter Information page.

The Target Modules 3-45


Creating Materialized View Definitions

See "To import definitions from an Oracle database application:" on page 4-17
for a discussion of wizard’s subsequent pages.

Designer Repository Notes: You cannot import:


■ Dimension Objects.
■ Position will be renumbered as 10, 20, 30, ….

Creating Materialized View Definitions


This section shows you how to create and update definitions for materialized views.
You create a definition for a materialized view using the New Materialized View
Wizard. You modify a view’s definition by editing its property sheet.
Both views summarize sales by date. Together these views support a wide variety
of query rewrites that speed up query execution. The query rewrites depend on the
hierarchies and not null constraints defined on the referenced dimensions.

3-46 Oracle Warehouse Builder 3i User’s Guide


Creating Materialized View Definitions

When you create a definition for a materialized view, the New Materialized View
Wizard solicits detailed information about the view through a series of pages. This
information includes details regarding foreign key references, columns, and their
data types. Table 3–5 summarizes the information solicited by each page.

Table 3–5 New Materialized View Wizard Pages


Page Details Examples
1 Name and description Customer_Summaries, Product_Summaries
2 Aliases for each column Total_Sales, Total_Cost, Total_Units
3 Query that defines the view Customer_Summaries, Product_Summaries
4 Constraints on the view Days, Products, Customers, Channels

The starting point for each example is the navigation tree for the warehouse
module. To display this navigation tree:
1. Open the project
2. Fully expand its navigation tree
3. Double-click the module’s name in the expanded tree.
For more details, see the example on page 3-6.

Creating A Materialized View Definition


Table 3–6 describes the columns and foreign key references defined for the
materialized view. This view also has a composite primary key constraint defined
on its foreign key reference columns.

Table 3–6 An Example Materialized View


Alias Data Type Description Constraint Name
day_WH number(38) FKR to Days dimension dl_day_PK
product_WH number(38) FKR to Products dimension po_product_PK
sales number(36, 2) Daily subtotal
cost number(36, 2) Daily subtotal
units number(38) Daily subtotal

To Create a Materialized View Definition:

The Target Modules 3-47


Creating Materialized View Definitions

1. Open the warehouse module and expand its navigation tree.


2. Select Materialized View > Create Materialized View.
OWB returns the welcome page for
the wizard.
3. Click Next.
The wizard returns its Name page.
Enter
■ The name of the view
■ A description of the view
The description field is optional but
should be used to fully document
warehouse objects.
4. Click Next.
The wizard returns its Columns page.
Use this page to explicitly define each
of the materialized view’s columns (or
an alias for each column).
To define a column:
1. Click Add.
2. Enter the column’s name.
3. Set the column’s data type.
Repeat this procedure for each column.
5. Click Next.
The wizard returns its optional Query Text page. When you create the definition
for a materialized view, you have two options; you can:
■ Enter the text for a query that defines the view.
■ Leave the Query Text box empty. Then later in the development (during the
mapping stage) you can create a mapping that defines the necessary query.
The following example includes the query text, and Chapter 6, "Mapping
Operators and Transformations" shows you how to create a mapping to define
the query text.

3-48 Oracle Warehouse Builder 3i User’s Guide


Creating Materialized View Definitions

Usage Notes:
■ OWB does not generate code for a view if query text is not included in
its Property Sheet nor if it has no columns defined.
■ OWB generates a Create Materialized View statement to deploy the
view even if its syntax is invalid: OWB does not check the syntax of
the select statement used to define a view.
■ Manually entered queries are automatically completed with a
semi-colon—adding one will cause a syntax error.

Click Next.

The Target Modules 3-49


Creating Materialized View Definitions

The wizard returns its Define Constraints page.

To define a foreign key constraint:


1. Click Add adjacent to the upper box and enter the constraint’s name.
2. Select the constraint type: Foreign Key.
3. Select the constraint’s:
* Referenced Application (defined within a Warehouse Module)
* Referenced table
* Referenced key
4. Click Add adjacent to the lower text box and then select the column local to
the view (click the down-arrow) that makes the foreign key reference.
Continue these steps until all of the foreign key constraints have been defined.
To define a PK or UK constraint:
1. Click Add adjacent to the upper box, then enter the constraint’s name and
select its type.
2. Click Add adjacent to the lower text box and then select the local columns
that participate in the constraint.
Continue these steps until all of the PK and UK constraints have been defined.

3-50 Oracle Warehouse Builder 3i User’s Guide


Creating Materialized View Definitions

6. Click Next.
The wizard returns its Finish page.
7. Verify the description, and if you need
to modify the definition, click Back.
8. Click Finish.
The wizard creates a definition for the
materialized view, stores this definition
in the warehouse module, and inserts its
name in the warehouse module’s
navigation tree. Confirm this by fully
expanding the editor’s navigation tree.
The name of the materialized view now
occurs under the MATERIALIZED VIEWS
subtree.
9. Double-click the name of the
materialized view to display a diagram
of the materialized view.

Updating a Materialized View Definition


To update the materialized view, right-click its name in the navigation tree. OWB
returns a pop-up menu. You can select Edit or Properties from the pop-up menu.
Select Edit from this the pop-up menu and OWB returns the Materialized View
Editor in a new window. This editor diagrams the materialized view and its
references.
Select Properties from the pop-up menu and OWB returns the materialized view’s
property sheet. You can modify the view’s definition by editing the property sheet.
For examples on editing a definition from its property sheet, see "Updating
Dimension Definitions" on page 3-21.

Renaming a Materialized View


You can rename a materialized view or other warehouse object. For example, to
rename a materialized view, right-click the view’s name and select Rename. OWB
highlights the name and you can type over the old name.

The Target Modules 3-51


Creating Conventional View Definitions

Creating Conventional View Definitions


This section describes how to create and update definitions for conventional views.
You create a definition for a conventional view using the New View Wizard. You
update the view’s definition by editing its property sheet.
When you create a definition for a view you use the New View Wizard to enter
detailed information about the view using a series of pages. This information
includes details regarding foreign key references, columns, and data types of each
column. Table 3–7 summarizes the kind of information solicited by each wizard
page.

Table 3–7 The New View Wizard Pages


Page Details Examples
1 Name and description Customer_Summaries, Product_Summaries
2 Aliases for each column Total_Sales, Total_Cost, Total_Units
3 Query that defines the view Customer_Summaries, Product_Summaries
4 Constraints on the view Days, Products, Customers, Channels

The starting point for each example is the navigation tree for the warehouse
module. To display this navigation tree:
1. Open the project module.
2. Fully expand its navigation tree
3. Double-click the module’s name in the expanded tree.
For more details, see the example on page 3-6.

Creating A View Definition


A view summarizes the daily sales of each product manufactured by Global
Computing Company. The view contains data only for products that are within the
Desk Top family.
Table 3–6 describes the columns and foreign key references defined for an example
view. This view also has a composite primary key constraint defined on its foreign
key reference columns.

3-52 Oracle Warehouse Builder 3i User’s Guide


Creating Conventional View Definitions

Table 3–8 An Example of a Conventional View


Alias Data Type Description Constraint Name
day_WH number(38) FKR to Days dimension dl_day_PK
product_WH number(38) FKR to Products dimension po_product_PK
sales number(36, 2) Daily subtotal
cost number(36, 2) Daily subtotal
units number(38) Daily subtotal

Although this view has similar structure to a materialized view, the views differ as
follows:
■ Function: A view restricts access to a single family of products; the materialized
view makes queries run faster.
■ Visibility: A view is visible to a class of users; the materialized view and its
operation are transparent to all users.
■ Physical Storage: A view occupies no storage space; the materialized view
does.
Although a view differs from a materialized view, the procedure to create a views is
the same.
To Create the Definition
1. Open the warehouse module and expand its navigation tree.
2. Select View > Create View.
OWB returns the welcome page for
the wizard.
3. Click Next.
OWB returns the wizard’s Name page
which solicits:
■ The name of the view
■ A description of the view
Complete the description box to
document the view.
4. Click Next.

The Target Modules 3-53


Creating Conventional View Definitions

The wizard returns its Columns page.


Use this page to explicitly define each of
the materialized view’s columns (or an
alias for each column).
To define a column:
1. Click Add.
2. Enter the column’s name.
3. Enter the column’s data type.
Repeat this procedure for each column.
5. Click Next.
The wizard returns its optional Query Text page. When you create the definition
for a view, you have two options. You can:
■ Enter the text for a query that defines the view in the Query Text box.
■ Leave the Query Text box empty. Then, during the mapping stage, you can
create a mapping that defines the necessary query.
The following example shows you how to include the text; Chapter 6, "Mapping
Operators and Transformations" shows you how to create a mapping to define
the query text.

3-54 Oracle Warehouse Builder 3i User’s Guide


Creating Conventional View Definitions

Usage Notes:
■ OWB does not generate code for a view if its query text is not included
in its Property Sheet nor if it has no columns defined.
■ OWB generates a Create View statement to deploy the view even if its
syntax is invalid: OWB does not check the syntax of the select
statement used to define a view.

6. Click Next.
The wizard returns its Define Constraints page.
Use this page to define "logical constraints" for a view. These constraints may be
useful when the view serves as a data source within a mapping. For example, if
you use a view as a data source within a mapping, then the Mapping Editor can
use the logical foreign key constraints to include its referenced dimensions as
secondary sources in the mapping.

The Target Modules 3-55


Creating Conventional View Definitions

Follow the procedure described on page 3-50 that shows you how to define
foreign key reference constraints on a View.
7. Click Next.
OWB returns the Finish page.
8. Verify the description, and if you need
to modify the definition, click Back.
9. Click Finish.
OWB creates a definition for the view,
stores the definition in the warehouse
module, and inserts its name in the
warehouse module’s navigation tree.
Confirm this by fully expanding the
editor’s navigation tree. The name of the
materialized view now occurs under the
VIEWS subtree.

10. Double-click the name of the


materialized view to display a diagram
of the materialized view.

Updating a View Definition


To update the view, right-click its name in the navigation tree. OWB returns a
pop-up menu. You can select Edit or Properties from the pop-up menu.

3-56 Oracle Warehouse Builder 3i User’s Guide


Creating Conventional View Definitions

Select Edit from this the pop-up menu and OWB returns the View Editor in a new
window. This editor diagrams the view and its references.

Click to change
displayed position
of the key columns.

Click to change the


displayed sort order.

Neither of these actions


alter the actual position
in the generated DDL.

Select Properties from the pop-up menu and OWB returns the view’s property
sheet. You can modify the view’s definition from the property sheet by editing
existing entries. For information on editing a definition from its property sheet, see
"Updating Dimension Definitions" on page 3-21.

Renaming A View
You can rename a view or other warehouse object. To rename a view, right-click the
view’s name and select Rename. OWB highlights the name and you can type over
the old name.

The Target Modules 3-57


Adding Transformations

Adding Transformations
Transformations are pre-built PL/SQL functions, procedures, package functions,
and package procedures. Custom transforms are used to define an operation
outside of the Oracle Library or a group of operations. You create a custom
transform using the New Transform Wizard.
The following sections describe how to create transformation categories and create
definitions for transformations using the libraries or Expression Builder.

About Transformations
A transformation is a black box operation that changes the values of the data
passing through it. It consists of one input parameter group and at least one output
parameter group. The input or the output parameters of a transform is all the
parameters in all its input or output parameter groups. A transform takes one row
of data from its input parameters and produces one row of data to its output
parameters. In other words, the cardinality of the output parameter groups is the
same as that of the input parameter group.

Transform: Accepts source data as input, transforms the data, and


returns the result to a column in a target object.

OWB supports the following transformation types:


■ User Transform Package–This category is created by the user and contains
package functions and procedures that are defined by the user.
■ Predefined Transforms–These categories exist in the Oracle Library and
consist of a mix of built-in and seeded functions and functions and
procedures.
■ Standalone Functions–This category is called FUNCTIONS and is
automatically created in every warehouse module. This category contains
any standalone functions used as transformations. These functions may be
defined by the user or imported from a database.
■ Standalone Procedures–This category is called PROCEDURES and is
automatically created in every warehouse module. This category contains
any standalone procedures used as transformations. These procedures may
be defined by the user or imported from a database.

3-58 Oracle Warehouse Builder 3i User’s Guide


Adding Transformations

■ Imported Package–This category is created by importing a PL/SQL


package. The package body may be modified. The package header
(function/procedure signatures) may not be modified. The package may be
viewed in the transformation category property sheet.
A function transform takes 0-n input parameters and produces a result value.
A procedure transform takes 0-n input parameters and produces 0-n output
parameters.

About Transformation Parameters


Most transformations have parameters. The input parameter specifies a source of
data, the output specifies a result. More complex transformations often have
multiple input, input/output, and output parameters.

About Oracle Transformation Libraries


Each time you create a source or warehouse module, OWB creates a Transformation
Library for that module containing transform operations. This library always
contains the standard Oracle Library and an additional library for each module
defined within the repository. Definitions for custom transforms are stored in a
warehouse module’s Transformation Categories branch, a branch that can be
subdivided into one or more categories using the New Transformation Category
wizard. These libraries are used to store definitions for custom transforms.
Transformation Libraries consist of the following types:
■ The Global Shared Library–a collection of re-usable Transformations
categorized as functions and procedures defined within your repository.
■ The Oracle Library–a collection of pre-defined functions from which you can
define procedures for your Global Shared Library.
Every time you create a target warehouse module, the transformations associated
with the module will be considered an additional transformation library accessible
only to that module.
Transformations associated with mappings within the target module should be
added to the warehouse module’s Transformation Categories branch.
Transformations that are to be shared between projects should be added to the
Transformation Categories branch in the Global-Shared-Library.

The Target Modules 3-59


Adding Transformations

The Global-Shared Library


Custom transforms are used to define an operation outside of the Oracle Library or
a group of operations. You create a custom transform much like you would a new
table for a mapping. Definitions for custom transforms are stored in a warehouse
module’s Global Shared Library in the Transformations branch, a branch that can be
subdivided into one or more categories in the Module Editor. The Global-Shared
Library houses those transformations that are shared across a repository. The
default categories are
■ Functions–This category stores standalone functions.
■ Procedures–This category stores standalone Procedures.

The Oracle Library


The Oracle Library includes a set of standard transforms organized into five
categories. Expand the Oracle Library branch to display the categories.
■ Administration
■ Character
■ Conversion
■ Date
■ Numeric
■ Other
■ XML

Accessing Transformation Libraries


You can access the Transformation Libraries either from Expression Builder, the
Add Transformation dialog, or from the New Transformation Wizard. You can also
access Transformation Libraries from the navigation tree in the OWB Console. The
methods of accessing the libraries are described in the following task descriptions.

Creating Transformation Categories


Definitions for custom transforms reside within a warehouse module, and you can
create Transformation Categories to organize these definitions into packages. The
following steps show you how to create transformation categories within the
warehouse module using the New Transformation Category Wizard.
To create a transformation category:

3-60 Oracle Warehouse Builder 3i User’s Guide


Adding Transformations

1. Expand the navigation tree for the active warehouse module.


2. Select Transformation Categories > Create Transformation Category
OWB returns the New Transformation Category Wizard welcome page.
3. Click Next.
The wizard returns the Name page.
4. Enter a name and description for the category.
A category name can have from 2 to 40 alphanumeric characters but no spaces.
5. Click Finish.
The wizard inserts the category’s name the module’s navigation tree.

Defining Custom Transforms


You can create new transformations using the New Transformation Wizard. Note by
creating a new transformation , you are actually creating a custom transformation
that requires code entry on your behalf.. You will need to be familiar with SQL
and/or PL/SQL in order to complete this task.
To define a custom Transform:
1. Open the Transformation node on the Navigation Tree in the Warehouse
Module Editor
2. Select a transformation category as appropriate for the type of transformation
you want to create.
3. Right-click on the category and select Create Transformation from the popup
menu.
OWB opens the New Transformation Wizard.
4. Enter a name in the Name field and a description documenting what the
transform does.
5. Select a transform type from the Type pull down list.
6. Click Next.

The Target Modules 3-61


Adding Transformations

Figure 3–2 The Transformation Name Page

7. Define the Parameters for the transform on the Parameters page.


■ Click Add.
■ Enter a name for the Parameter into the Name column.
■ Specify the type; the order; whether it is an Input, Output, or Input/Output
parameter; and whether the parameter is required.
You must specify values for each parameter.

3-62 Oracle Warehouse Builder 3i User’s Guide


Adding Transformations

Figure 3–3 The Transformation Parameter Page

8. Click Next.
9. Enter the PL/SQL code for the parameter on the Transformation
Implementation page.

The Target Modules 3-63


Adding Transformations

Figure 3–4 The Transformation Implementation Page

After values have been specified for each parameter, if necessary, use the Back
button to navigate the wizard pages make corrections.
10. Click Finish.

Editing Transformation Properties


You can update the definition of a transform by editing its property sheet. The
following procedure assumes you are in the Module Editor.
Edit these property sheets carefully. If you change the name of an input parameter,
then you will probably need to reflect this change in implementation syntax.

Importing PL/SQL Packages


Using the Import Wizard, you can import PL/SQL functions, procedures, and
packages into an OWB project.When OWB generates a script for the extract and
load job, it will generate the added constraint within the PL/SQL routine that

3-64 Oracle Warehouse Builder 3i User’s Guide


Adding Transformations

implements the mapping. At runtime, you can accept the default value or supply a
different one.
When you submit the job using Oracle Enterprise Manager, you can modify the
runtime parameter value then.
The following steps describe how to import PL/SQL packages from other sources
into OWB.
To import a PL/SQL function, procedure, or package:
1. Select Module > Import... from the Warehouse Module Editor menu.

Figure 3–5 The Import Selection On The Warehouse Module Editor Menu

OWB returns the Import Metadata Wizard Welcome page.


Click Next.
2. Select PL/SQL Transformation from the Object Type portion of the Filter
Information window.

The Target Modules 3-65


Adding Transformations

Figure 3–6 The PL/SQL Transformation Selection

3. Click Next.
The Import Metadata Wizard returns the Object Selection Page.

3-66 Oracle Warehouse Builder 3i User’s Guide


Adding Transformations

Figure 3–7 The Object Selection Page

4. From the Object Selection page, select a function, procedure, or package from
the database source tree within the available objects window. Move the object(s)
to the selected objects side using either the > to move a single object, or >> to
move multiple objects.
5. Click Next.
The Import Metadata Wizard returns the Summary and Import page.

The Target Modules 3-67


Adding Transformations

Figure 3–8

6. The Summary Import window displays information regarding what it is


importing. You may click Back to revise your selections.
7. Click Finish to import.
The imported PL/SQL information appears in the Module Editor under
Transformation Categories. Expand imported function and package to see the
Transformation information.

3-68 Oracle Warehouse Builder 3i User’s Guide


Defining Business Areas

Figure 3–9

You may now use the imported transformations. You can proceed to generate the
code and deploy.
A few things to take note of when using the imported PL/SQL:
■ You can edit, save, and deploy the imported PL/SQL functions and procedures
■ You cannot edit imported PL/SQL packages
■ Wrapped PL/SQL objects are not readable
■ Imported packages may be viewed/modified in the category property sheet.
■ You may edit the imported package body but not the imported package
specification

Defining Business Areas


A business area is a logical grouping of data that satisfies specific data requirements
for a particular business purpose. You can define one or more business areas within
a warehouse module. These areas define "shortcuts" to a subset of the module’s
objects. The business tree displays a warehouse module’s business areas, which
contain links to the actual data in the logical tree.

The Target Modules 3-69


Defining Business Areas

Business areas are most useful when the logical warehouse contains a large number
of objects. You should define business areas when you need to continually examine
natural subsets of the warehouse’s objects or export subsets of objects to a decision
support tool such as Oracle Discoverer or Oracle Express. For example, you could
define a subset of warehouse objects called Products that contains links only those
objects that pertain to product sales and another area called Customers that pertains
to customer sales.
Oracle Discoverer and Oracle Express use business areas to provide their users with
access to the precise data they need for ad hoc queries, decision support, and
presentation of results. You can use the Oracle CWM bridges to export business
areas from OWB to Discoverer and Express.

About Business Areas


You can create multiple business areas, and these areas can share the same links. For
example, the Products and the Customers business areas both include the Days
dimension and the Sales fact tables.
When you create a business area, you are creating links to existing objects and
organizing them into identifiable subsets. Thus, for a given warehouse module,
there is only one Sales table, one Days dimension table, and one Product_
Summaries materialized view although their names can occur in the navigation tree
for a warehouse module and one or more business areas.
After you create a business area, you can update its definitions using the standard
Oracle Warehouse Builder editors, such as the Dimension, Fact, Table, and Mapping
editors. You can also update an object’s definitions by editing its property sheet. For
additional information on updating definitions, see previous examples in this
chapter.

Note: When you create a business area, you do not create any new
objects—the business area only organizes existing objects into
identifiable subsets or a more friendly view.

3-70 Oracle Warehouse Builder 3i User’s Guide


Defining Business Areas

Creating a Definition for a Business Area


To create a definition for a subset of warehouse objects in a business area:
1. Open the warehouse module.
2. Click the Business Tree tab.
OWB returns the navigation tree for the business areas.

3. Right-click on the warehouse module and select Create Business Area from the
drop-down menu. (Alternatively, use the keyboard command Ctrl + N.)
OWB returns the Business Area Dialog panel. This panel contains three areas:
■ Text box for the business area’s name.
The name can be a logical or physical name.
■ Text box for the business area’s description.
■ Names for each link to an object within the warehouse module and a
corresponding check box.

The Target Modules 3-71


Defining Business Areas

Use the text boxes to name and describe the business area and then select the
check box for each object that is to be linked within the business area.

4. Enter a name and description, and select the objects to include within the
business area. You can select the check box for a type to select all objects of that
type.
5. Click OK.
OWB creates the business area and stores it in the warehouse module’s business
tree.

3-72 Oracle Warehouse Builder 3i User’s Guide


Infrastructure Requirements

Infrastructure Requirements
Before you can deploy a physical instance of a logical data warehouse, you need
complete the following tasks:
1. Create a user name for the owner of the physical schema in an Oracle8i/9i
database instance.
2. Create a set of tablespaces for the physical database objects. These must be
defined before you can complete a configuration of a physical instance.
3. Deploy the OWB Runtime Libraries to the target schema.
The first two tasks are Oracle8i/9i administration tasks, but the third is specific to
OWB and is completed using the OWB Runtime Assistant. See the Oracle Warehouse
Builder 3i Installation Guide for more information on the OWB Runtime Assistant.

The Target Modules 3-73


Committing Your Changes

Committing Your Changes


OWB does not automatically commit your additions or changes to the repository,
that is your responsibility. You can immediately commit your work or defer this
action until you exit a OWB session.
To commit your work immediately, click the Commit icon on the toolbar. OWB
returns a Commit Confirmation panel: click Yes. You can also defer this action until
you exit a OWB session. On exit, OWB always returns an Exit Confirmation panel:
click Yes to commit your work.

Note: If you generate code at any time during your Warehouse


OWB Session, Multi-User Locking feature will remain in effect until
after you commit your changes.

Taking the Next Step


This chapter described how to create logical definitions for a data warehouse project
using Oracle Warehouse Builder wizards and how to edit these definitions by using
various a Warehouse Builder editors and property sheets.
You are now ready to create the next set of definitions. These definition will
describe data sources used to populate the data warehouse project. Chapter 4, "The
Data Source Modules" will describe how to create definitions for database and flat
file sources and how to create source modules in the OWB repository to store the
definitions.

Warehouse Module: A place within a OWB project that organizes


and stores definitions for a target warehouse schema.

3-74 Oracle Warehouse Builder 3i User’s Guide


4
The Data Source Modules

This chapter describes how to create definitions for data sources using Oracle
Warehouse Builder wizards. To create a set of definitions for a database source, you
import the definitions from the source. You can import definitions from Oracle and
non-Oracle database systems, and from Designer repositories. OWB enables you to
define a source file structure by sampling data from flat files.
This chapter also shows you how to modify definitions, generate and display
diagrams for the source objects, and print diagrams.
OWB stores definitions for data sources in containers called source modules. The
first section of this chapter describes how to create source modules for different
kinds of data sources. The subsequent sections describe how to import or create
definitions for sources using OWB wizards. The closing section reviews the
infrastructure requirements that must be satisfied before you can implement a
physical instance of the logical warehouse.
This chapter includes the following sections:
■ Creating Source Modules
■ Importing Definitions From Database Sources
■ Creating Definitions for Flat File Sources
■ Importing Definitions for Pure Extract and Pure Integrate
■ Infrastructure Requirements
■ Committing Your Changes
■ Taking The Next Step

The Data Source Modules 4-1


Creating Source Modules

Creating Source Modules


OWB stores and manages the definitions for data sources in source modules. You
create a source module for each source type. You can base your sources on a
database system (Oracle or non-Oracle) or a set of operating system files. In
addition, you can create a source module for an Oracle Designer repository.
You create a source module using the New Module Wizard. Specifically, you can
create source modules for:
■ A Database Application (Oracle, Oracle Designer Repository, and non-Oracle)
■ A Flat File Application
When you create a source module, you must supply the wizard with the
application’s type (database or flat file) and the version or system type of its host.
From this information, OWB determines which one of its software integrators can
read data from the specified source.
You must also supply information that allows OWB to access data sources. OWB
accesses database sources over database links, which you must create. OWB
accesses flat files over shared directories, which you must configure.
You can update the definition of a source module at any time by editing its property
sheet.

Source Module: A place within a OWB Project that organizes and


stores definitions for relational database sources and flat files.

About OWB Software Integrators


OWB uses software integrators to read definitions and extract data from source
systems. The New Module Wizard determines the correct integrator for a specific
case from the source’s type and its host’s version or system type.

Configuring Connection Information for Database Sources


When you create a source module for a database source, you must create a database
link in the OWB repository that points to the source. OWB uses the link to access the
source’s data dictionary.
You can create a database link by selecting the link name from the drop down menu
and verifying the link owner, user name and connect string. You can also use the
New Database Link dialog to create a new database link. The New Database Link

4-2 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

dialog can be accessed from the wizard’s Connection Information page. Database
links raise security issues and database administrators usually prefer to create and
control them manually.
The following examples show you how to create database links for Oracle and
non-Oracle systems.

Check only for a


non-Oracle system

The Data Source Modules 4-3


Creating Source Modules

Using The New Database Link Dialog


When you create a new database link, you must specify a name for the link,
connection information, and a user name and password for the database system.
You can specify the connection information as a connect string or specify individual
values for a connect string’s parameters.

Parameter Description
DB Link Name A database link name can be a maximum of 128 bytes and
can include periods (.) and the "at" sign (@).
SQL*Net Connect String A connect string for the database system.
Non-Oracle Database:
If the system is a non-Oracle system, specify this by including
’(HS=OK)’ within the connect_data clause.
Host Name Information Alternate specification of values for database link parameters
Host Name Alias for the IP address of the host machine.
Port Number Configured port for the Oracle Listener.
Oracle SID SID for an Oracle Instance or an Oracle Transparent Gateway.
Heterogeneous Services Check only if the link points to a non-Oracle database system.
This includes systems accessed via ODBC, OLE DB or an
Oracle Transparent Gateway.
User Name & Password User name and password for the database system. Case
sensitive names and passwords need to be double-quoted.

For more information on database links and connect strings, see Oracle8i/9i
Distributed Database Systems Release 2 (8.1.7) and Oracle8i/9i SQL Reference Release 2
(8.1.7).

Non-Oracle Database Systems:


■ If you specify an SQL*Net connect string, it must include
’(HS=OK)’ within its connect_data clause.
■ If you specify values for individual connect string parameters,
check the box labeled "Use for heterogeneous services."

After you create a database link, you can edit the link information in a module
property sheet. These sheets differ according to whether the source is based on an

4-4 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

Oracle or non-Oracle system. To access this sheet, see the discussion in "Update a
Source Definition" on page 4-26.
After you create and test a database link, OWB stores the link’s properties in its
repository. It then displays a Connection information window in which you can edit
your Schema, select a different database link or define a new one, and select a
source from which you can import your metadata.

A database link does not have a property sheet of its own, but you can display a
link’s properties by opening the property sheet of a source module that references
the link. Also, you must add a schema using the Change Schema button. For
information on opening a source module’s property sheet, see "Update a Source
Definition" on page 4-26.
The Connections Finish window for a source module contains information about
the source module and the database link, and the information about a link that
references an Oracle system differs slightly from one that points to a non-Oracle
system.

The Data Source Modules 4-5


Creating Source Modules

Creating A Database Link Pointing to an Oracle System


The Connections window for a source module contains the following information
about a database link:
■ Owner
■ User name to access the application
■ Name of SQL*Net connect string
If individual parameter values were specified instead of the name of a connect
string, then those values would be displayed.
The remaining information pertains to the source module that uses the link.

Creating A Link Pointing to an IBM DB2 System


When the database link points to a heterogeneous services agent, the property sheet
contains an additional box that describes the specific gateway agent. Specifically,
the sheet contains:
■ Name
■ User name to access the application
■ Name of SQL*Net connect string
■ Gateway type
If the name of a connect string was specified when the link was created, the
name of the link would be displayed instead of the individual parameter values
(DB2appnc).

Warning: The init<sid>.ora parameter OPEN_LINKS of an Oracle


database determines the number of simultaneously open links
during a session. If the value is too small, the Oracle8i/9i instance
returns an ORA-2020 error.

Table 4–1 summarizes application types and their corresponding integrators.

Table 4–1 Applications and Corresponding Software Integrators


Type of Source Application Version or
Application System Type Integrator Reason For Use

Oracle Database Oracle Database 7.3, 8.0, OWB Integrator for Use to access an
8i, 9i Oracle DB & Apps 2.0 Oracle database

4-6 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

Table 4–1 Applications and Corresponding Software Integrators (Cont.)


Type of Source Application Version or
Application System Type Integrator Reason For Use

Non-Oracle Oracle Generic Gateway OWB Integrator for Use to access a


Database Connectivity Oracle DB & Apps 2.0 non-Oracle database

Flat File System Generic File System OWB Integrator for Use to access flat files
Flat Files

Creating A Source Module for Database Definitions


This section describes how to create a source module that connects with an
application based on a database system. You can configure a module for an Oracle
system, a non-Oracle database, or an Oracle Designer repository. The discussion
shows how to implement these alternative configurations.
To create the source module:
1. Select MODULES > Create Module from the OWB Console menu or right-click
MODULES and select Create Module from the popup menu.

OWB returns the welcome page for the New Module Wizard.

2. Click Next.
The wizard returns the Name page.

The Data Source Modules 4-7


Creating Source Modules

On the Name page, enter:


■ Name of the module
■ Status of the module
Specify the module as Development, Quality Assurance, or Production.
This specification is for descriptive purposes only.
■ Module Type
Modules can be Data Sources or Warehouse Targets.
– Data Source modules contain definitions of data sources.
– Warehouse Target modules contain a wide variety of definitions such as
definitions for warehouse objects, mappings, transformation
operations, PL/SQL packages, configuration parameters, and a set of
generated scripts.
■ Description
Provide information into the appropriate locations in the wizard.

4-8 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

3. Click Next.
The wizard returns the Data Source Information page. This page contains three
down-arrow lists:
■ Application Type
■ An Application Version or System Type
■ Oracle OWB Integrator
You select the Application Type and the Application Version or System Type,
and the wizard determines the correct software integrator.

Application Type

Application Version
or System Type

The wizard selects


the corresponding
Oracle Integrator

Non-Oracle Database: Select Oracle Generic Gateway Connectivity for the


Database Version.

4. Click Next.
The wizard returns the Connections Information page. Use this page to specify:
■ A source as an Oracle Data Dictionary or an Oracle Designer Repository
■ A database link
■ The schema owner’s name
Click New DB Link to create the link if it not does not exist in the OWB
repository (see the discussion of database links in "Configuring Connection
Information for Database Sources" on page 4-2).

The Data Source Modules 4-9


Creating Source Modules

5. Select the name of the database link from the down-arrow list.
The wizard returns the link information and the name of the schema’s owner.

6. To change schema owner’s name, click Change Schema. The wizard returns a
list of users.

4-10 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

7. Select a schema and then click OK.


The wizard updates the schema owner’s name in the Connections Page.
8. Click Next.
The wizard returns its Finish page. This page summarizes the information you
entered on each of the wizard pages. Verify the information.
9. Click Finish.
The wizard creates the source module and inserts its name into the project
navigation tree.

Updating A Source Module Definition


You can update the definition of a source module by editing its property sheet. The
property sheet for a module (Figure 4–1) contains three tabs:
■ Name
Describes the module’s usage (Data Source or Warehouse Target) and function.
■ Data Source
Describes the Application Type, Application Version or System Type, and the
Oracle OWB Integrator used to access the source.
■ Connection
Describes the configured connection.
You can edit active entries in the sheet which include the connection information.

The Data Source Modules 4-11


Creating Source Modules

To display the property sheet for a source module, fully expand the navigation tree
for the warehouse project, select the module’s name, and then click the Property
icon in the console toolbar.

Figure 4–1 Property Sheet for a Source Module

Creating A Source Module for an Oracle Designer Repository


You can create a source module that connects with an Oracle Designer repository.
When the definitions for an application are stored and managed in an Oracle
Designer repository, you can reduce the amount of time you need to connect with
the application itself.

4-12 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

A single property on the New Module Wizard’s Connections page determines


whether a module can import definitions from an Oracle Database or from an
Oracle Designer Repository.

Check for a
Designer
Repository.

Check the button and select a database link that connects with the host where the
Oracle Designer Repository resides. Otherwise, create the source module using the
procedure described for the previous example.

Creating A Source Module for Flat Files


A project may need to extract data from flat files. The following section describes
how to create a source module for a flat file source.
Before you can create the source module, the files must reside in a directory that is
visible to the machine that hosts the OWB client. The files must be local to the host
machine or mounted on the machine. For additional information on the
infrastructure requirements, see the discussion in "Flat File Sources" on page 4-52.
To create the source module
1. Fully expand the navigation tree for the warehouse project
2. Select MODULES > Create Module from the OWB Console menu or right-click
MODULES and select Create Module from the popup menu.
OWB returns the Welcome page for the New Module Wizard.
3. Click Next.
The wizard returns the Name page.

The Data Source Modules 4-13


Creating Source Modules

On this page, you enter:


■ Module name:
■ Module status:
■ Module type:
■ Description
This information is described in greater detail on page 4-7.
4. Enter the requested information and click Next.
The wizard returns the Data Source Information page.

4-14 Oracle Warehouse Builder 3i User’s Guide


Creating Source Modules

This page contains three down-arrow lists that requests:


■ Application Type
■ An Application Version or System Type
■ Oracle OWB Integrator
When you select the Application Type as Generic File Based Application, the
wizard determines the remaining two selections.
The Oracle Warehouse Builder integrator for flat files reads files that have
fixed-length or delimited single record formats. Fixed-length files can contain
logical records that have multiple physical records. Multiple record types can be
classified in either fixed-length or delimited files.
5. Click Next.
The wizard returns the Connection Information page.

This page contains two text boxes, Drive and Directory. Use these text boxes to
specify the full path name of the source directory.
To specify the source directory:
a. Enter the name of the drive that contains the source directory. This drive
must be mapped to the workstation that hosts the OWB client.
b. Click Browse.
The wizard returns the Flat File Directory Chooser panel which displays a
navigation tree for the drive specified in the first text box.
c. Select the name of the directory that contains the flat file and click OK.
The wizard inserts the directory name in the Directory text box.
d. Click Next.

The Data Source Modules 4-15


Importing Definitions From Database Sources

The wizard returns the Finish page which summarizes the information you
entered. Verify this information before you proceed.
e. Click Finish.
The wizard creates the flat file module and inserts its name in the navigation
tree for the warehouse project. To verify this, expand the Project navigation tree.
The module’s name now occurs in the MODULES branch.

Updating A Flat File Source Module


Each definition stored in a OWB repository has an associated Property Sheet, and
you can update the definition by editing this property sheet. To display the property
sheet for a module, right-click the module’s name and then select Properties. OWB
returns the module’s property sheet. For additional information on property sheets
for source modules, see the discussion in "Updating A Source Module Definition"
on page 4-11.

Importing Definitions From Database Sources


This describes how to import definitions from a database application and store
them in a source module. You follow this same procedure to import definitions
from an Oracle Designer repository or a non-Oracle database. The only difference is
the configuration of their respective source modules.
You can also reconcile your data definitions after changing your repository without
having to delete and re-import all your definitions.

4-16 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

Figure 4–2 An Example Database Application

The diagram in Figure 4–2 was generated using the Source Module Editor. After
importing definitions into a source module, you can display and print this diagram
using the Source Module Editor. To call this editor, fully expand the Project
navigation tree and double-click the module’s name.

Importing Definitions from an Oracle Database


You use the Import Metadata Wizard to Import metadata from an Oracle database
The following procedures describe this task.
To import definitions from an Oracle database application:
1. Fully expand the navigation tree for the warehouse project.
2. Select the source module to which you want to import metadata.
3. Right-click <Module> > Import …
OWB returns the welcome page for the Import Metadata Wizard.

The Data Source Modules 4-17


Importing Definitions From Database Sources

4. Click Next.
The wizard returns the Filter Information page.

Use this page to limit the search of the source’s data dictionary. You can limit a
search to:
■ Tables, views, sequences, or PL/SQL procedures or packages
■ Search pattern (for example, a warehouse project name followed by a %)
■ Maximum number of objects
Check the boxes for target objects; enter a search name, and set a max value.
5. Click Next.
OWB connects with the source over a database link, reads its data dictionary,
retrieves the list of names that meet the search condition, and then returns the
Object Selection page.

4-18 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

The Object Selection page


contains an Available Objects box
that includes a navigation tree
and a Selected Objects box that is
blank.
To import definitions, expand the
navigation tree and then use the
arrow keys to move the names
from the Available to the Selected
box.
If you are re-importing definitions, any previously imported objects appear in
bold face.
You can move a few or all of the names from the Available to the Selected
Objects box:
a. To move all the names, click the double-arrow icon.
b. To move all names for objects of a specific type, select the name of the type
and click the arrow icon.
c. To move one name, select the name and click the arrow.
d. To move one name and the names of objects it references, select the name
and check One Level.
e. To move a single name and names of the objects it references directly or
indirectly, select its name and check All Levels.
Verify the names in the selected list.
6. Click Next.

The Data Source Modules 4-19


Importing Definitions From Database Sources

The wizard returns the


Summary and Import page.
This page summarizes your
selections in a spreadsheet
listing the name, type of
object, and the action that
was performed on the data:
whether it was reconciled
or created. Verify the
contents of this page and
add descriptions for each of
the objects.
7. Click Finish.
OWB stores the definitions
in the warehouse module
and inserts their names in the module’s navigation tree.

4-20 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

Re-Importing Definitions from an Oracle Database


Re-importing your source database definitions enables you bring in changes added
to the source since your original import. You do not have to remove the original
definitions from the repository. You are also given advanced options that allow you
to preserve some of the changes you have made to the objects since the original
import. This includes any new objects, foreign keys, relationships, and descriptions
you may have created.
To Re-Import Definitions:
1. Select a module.
2. Select Import... from the Project menu or from the right-click menu.
The Import Metadata Wizard opens and the Welcome page displays.
3. Click Next.
The Filter Information page displays. Use this page to select the object types
you want to import. You must select the same settings used in the original
import to insure that the same objects are re-imported for reconciliation.

The Data Source Modules 4-21


Importing Definitions From Database Sources

4. Click Next.
The Object Selection page displays. The objects that were originally imported
display in bold text. Use the arrow buttons to select the objects that you
originally imported.

Objects
Already
Exist in the
Repository

5. Click Next.

4-22 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

The Summary and Import page displays. The action ’Reconcile’ is displayed for
the objects you are re-importing.

Note: It is possible that a new object has been created in the


source that is related to an object you are re-importing. If that is the
case, the wizard requires that you import the object(s) at the same
time. The action ’Create’ displays for those objects.

6. Select Advanced Reconcile Options... to select from a set of advanced


reconciliation options.

The Data Source Modules 4-23


Importing Definitions From Database Sources

The Advanced Reconcile Options dialog displays.

There are three options:


■ Preserve repository added constraints
■ Preserve existing descriptions
■ Preserve repository added columns

Note: By default, all options are checked. Uncheck if you want


these repository objects replaced instead of preserved.

After selecting your options, click OK.


7. Click Finish.
OWB reconciles and creates objects as directed. When this is complete, an
Import Results report displays.

4-24 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

This report gives details about the actions performed by OWB for each
component of each object.
There are two additional features available to you:
■ Save–Click Save to save the report. Make sure to use a naming convention
that is specific to the re-import.
■ Undo–Click Undo to undo all changes to your OWB repository.
8. Click OK if you want to proceed.

Updating Oracle Database Source Definitions


You can update source definitions, diagram individual definitions and their
references, and print the diagrams using the Source Module Editor. To call this
editor, fully expand the Project navigation tree and double-click the module’s name.

The Data Source Modules 4-25


Importing Definitions From Database Sources

Update a Source Definition You can update a source definition by editing entries in its
Property Sheet. To display a definition’s property sheet, select its name in the
navigation tree and then select Properties from the pop-up list.

To update an existing entry, select the entry and enter the new information. Some
entries have down-arrow lists that limit the range of selections. For example, when

4-26 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions From Database Sources

you change the data type of a column, you must select an entry from a down-arrow
list. You can also add new entries or remove existing ones.

Update the Connection You can update the connection information for a data source
by changing its link (click the down-arrow and select from the drop-down list).

When you change the connection information, OWB returns a warning message
that you may compromise the existing definitions in the source module. To change
the connection, click OK.

Diagram a Source Definition You can display a diagram for a definition and its
references using the Source Module Editor. To display a diagram for a definition,
select its name in the navigation tree and then select Edit from the pop-up list. The
Source Module Editor displays a diagram of the definition.

The Data Source Modules 4-27


Creating Definitions for Flat File Sources

Toolbar

Each object in the diagram has a toolbar which you can use to sort the column
names. The toolbar is divided into three rectangles: to sort the column names click
one of the rectangles:
■ Left rectangle determines the position and order of the primary key columns.
■ Middle rectangle sorts all the column names.
■ Right rectangle determines the position and order of foreign key columns.
The sort order is only for display purposes and has no bearing on the ordering of
column names within the definition.

Print a Source Definition To print a diagram of a source definition, display the


diagram and then click the Print icon on the editor’s toolbar.

Creating Definitions for Flat File Sources


This section shows you how to create a format definition for a flat file using the Flat
File Sample Wizard. Using the wizard you can:
■ Create format definitions for delimited and fixed-length files
■ Create format definitions for logical records within a fixed-length file that
consists of one or more physical records within a file
■ Identify and create format definitions for multiple record types within a file
After you create and store a format definition, you can use it to describe other flat
files that have the same properties.

4-28 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Using The Flat File Sample Wizard


When you create a format definition, the Flat File Sample Wizard opens the file,
returns a sample of data, and requests detailed information about the file’s format.
The Flat File Sample Wizard is structured as shown in Table 4-4.

Table 4–2 Flat File Sample Wizard Pages


Page Name Information Required
Setup File format: Fixed-length or delimited
Field delimiter and enclosure characters for delimited format
Terminator or physical record length for fixed-length format
Character set
Record Organization Single or multiple record types
Number of rows to sample and rows to skip before sampling
Logical record definition (only available for fixed-length files that
have a single record type)
Record Types Column positions specifying the record type
(only appears for
Name of each record type
multiple record types)
Column Definition Width of each column in a fixed-length file
(only appears for
fixed-length files)
Properties Name, type, mask, NULLIF/DEFAULTIF, field length
Header row

Character set: OWB’s default NLS character set is the same as its host. If it differs
from the source file’s character set, the data sample might be unintelligible. You can
direct OWB to display the data sample in the source’s native character set by using
the down-arrow selection list. For complete information on NLS character sets, see
the Oracle8i/9i National Language Support Guide Release 2 (8.1.6).
Physical record length: The length of a fixed-format record can be specified as
length in bytes or set to use the operating system terminator. The length
specification results in greater efficiency.
Logical records: OWB can manage a source file whose logical record consists of
multiple physical records. In this case, the number of physical records can be fixed
or vary. If fixed, you must specify the number of physical records per logical record;
otherwise, you must specify a continuation character at the end or beginning of

The Data Source Modules 4-29


Creating Definitions for Flat File Sources

each physical record within a logical record. See the example in "Specifying Logical
Records" on page 4-41.
Multiple record types: The Flat File Wizard can interpret a source file which
contains a variety of record types. You must specify the column within the source
file that contains unique record types. You then scan the column to identify unique
record type values, then define the characteristics of that record type. The record
types can be renamed to be more meaningful.
Field type: Describes the data type of the field for the SQL*Loader. OWB supports
the following set of portable data types:
■ CHAR
■ DATE
■ DECIMAL EXTERNAL
■ FLOAT EXTERNAL
■ INTEGER EXTERNAL
■ ZONED EXTERNAL
The native numeric data is a number in character form: it is not a binary
representation. Thus, the numeric data types are identical to CHAR except for their
behavior with respect to the DEFAULTIF and NULLIF constraints. See discussion
below on field constraints.
You can represent FLOAT EXTERNAL data either in scientific or regular notation. The
representations "5.33" and "533E-2" are both valid.
For complete information on SQL*Loader field and data types, refer to the
Oracle8i/9i Utilities Guide, Release 2 (8.1.6).
Field mask: The SQL*Loader uses "dd-mon-yy" as its default date mask. You can
override this default by entering a valid date mask when you describe the file. For
example, should the input data have the format "DD-Mon-YYYY" rather than the
SQL*Loader default, you can enter the true format as a mask.
NULLIF/DEFAULTIF conditions: You can override the default action of the
SQL*Loader by placing a DEFAULTIF or NULLIF condition on a field.

■ When a numeric or DATE field contains all blanks, SQL*Loader rejects the entire
record. To override this action, include a DEFAULTIF = BLANKS condition on the
field. When SQL*Loader evaluates this condition, it sets the field to zeros and
loads the record.

4-30 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

■ When a character field contains all blanks, you can direct SQL*Loader to mark
the column as null rather than storing the blanks by including a NULLIF =
BLANKS condition on the field.
When you describe the field using the Flat File Sample Wizard, you can optionally
choose one of these constraints.

Creating a Definition for a Fixed-Length File


The following procedure describes how to create a definition for a file using the
Import Metadata and Flat File Sample Wizards. Each logical record of this file
consists of a single physical record. The location of the file was configured in the
warehouse source module.
To create a definition for a flat file format:
1. Select GCCFILES > Import …
OWB returns the welcome page for the Import
Metadata Wizard.
2. Click Next.
The wizard returns the Filter Information page. Use
this page to filter file names.
3. Click Next.
The wizard returns the Object Selection page. This page displays two window
panes: Available and Selected Objects.

4. Move the name of the file to be described from the Available to the Selected
Objects window pane.
5. Click Next.

The Data Source Modules 4-31


Creating Definitions for Flat File Sources

The wizard returns the Summary and Import page. The left-most column of this
page contains a status ball which can be red or green. If green, then OWB
already has a definition of the file’s format—proceed to step 7; if red, then you
must create a format for the file using the Flat File Sample Wizard.
6. Create a format:
■ Select a file that has a red status ball.
■ Click the Sample button at the bottom of the Summary and Import page.
■ The wizard returns the welcome page for the Flat File Sample Wizard.
■ Click Next.
The wizard opens the file, reads a sample of data, and returns the File Setup
page. This page displays the sample of data in a template with a few initial
values set for the file’s global properties.
■ Verify and select the global properties:
* File format: Fixed Length
* Record ends at: <CR> by default.
* Record size can be specified by length
* NLS Character set: WE8MSWIN1252

4-32 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Note: If OWB’s character set differs from the source’s, the sample
might not be readable. If so, select the source’s character set from
the down-arrow list and OWB translates the sample.

■ Click Next.
The wizard returns the Record Organization page. Use this page to specify
whether the file contains single or multiple record types, or if it requires a
logical record structure. You may also select how many rows of the file to
sample.

■ Click Next.
The wizard returns the Column Definition page. Use this page to specify
the column widths.

The Data Source Modules 4-33


Creating Definitions for Flat File Sources

Define a column using one of two methods:


– Locate where the column ends in the sample and click that position on
the ruler. The wizard returns a red tick mark on top of the ruler and
marks the boundary with a red line.
– Specify the column width in the Field Widths space.
If you make a mistake, double-click the tick mark and the wizard erases the
boundary marker.
Use the vertical and horizontal scroll bars to navigate.
■ Click Next.
The wizard returns the Properties page. This page describes each field of
the logical record just as you marked it off in the previous step.
■ Use the Properties page to completely describe each of the logical record’s
fields.
– Name can be changed to reflect a more useful field name.
If your flat file supplies or con-
tains field names, select the check
box Use the first record as the
field names to automatically transfer header information.

4-34 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

– Type describes the source to SQL*Loader. To


specify type, click the field’s data type and select a
type from the drop-down list.
– Mask overrides the default for DATE formats. See
discussion on page 4-28.
– NULLIF or DEFAULTIF overrides the default
SQL*Loader behavior for fields that contain all blanks. Specify
DEFAULTIF or NULLIF and OWB generates a corresponding
DEFAULTIF=BLANKS or NULLIF=BLANKS condition. See discussion on
page 4-28.
– Length specifies the length of the field.
For more background information on these fields as well as the names of a
few reference materials, see the discussion on page 4-28.
■ Click Next.
OWB returns the Summary page. Verify that the definition is correct. If not,
click the Back button to navigate the wizard pages.
■ Click Finish.
OWB exits the Flat File Sample Wizard and returns to the Summary and
Object page of the Import Object Wizard.
The Summary and Object page has been updated:
■ The status ball is green.
■ The File Structure Name column now has an entry (product_fix).

If you call this wizard at a later time with a file that has the same format as the
one you have just set, then you can select this entry from the Same As field
(fourth column) instead of creating a new definition with the Flat File Sample
Wizard.
7. Click Finish.

The Data Source Modules 4-35


Creating Definitions for Flat File Sources

OWB creates a definition for file, stores the definition in the source module ,
and inserts the format’s name in the source module’s navigation tree.

Using The Source Module Editor


The source module now contains a definition for a format.
To display the contents of this source module,
double-click its name in the Project navigation
tree. OWB returns a window for the Source
Module Editor. Fully expand the navigation tree
to view its contents.

Defining Multiple Records in a Fixed-Length File


You may have a variety of different record types within a file which can be defined
and formatted using the Flat File Wizard.
To define multiple record types, do the following:
1. Call the Import Metadata Wizard, select a file to describe, and then click
Sample to call the Flat File Sample Wizard (Steps 1 - 5 on page 4-31).
The wizard returns the welcome page for the Flat File Sample Wizard.
2. Click Next.
The wizard returns the Setup page.
3. Select Fixed Length records.
4. Select a way to specify where each fixed-length record ends.
■ If you select Records end at, specify the code that terminated each record.
■ If you select Record length (characters), specify the number of characters in
each record.
5. Optionally select a different character set.
6. Click Next.
The wizard returns the Record Organization page.
7. Select Multiple record types and specify the number of rows to sample.
Optionally specify the number of rows to skip before sampling.
8. Click Next.
The wizard returns the Record Types page.

4-36 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

9. Identify the column or columns that identify the record type in the file by using
the Record Type begins at position field and the And ends at position field.
In the following example, the first column defines the record type, so the first
column begins in position 0 and ends in position 1.

10. Click Scan for Record Type Values.


A list of distinct type values appears with the default record names RECORD_1,
RECORD_2, and so on. You can edit the record names, select a different record
name for any type value, and add or delete type values.
11. Click Next.
The wizard returns the Column Definition page.
12. Select a record name and use the ruler to specify the length of a field, or specify
the field length in numbers in Field Widths. The Field Width settings you define
refer to the positions that contain the record type value.
When you have adjusted the information for each column, either select another
record name and define its columns or click Next to go to the Properties page.

The Data Source Modules 4-37


Creating Definitions for Flat File Sources

You now need to define the data characteristics for each field, and adjust
masking and constraints.
13. Adjust the data type, mask, and constraints (NULLIF, DEFAULTIF) as needed for
each record type.
14. Click Next.
The wizard returns the Summary page.
15. The Summary panel shows what is to be imported by the wizard.

The source module now contains a definition for the MEmpascii_dat file format and
within it, definitions for the individual records.

4-38 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Updating a Fixed-Length File Definition


You can update the definition of the file format by editing its property sheet.
To update a single-record fixed-length definition:
1. Select the file definition in the navigation tree.
2. Right-click <file name> > properties.
OWB returns the definition’s property sheet (General tab). You can edit the
name and description of the definition. You can also change the global
properties ascribed to the file: the physical record size and the number of
physical records per logical record.
3. Select Structure.
OWB returns the definition’s Structure sheet.

Using this sheet, you can:


■ Edit a field name, data type, mask, constraint, and description
■ Add a field mask
■ Add a NULLIF condition
■ Add a DEFAULTIF condition
■ Add or delete a field
The tabular format of this sheet is useful when you map a field from a data
source to a target column.

The Data Source Modules 4-39


Creating Definitions for Flat File Sources

4. After completing your changes, click OK.

Updating a Multiple-Record Fixed-Length Definition


You can update the record definitions within a multiple record file format by
editing its property sheet. To display the property sheet for a format:
1. Select <file name> > Properties.
OWB returns the definition’s property sheet (General tab). You can edit the
name and description of the definition. You can also change the global
properties ascribed to the file: the physical record size and the number of
physical records per logical record.

2. Select Record.
OWB returns the definition’s Record sheet. You can edit the record type
information, for example, you can delete a record type or add a new one.
3. Select Structure.
OWB returns the definition’s Structure sheet.
Using this sheet, you can:
■ Select a record type from the Record Name drop-down list
■ Edit a field name, data type, mask, constraint, and description
■ Add a field mask
■ Add a NULLIF condition
■ Add a DEFAULTIF condition
■ Add or delete a field
The tabular format of this sheet is useful when you map a field from a data
source to a target column.
4. After completing your changes, click OK.

4-40 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Specifying Logical Records


When the logical record for a source file contains multiple physical records, you
must specify that the logical record contains multiple physical records and describe
the assembly method. Only fixed-length files with a single record type can have
logical records that contain multiple physical records.
To describe multiple physical records:
1. Call the Import Metadata Wizard, select a file to describe, and then click
Sample to call the Flat File Sample Wizard (Steps 1 - 5 on page 4-31).
The wizard returns the welcome page for the Flat File Sample wizard.
2. Click Next.
The wizard returns the Setup page. Use this page to define the file’s global
properties. Also, note that the sample of data in the lower panel: some fields
have ’@’ as their final character while others do not.
3. Check the Fixed Length button and complete the other selections as required.
4. Click Next.
The wizard returns the Record Organization page.
5. Select the button that describes how the logical record is assembled:
■ Fixed number of physical records per logical record.
■ Variable number of physical records with a continuation character at the
end of each physical record that signifies the record belongs with the next
physical record (@).
■ Variable number of physical records with a continuation character at the
beginning of each physical record that signifies the record belongs with the
previous physical record.
The wizard updates the display of the logical record in the lower panel to reflect
your selection. The default selection is one physical record per logical record.
6. You can now define the breaks for each field, click Next, and complete the
definition for the format.

Creating a Definition for a Delimited File


The following procedure describes how to create a definition for a file using the
Import Metadata and Flat File Sample Wizards. The fields in this file are delimited

The Data Source Modules 4-41


Creating Definitions for Flat File Sources

by a comma and enclosed with double quotes. The location of the file was
configured in a warehouse source module.
The task begins by calling the Import Metadata Wizard from the navigation tree for
the active project.
To create a definition for a delimited file format:
1. Select the warehouse module
2. Right-click <Module Name> > Import …
OWB returns the welcome page for the Import Metadata Wizard.
3. Click Next.
The wizard returns the Filter Information page which you can use to filter the
file names.
4. Click Next.
The wizard returns the Object Selection page. This page displays two window
panes: Available and Selected Objects. The Available pane displays the tree of
the directory configured for the source module; the other pane is empty.
5. Move the file’s name from the Available to the Selected Objects pane using the
single arrow key.
6. Click Next.
The wizard returns the Summary and Import page. The left-most column of this
page contains a status ball that can be red or green: if green, then OWB already
has a definition of the file’s format; otherwise, you must create a definition for
the file using the Flat File Sample Wizard.

The ball in the present case is red and you cannot describe the file with the
format, so you must create a definition for this file’s format.
To create a format:
a. Click the Sample button at the bottom of the page.
The wizard returns the welcome page for the Flat File Sample Wizard.

4-42 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

b. Click Next.
The wizard opens the file, reads a sample of data, and returns the Setup
page. This page displays a sample of data in a template with a few initial
values set for the file’s global properties.
■ The Field Delimiter default is the comma (,).
■ The Enclosures defaults are double quotation marks (") for both the left and
right enclosures.
c. Verify and select the file format (Delimited) and an NLS character set. See
the discussion on NLS character sets on page 4-29.
Use the text box for the left and right enclosure characters to exclude these
characters from the data. You can enter an enclosure character in the text
box or select one from the drop-down list.
d. Click Next.
The wizard returns the Record Organization page.
e. Specify single record type and the number of rows to sample. (You cannot
enable logical record support for a delimited format file.) For a file that has
multiple record types, see "Defining Multiple Record Types in a Delimited
File" on page 4-44.
f. Click Next.
The wizard returns the Properties page. Use this page to completely
describe each field.
See the detailed discussion for each field property in Step n on page 4-34.
Note: In this example, the first record represents the field names.
g. Click Next.
The wizard returns the Summary page. Verify that the format definition is
correct; if not, navigate the wizard pages by clicking the Back button and
correct the definition.
h. Click Finish.
The Flat File Sample Wizard exists and then returns to the Summary and
Object page of the Import Object Wizard.
The Summary and Object page has been updated: its status ball is now green
and the File Structure Name column now has an entry (channel_csv).

The Data Source Modules 4-43


Creating Definitions for Flat File Sources

You can call this wizard at a later time and use the channel_csv format to
describe any flat that has the properties described by this format. Instead of
sampling the new file you can select this format from the Same As field.
7. Click Finish.
OWB creates a definition for file, stores it in the source module, and inserts its
name in the source module’s navigation tree.
To display the navigation tree for the source module, double-click the module’s
name in the Project tree.

OWB returns the Source Module Editor. Fully expand the editor’s tree and look
under the FILES branch.

Defining Multiple Record Types in a Delimited File


When a flat file contains several different types of records within it, you can use the
scanning feature within the Flat File Sampling Wizard to search and label record
types.
To associate multiple record types within a flat file, do the following:
1. Call the Import Metadata Wizard, select a file to describe, and then click
Sample to call the Flat File Sample Wizard (Steps 1 - 5 on page 4-31).
The wizard returns the welcome page for the Flat File Sample Wizard.
2. Click Next.
The wizard returns the Setup page. Use this page to define the file’s global
properties such as whether records are delimited by a character or space.
3. Click Next.

4-44 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Define whether the file contains single or multiple record types.


.

4. Click Next.
Selecting multiple record types brings up the Record Types page:

5. You should now identify the column that contains definitive unique record
information. For delimited files, the program assumes the column to scan is the
first column of the record unless you specify a different column. Click Scan for
Record Type Values: all unique values appear.
Records identified are named RECORD_1, RECORD_2, and so on, but you can
rename them to more meaningful names by simply typing the new name in the
field. For example, change E’s record name to employee and P’s record name to
payroll, as shown in the following figure.

The Data Source Modules 4-45


Creating Definitions for Flat File Sources

When you select a record type in the list, the lower panel shows data only for
that record type.
6. Click Next.
The wizard returns the Properties page:
7. For each record type, select its record name and adjust the data types, mask,
and constraint information.
See the detailed discussion for each field property on page 4-34.
8. Select the remaining record type and adjust the date types and other
information for that record type. When you have the record type definition in
the proper structure, select Next.
The Wizard processes your records.
9. The Summary presents all record information to be imported.

10. Click Finish to import the file or click Back to return to a previous page to make
further changes.

4-46 Oracle Warehouse Builder 3i User’s Guide


Creating Definitions for Flat File Sources

Updating a Delimited File Definition


You can update the definition of the file format by editing its property sheet.

Updating a Single-Record Delimited File Definition


To display the property sheet for the flat file named channel_csv:
Right-click <file name> > Properties
OWB returns the definition’s property sheet (General tab). You can edit the name
and description of the definition. You can also change the global properties ascribed
to the file: the delimit and enclosure characters. This information, now at your
finger tips, is quite useful when you create definitions for the mapping and
transformation operations.

Updating a Multiple-Record Delimited File Definition


You can update the record definitions within a multiple-record file format by
editing its property sheet. To display the property sheet for a format:
1. Right-click <file name> > Properties.
OWB returns the definition’s property sheet (General tab). You can edit the
name and description of the definition. You can also change the global
properties ascribed to the file: the physical record size and the number of
physical records per logical record.

2. Select Record.

The Data Source Modules 4-47


Creating Definitions for Flat File Sources

OWB returns the definition’s Record sheet. You can edit the record type
information, for example, you can delete a record type or add a new one.
3. Select Structure.

Using this sheet, you can:


■ Select a record type from the Record Name drop-down list
■ Edit a field name, data type, mask, constraint, and description
■ Add a field mask
■ Add a NULLIF condition
■ Add a DEFAULTIF condition
■ Add or delete a field
The tabular format of this sheet is useful when you map a field from a data
source to a target column.
4. Click OK.

4-48 Oracle Warehouse Builder 3i User’s Guide


Importing Definitions for Pure Extract and Pure Integrate

Importing Definitions for Pure Extract and Pure Integrate


You can import definitions that describe source data that can be extracted using
Pure Extract and Pure Integrate. These imported definitions can then be the subject
of mappings defined within your project.
The following procedures describe how to import definitions using the Oracle
Warehouse OWB Metadata Load Utility. These definitions are imported from an
export file that was created with Pure Integrate. You can also export definitions with
Pure Extract and import them into a OWB Project.
For a complete description of how to use the Oracle Warehouse OWB Metadata
Load Utility, refer to "The OWB Metadata Loader" on page 10-2.

Importing Definitions from an Export File


You can import definitions into a Project from an export file using the OWB client or
the OWB Metadata Load Utility. This section shows you how to import definitions
using the OWB client.
The export file was created with Pure Integrate and contains information about a
Banking source.
To import the exported file:
1. Activate the OWB console and switch to the Administration environment.

2. Select Administration > MetaData Import


OWB returns the Metadata Import Confirmation Window. This window
contains two radio buttons: Commit or Rollback to previous save point.
3. Select one of the radio buttons, and then click OK.
OWB returns the Metadata Import Utility Window which requests information
about the operation:
File Names: The complete file name of the exported metadata and a log file.
Use the Browse buttons to search the host machine for the file names. OWB
reads and processes the exported metadata and writes status and diagnostic
information in the log file.
Operation: You can Replace existing definitions, Add new definitions without
replacing existing definitions, or you can Add new definitions and update
existing definitions.

The Data Source Modules 4-49


Importing Definitions for Pure Extract and Pure Integrate

Search by: select the Logical Names or Physical Names button to determine
how the Import Utility searches the repository. For a complete discussion of
how the utility operates, see "The OWB Metadata Loader" on page 10-2.
Character Set: The host machine for the OWB client determines the default
character set. Use the down-arrow list to select the character set of the exported
file if it differs from the client’s character set.

4. Click Scan for a summary of the exported file’s contents, and then click Import.
OWB reports the progress of the operation in a Progress panel, and after the
operation completes OWB returns a Metadata Import Results panel.
5. Click View Log File to verify the results of the operation.
If the Import operation was successful, you can now view the definitions imported
into the OWB repository.
You can now create definitions for mappings that reference the source module
definitions. Also, each warehouse module now contains a Pure Integrate mapping
that can be deployed as an Oracle Workflow function. For additional information on
defining dependencies among workflow functions and scheduling workflow jobs,
see "Scheduling Jobs" on page 9-2.

4-50 Oracle Warehouse Builder 3i User’s Guide


Infrastructure Requirements

Infrastructure Requirements
When a source module points to a non-Oracle system or a UNIX file, the network
infrastructure must include components that allow OWB to access the source.
When the source is a non-Oracle system, OWB uses Oracle8i/9i Heterogeneous
Services. At minimum these services must be configured, and in most cases an
Oracle Transparent Gateway agent must be installed on the source’s host.
When the source is based on UNIX flat files, OWB uses a Network File System (NFS)
connection to read the files. To implement this link, third-party software must be
installed on the OWB client and an NFS server started on the application host.
The following sections summarize these infrastructure components.

Oracle Heterogeneous Services


OWB communicates with non-Oracle systems using Oracle8i/9i Heterogeneous
Services and a complimentary agent. Heterogeneous Services makes a non-Oracle
system appear as a remote Oracle database server. The agent can be an Oracle
Transparent Gateway or the generic connectivity agent included with Oracle8i/9i.

Transparent Gateway
OWB can communicate with a non-Oracle system using a transparent gateway
agent which is a system-specific source.
For example, if a OWB source module defines an source based on a Sybase system,
then the agent is a Sybase-specific transparent gateway. You must install and
configure this agent to support the communication between the two systems.

Generic Connectivity
OWB can also communicate with a non-Oracle system using generic connectivity
provided that the non-Oracle system supports the ODBC or OLE DB protocols. In this
case, you do not need to purchase a separate transparent gateway; you can use the
generic connectivity agent included with the Oracle8i/9i database server. You must
still create and customize an initialization file for your generic connectivity agent.
Generic connectivity is intended for low-end data integration solutions and the
transfer of data is subject to the rules of specific ODBC or OLE DB drivers installed on
the client system.
For additional information on distributed processing systems, see the Oracle8i
Distributed Database Systems Release 2 (8.1.6) guide.

The Data Source Modules 4-51


Committing Your Changes

Flat File Sources


OWB can retrieve a data sample from any flat file source that is visible to its
Windows NT host. This includes files located in local and remote directories.
When the file’s directory resides on a UNIX machine, the directory must be mapped
to the OWB client’s host, and in this case you must install third-party software on
the host to support a Network File System (NFS) connection. Several of these tools
are available from third-party sources.
The general steps required to map a UNIX directory to a OWB host are similar
regardless of the third-party software:
1. Set up the UNIX host as an NFS server.
2. Declare the source directory on the UNIX machine as sharable.
3. Install the third-party NFS-software package on the OWB host.
4. Map the UNIX directory to the OWB host.
When you create a source module using the New Module Wizard, you can now
point the module to the NFS directory using the Browse button or entering the
complete path name to the directory .

Committing Your Changes


OWB does not automatically commit your additions or changes to the repository,
that is your responsibility. You can immediately commit your work or defer this
action until you exit a OWB session.
To commit your work immediately, click the Commit icon on the toolbar. OWB
returns a Commit Confirmation panel: click Yes. You can also defer this action until
you exit a OWB session. On exit, OWB always returns an Exit Confirmation panel:
click Yes to commit your work.

Note: If you generate code at any time during your Warehouse


OWB Session, Multi-User Locking feature will remain in effect until
after you commit your changes.

4-52 Oracle Warehouse Builder 3i User’s Guide


Taking The Next Step

Taking The Next Step


This chapter showed you how to create definitions for all the sources required to
populate the and how to update these definitions by editing their property sheets.
The chapter also showed you how to import definitions from an Oracle Designer
repository or a non-Oracle system, and an SAP source system.
You are now ready to create definitions that map data from the data sources to the
target schema. When you create the mapping definitions you can also create
definitions for operations that transform the source data.

The Data Source Modules 4-53


Taking The Next Step

4-54 Oracle Warehouse Builder 3i User’s Guide


5
The Source to Target Mappings

This is the first of three chapters that discuss mapping sources to targets. This
chapter describes how to create and update logical definitions that map the source
object attributes you defined in the previous two chapters to target object attributes.
The next chapter describes how to add operators and transformations to a mapping.
And the following chapter describes how to configure the mapping’s logical and
physical properties as well as describing how to reconcile mapping operators with
repository objects.
Creating a mapping with OWB involves five steps:
1. Define the mapping.
2. Add operators that reference metadata objects for query and altering of the
data.
3. Reconcile the mapping operators with the repository objects they represent.
4. Configure the mapping.
5. Generate the mapping.
In addition to creating and updating a mapping, this chapter describes the concepts
behind the Oracle Warehouse Builder Mapping Editor. This chapter includes the
following sections:
■ About Mappings
■ Defining Mappings
■ Generating the Mapping
■ Taking The Next Step

The Source to Target Mappings 5-1


About Mappings

About Mappings
You need to have an understanding of the concepts behind the OWB Mapping
Editor in order to give you the foundation you will need to build mappings. This
section introduces those concepts.
When you create a mapping, you define the Extraction, Transformation, and
Loading (ETL) operations from a data warehouse source object to a data warehouse
target object. Mappings are defined in a warehouse module and as such can be
configured, generated and deployed like other objects. The mapping and
transformation definitions all reside in the warehouse module that defines the
target objects.
.

Mapping Definition: A mapping definition formally describes a


series of operations that together pulls data from sources,
transforms that data as necessary, and loads it into target tables.

In Oracle Warehouse Builder, you define mappings using the Mapping Editor,
Property Inspector, and Expression Builder Graphical User Interfaces. The mapping
GUIs make it easy to create mapping definitions that extract and transform data and
then load it into target tables. For a description of the Mapping Editor Interface, see
"About The Mapping Editor" on page 5-8. For a description of Expression Builder,
see "About Expression Builder" on page 6-2.

About Rows
A row (or record) is the basic unit for the processing of data in any mapping. A row
has a structure and is defined by attributes, where each attribute is given a name
and datatype (such as CHAR, NUMBER, etc), and length, scale, and precision.

About Row-Sets
A row-set is defined as rows of structured data brought into or emerging from an
operator (as defined in the next section), within mapping. Any set of zero or more
rows may comprise a row-set. A mapping defines how row-sets are to be extracted
from a source (such as a table, or file), transformed and loaded into a target, (such as
a table, dimension or fact using operators. The number of rows in a row-set is
known as the cardinality of that row-set.

5-2 Oracle Warehouse Builder 3i User’s Guide


About Mappings

About Operators
An operator is a self-contained "box" that manipulates data in a mapping. An
operator defines how the input row-sets are manipulated to produce the output
row-sets and the cardinality of its input row-sets is potentially different from that of
its output row-sets.
Several operators are available in OWB, each with its own purpose for processing
row-sets. Mappings provide a unified interface that connects these different
operators that have certain properties. This helps you to visualize the logical flow of
the data from the sources to the targets and the operations you perform on the data
during the ETL process. Hence, operators are key to the Oracle Warehouse Builder
mapping paradigm.
You define and edit operators using the Mapping Editor and Property Sheets. The
Mapping Editor contains an Object Palette that visually represents the operators.
The operator types available within the Mapping Editor include:
■ Extract Operators–Mapping Table, Mapping View, Mapping Materialized View,
Mapping Sequence, Mapping Fact, Mapping Dimension, Mapping Flat File etc.
■ Load Operators–Mapping Table, Mapping Materialized View, Mapping
Dimension, Mapping Fact, etc.
■ Standard Operators–Aggregator, Pre- and Post-Mapping Processes, Filter,
Joiner, Splitter, Sorter, Deduplicator (Distinct), etc.
■ Transformations–Mapping Transformation, Expressions, Constants.
■ External Process–Pure*Integrate, Pure*Extract, custom processes.
You define and edit operators using the Mapping Editor canvas, Operator Property
inspectors, and the object palette, all of which are described in "About The Mapping
Editor" on page 5-8.

About Operator Properties


Each operator has a very generic mapping purpose, but to use them in maps you
can give them very specific instructions. You do this by altering the Operator
Properties. Each operator type has a different set of properties it supports. These
properties can exist at 3 levels:
■ Operator level– properties that effect the overall operator and what it does
■ Group level–properties that effect attributes within the group
■ Attribute level–properties that effect only the attribute or its value

The Source to Target Mappings 5-3


About Mappings

The operator properties can be viewed and altered by the operator’s Property
Inspector dialog.

About Attributes And Attribute Groups


Each operator is a self-contained “box” that can have inputs, outputs, and/or
input/outputs. These inputs and outputs are called Attributes. Each attribute is
organized within an attribute group. The group type will determine what type each
of the attributes within the group are (input, output, etc). Each type of operator
limits the types of attribute group or attribute groups it can support—for example, a
joiner operator can have only one output group.
An attribute group represents a row-set of certain cardinality. It is important to
understand that row-sets of different cardinality cannot be mixed arbitrarily. In
other words, an attribute from one output attribute group and an attribute from
another output attribute group cannot be connected to the same input attribute
group unless the two output attribute groups are of the same cardinality. For
example, the output attribute of an transform and an attribute from a source table
can be connected to the same target table if the transform derives its data from the
same source table since a transform does not change the cardinality of the input
row-set.
The names of attributes and attribute groups are logical; you can change the names
of attributes and attribute groups. They are often the same name as the attributes of
the operator that is mapped into the operator. However, it is not a requirement that
the attribute name match the input data source name. Since the operator is
self-contained and it can be remapped at any time—the attribute names are
independent of the attributes of the operator to which they are connected. This
protects any expression or use of the attribute within the operator. You can consider
an operator attribute as a placeholder for data.
Each attribute has a data type and size, precision and scale if appropriate. These
attribute items are considered properties of the attribute. Attribute Groups have
properties as well. The complete list of supported properties for Attributes and
Attribute Groups varies by operator. The values for the properties can be set and
changed by the Property Inspector.

About Display Sets


A Display Set represents graphically the attributes for a particular attribute group of
a selected operator. If an attribute group contains more than one display set, then
you can select a different display set from a list located on the View menu. You can
define display sets for an attribute group in the mapping editor, or they can be

5-4 Oracle Warehouse Builder 3i User’s Guide


About Mappings

inherited from the attribute sets of a warehouse object that are defined during the
source and target definition phase of data warehouse design. See "Creating
Attribute Sets" on page 3-29 for information on attribute sets.
You can see only one display set at a time for an attribute group. By default, the
Mapping canvas will always show the display sets with all the attributes in the
respective attribute groups. You can also edit display sets—as well as define new
display sets—within an operator using the Mapping Editor. See "Reconciling Your
Mapping" on page 5-36 for more information on editing operator attributes.
Table 5–1 describes the default attribute sets for Display Sets.
Table 5–1 The Default Attribute Sets
Attribute Set Description
All This is the default attribute set and includes all attributes.
Hierarchies… For every Dimension with hierarchies defined, the system will
automatically create for each hierarchy in the Dimension a
display set containing all the level attributes in that hierarchy
(named after the hierarchy name)."

Note, the ALL display set is read-only.

About Binding Mapping Operators


Mapping operators are independent from the repository objects to which they refer.
The process of linking a mapping operator to a repository object is known as
binding. Within the Mapping Editor are several methods of binding a mapping
operator to a repository object. Some of these methods relate to the original
creation—after either the mapping operator or the repository object has been
changed. See (Page 5-xx)
Some mapping operators describe repository object of various types. Their internal
definitions can be created from an existing repository object or, in some cases, be
used to create a repository object. The extract, load and transformations operators
fall in to this category.
Whenever you create a new extract or load operator in the Mapping Editor, you can
choose to bind it to an existing repository object or you can leave it unbound and
create the attributes yourself (Transformations are always bound). When creating
mapping operators that are derived (inbound reconciled) from repository objects
(e.g., a table, a function, a dimension, etc.), the operator's attributes and display sets
will inherit the repository object's attributes and attribute sets. You may also

The Source to Target Mappings 5-5


About Mappings

manually reconcile (outbound) created mapping objects to create repository objects.


Any mapping object whose attributes and attribute sets have been reconciled with a
repository object’s attributes is referred to as being bound to that repository object.
Bound operators represent actual tables, functions, or procedures via their reference
to a repository object. The repository object is the primary definition and all of the
OWB import, generation, and deployment tools can be used to maintain the
integrity of the definition. Editing of bound operators is limited to changing the
logical name and adding new attributes (which can be outbound reconciled to
update the repository object definition). Deleting a bound operator has no effect on
the repository object.
If you choose to leave the operator unbound, it will generate code but that code will
have no repository object upon which to affect. You need to bind the mapping
operator to a repository object in order for the code to affect the repository object.
Once you bind a mapping object to a repository object, it cannot be unbound. See
"Reconciling Your Mapping" on page 5-36 for more information on reconciling
mapping operators with repository objects.

About Mapping Operator Names


All names visible in the mapping editor diagram are logical names irrespective of
the user preference settings described in chapter two. You use them as descriptors
of the repository objects they represent, and you can edit them.
For those components that refer to repository objects, the Bound Name property is
used to specify the name used for code generation. If a mapping operator or
attribute is currently bound ( and has been reconciled), the repository object is
considered to be the primary definition and all edits to the physical (bound) name
must be done on it. The bound name of the mapping object will be read only. On the
other hand, if an object or attribute is not yet bound, you may edit the bound name
within the mapping environment in preparation for eventual reconciliation to a
repository object.

About Reconciliation
The loose coupling of mapping operators to repository objects is one of the key
mapping concepts in Warehouse Builder. It gives you the flexibility to evolve
mappings and repository objects independently. Only when you are satisfied with
your changes to repository object definitions do you need to update your mappings
to reflect these new object definitions.

5-6 Oracle Warehouse Builder 3i User’s Guide


About Mappings

The process of keeping mapping operators and repository objects in step is known
as reconciliation. Do not confuse reconciliation with the term synchronization,
which is used to describe the process of ensuring that you are up to date with
changes made by other users in a multi-user environment. To characterize the two
terms as used in Warehouse Builder, synchronization is a necessary activity (akin to
saving a file frequently) to keep users in step, whereas reconciliation is a deliberate
act which can be planned to occur at significant milestones in the warehouse
development. See "About Multiple-User Access" on page 2-4 for more information.
You can use reconciliation to control the phases of the warehouse development
process or to allow proper planning of warehouse maintenance. The reconciliation
feature provides great flexibility to accommodate different development
methodologies; here are two examples:
■ If you are driving the warehouse development process from your mappings
then you can use outbound reconciliation to create new repository
objects—tables, views and materialized views.
■ You can prototype your mappings using tables and when you are satisfied
with the transformation logic switch to other object types for the production
mappings—for example views, materialized views, facts—by using
inbound reconciliation.

When To Use Inbound Reconciliation


Inbound reconciliation updates the mapping operator to reflect changes in the
selected repository object; in other words the mapping operator is the target for the
reconciliation. You would use inbound reconciliation for any of the following
reasons:
■ To capture structural changes previously applied to the selected repository
object and propagate these to the mapping operator.
■ To capture attribute name changes previously applied to the selected
repository object and propagate these to the mapping operator.
■ To capture attribute data type changes previously applied to the selected
repository object and propagate these to the mapping operator.
■ To associate the mapping operator to a different repository object of the
same type; for example you might do this if you are migrating mappings
from one version of a data warehouse to a newer version and you maintain
separate different object definitions for each version

The Source to Target Mappings 5-7


About Mappings

■ To associate the mapping operator to a repository object of a different type;


for example you might do this if you want to provide access to the
underlying source data through views rather than go directly against the
base tables.
Inbound reconciliation has no impact on the linking of other mapping operators in
the mapping to repository objects; OWB preserves these links.

When to use Outbound Reconciliation


Outbound reconciliation causes the selected repository object to be updated to
reflect changes in the mapping operator; in other words the mapping operator is the
source for the reconciliation. You would use outbound reconciliation for any of the
following reasons:
■ To capture structural changes applied to the mapping operator and
propagate these to the currently linked repository object.
■ To capture attribute logical name changes applied to the mapping operator
and propagate these to the currently linked repository object.
■ To capture attribute data type changes applied to the mapping operator and
propagate these to the currently linked repository object.
■ To create a new repository object in the same warehouse module or create
or replace a different repository object in a different module. This will create
a repository object of the same type as the mapping operator; you might do
this if you are defining your definitions for staging tables as a product of
building your mappings.
You cannot create a repository object of a different type using outbound
reconciliation. Outbound reconciliation has no impact on the linking of other
mapping operators in the mapping to repository objects; OWB preserves these
links.
See "Reconciling Mappings" on page 7-2 for addition information about
reconciliation.

About The Mapping Editor


The Mapping Editor is the OWB graphical user interface for defining mappings.
This editor provides an easy to use drag-and-drop interface for defining what you
want to transform and map. The mapping editor is based on an operator-mapping
concept. The operator-mapping concept requires you to add an operator for each
operation you want to perform. A series of operations define the map.

5-8 Oracle Warehouse Builder 3i User’s Guide


About Mappings

For example, you can create a mapping to


■ Add Mapping Table operator to read from a source table
■ Add Filter Operator to only query specific rows
■ Add Mapping Table operator to write to a target table
Each instance of the operators you use in a map can have its own unique name. The
Mapping Editor generates a default name which you can change at any time. This
name is a logical name and has nothing to do with the physical objects associated to
it. The operators used in the map only refer to the metadata objects. This reference is
called Binding. The binding is a loose binding–in other words, any changes to the
metadata sources or targets that are referred to in the map will not be reflected in
the map until you reconcile the mapping operator with the repository object. See
"About Binding Mapping Operators" on page 5-5 for more information on binding.
Depending on the position of the attribute where you start your mapping, the
attribute of the source and target attributes (expanded, collapsed, minimized), and
the position you release the mouse-button will determine the type of data flow
connections made in the mapping.
■ You can drag a line from an output attribute group to an input attribute
group of a downstream operator.
■ You can drag a line from an output attribute to an input attribute of a
downstream operator.
■ You can copy all selected attributes from the source node and add them to
the selected target attribute group (if any) by dragging a line from the
source to the target.
If the mouse button is released over an invalid target, no data flow connection will
be established.
You cannot create the following links:
■ link an output attribute to an output attribute
■ link an input attribute to an input attribute
■ link attributes in the same operator (simplest case of circular dependency)
■ link to the same input attribute twice
Several components comprise the Mapping Editor:

The Source to Target Mappings 5-9


About Mappings

■ The Mapping Menu Bar–The menu provides access to all features of the
mapping editor, including those commonly done by using the mouse (for
accessibility purposes).
■ The Mapping Tool Bar–You can execute certain commands using the Mapping
Toolbar rather than the main menu.

Figure 5–1 The Mapping Editor Toolbar and Menu

■ The Object Palette–You can add Operators to a Mapping by dragging the


corresponding icon from the Object Palette to the Mapping Editor Canvas.

Figure 5–2 The Object Palette

■ The Canvas–The white space on the Mapping Editor is called the Canvas. You
use the canvas to perform most of your mapping activities. You use the canvas
to model your extract, transform, and load (ETL) operations. The canvas is
where you graphically add and remove objects as well as edit the operators of a
mapping and draw the associations between them.

5-10 Oracle Warehouse Builder 3i User’s Guide


About Mappings

Figure 5–3 The Mapping Canvas Showing Mapping Operators

You can select multiple mapping operators or data flow connections either by
SHIFT or CONTROL mouse clicks dragging a box around components
■ Operator Property Inspector
You edit the properties of a mapping operator, attribute, or attribute group
using the Operator Property inspector. The content and organization of
properties in the Operator Property inspector is different for each operator,
attribute, or attribute group; each operator, attribute, or attribute group may
have it’s unique set of properties and organization, but attributes will have a set
of common properties (such as datatype, name, etc.).
The Property Inspector is a non-modal dialog—once opened, you can select
another operator, attribute, or attribute group and the content of the property
inspector will display the properties for the selected object. Only one property
inspector can be active at a time.

The Source to Target Mappings 5-11


About Mappings

Figure 5–4 The Property Inspector

You can launch the Operator Property inspector by


■ clicking the title bar of an operator
■ selecting an operator, attribute group or attribute and clicking on the menu
item Edit > Properties
■ right-clicking on the header, attribute group or attribute of an Operator and
selecting Properties
If no operator, attribute group or attribute is currently selected while the Property
inspector is open, the Operator Property inspector will show an empty list.

About Expressions
At various points in defining a map, you may need to add an expression to get the
map to do what you want it to do (for example, joiner condition or a splitter
condition). Expressions consist of values of operator properties, and they are set and
altered through the Property Inspector using the Expression Builder. Each operator
will determine what kind of expressions it supports. The Expression Builder
contains a validate feature that enables you to check to ensure if the expressions you
created are correct. The expressions are limited to the inputs of the operator and to
any transformations available in the project. This limitation helps protect the
expression from becoming invalid because of change external to the operator.

5-12 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

For a description of Expression Builder, see "About Expression Builder" on


page 6-2.

About Mapping Generation


Once you have completed your mapping definition, it is time for you to run it.
Oracle Warehouse Builder will generate code in order to perform the map that you
defined. It can generate a number of different languages – PL/SQL for executing
within the database, SQL Loader for flat files, and TCL for use with Oracle
Enterprise Manager. It will select the appropriate language based on the operators
and objects you used in your map.
To run your mapping, you need to perform the following tasks:
■ Validate your mapping
This is not a required task but it is highly recommended. This task will attempt
to catch anything that will prevent the mapping from deploying or running.
The validation task will provide a list of errors and warnings that you should
correct prior to running the map.
■ Configuration
This task will define the physical characteristics of the map. You can tune your
map to take advantage of specific Oracle features and you can change runtime
parameters of the mapping before you generate it.
■ Generate
This task will produce the code in the appropriate language to perform the
mapping.
■ Deploy
This task will save install the code in a file or install it to the database where it is
to be executed.
■ Run
You can now execute the map.

Defining Mappings
The remainder of this chapter describes how to define a basic mapping. Specifically,
this section will describe how to
■ Map data from a flat file to a table

The Source to Target Mappings 5-13


Defining Mappings

■ Add an operator that enriches or complements the data flowing to the table
from the flat file.
This section describes the following steps in defining a new mapping:
1. Create a mapping object in your warehouse module using the New Mapping
Wizard.
2. Define data sources, data targets, operators, and transformations.
3. Configure their attributes and their properties.
4. Graphically define the data flow connections between the operators’ attributes.
5. Validate and reconcile the mapping and generate the code.

Creating a Mapping Warehouse Object


You begin the Mapping process by defining a mapping object in the Mapping node
in the Warehouse Module Editor.
To create a mapping object:
1. Open a Warehouse Module using the Warehouse Module Editor.
2. Select Mappings in the Logical Tree

5-14 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

Figure 5–5 The Warehouse Module Editor

3. Right-click Mappings > Create Mapping.


OWB returns the New Mapping Wizard Welcome dialog.
4. Click Next.
5. Enter a name for the mapping and a description in the appropriate fields on the
Name dialog. See About Naming Policies on page 2-20 for information on
naming.

The Source to Target Mappings 5-15


Defining Mappings

Figure 5–6 The Name Dialog in the New Mapping Wizard

6. Click Next.
The New Mapping Wizard returns the Finish dialog. You can use the Finish
dialog to verify the name of your new mapping.
7. Click Finish.
OWB stores the definition for the mapping and inserts its name in the
warehouse module’s navigation tree. You have created a container that will
hold the mapping operators that define the ETL operation from a data
warehouse source object to a data warehouse target object. The Mapping Editor
automatically opens.

5-16 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

Figure 5–7 The Mapping Editor

The next section describes how to add the mapping operators.

Selecting A Source Operator


You use the Mapping Editor to define the ETL operations, first of which is selecting
sources and targets for your mapping. The following instructions assume you have
kept the Mapping Editor open. If you closed the mapping editor after creating a
new mapping you can re-open it either
■ from the logical tree in the Warehouse Module Editor by selecting a
mapping under the MAPPINGS node and selecting Edit > Edit Object from
the menu or
■ from the logical tree in the Warehouse Module Editor by selecting and
double-clicking a mapping in the MAPPING node.
■ from the logical tree in the Warehouse Module Editor, by selecting a
mapping, right-clicking it, and selecting Edit... from the pop-up menu.
If you still have it open, then you are ready to select operators for a mapping on the
canvas using one of two methods:

The Source to Target Mappings 5-17


Defining Mappings

■ dragging the operator type icon from the Object Palette and dropping it
onto the canvas.
■ selecting Edit > Add and selecting the operator from the menu list.
The following instructions describe how to select a Mapping Flat File operator as
data source for a mapping. A File operator is used as the row-set generator for
reading from a flat file. A File operator may be connected to a downstream filter
operator, expression operator, or transformation operator. The row-set generated
from the file operator must ultimately arrive at a table, view, dimension, or fact
operator. A file operator will generate a SQL*Loader mapping. The following
instructions assume that you already have an open Mapping Editor.
To define a flat file source operator:
1. Drag a Mapping Flat File icon from the Object Palette and drop it onto the
canvas.
OWB opens the Add File dialog.
2. Select one of the four options:
■ Create unbound file with no attributes–enter a name for the new mapping
file you are creating.
■ Create new repository file and bind–select the warehouse module where
you want to create the file.
■ Import file into repository and bind–select the module from which you are
importing the file.
■ Select from existing repository file and bind–either type the prefix to
search for the flat file or select from the displayed list of flat files within the
selected module.

5-18 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

Figure 5–8 The Add File Dialog

3. For this case, select a flat file from an existing repository file and bind and the
click OK.
Once you’ve made your selection, OWB places a Mapping Flat File operator on
the canvas which reflects the names and attributes of the flat file to which it is
now bound

The Source to Target Mappings 5-19


Defining Mappings

Figure 5–9 The Mapping Editor Showing A Mapping Flat File Operator

You are now ready to define a target operator for your mapping.

Selecting a Target Operator


The following instructions describe how to select a Mapping Table operator as a
data target for a mapping. You can use the Mapping Table operator as a data source
as well, but these instructions use it as a target.
The following instructions assume that you already have an open Mapping Editor.
To define a mapping table target operator:
1. Drag a Mapping Table icon from the Object Palette and drop it onto the canvas.
OWB opens the Add Table dialog.
2. Select one of the four options:
■ Create unbound table with no attributes–enter a name for the new
mapping table you are creating.
■ Create new repository table and bind–select the warehouse module where
you want to create the table.

5-20 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

If you make this selection and then click OK, OWB returns the New Table
Wizard. Follow the wizard steps to create a new table.
■ Import table into repository and bind–select the module from which you
are importing the table.
If you make this selection and click OK and have already defined a
database link for the module from which you are importing the table, then
OWB returns the Database Link Information dialog. Enter the appropriate
information into the dialog. If you have not defined a database link, then
OWB returns the New Database Link Information dialog. See "Using The
New Database Link Dialog" on page 4-4 for information on how to define a
new database link.
■ Select from existing repository table and bind–either type the prefix to
search for the table or select from the displayed list of tables within the
selected module.

The Source to Target Mappings 5-21


Defining Mappings

Figure 5–10 The Add Table Dialog

3. For this case, choose Select from an existing repository table and bind and then
click OK.
Once you’ve made your selection, OWB places a Mapping Table operator on the
canvas which reflects the names and attributes of the Table to which it is now
bound.

5-22 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

Figure 5–11 The Mapping Editor That Includes A Mapping Table Operator

A Mapping Table operator will then appear on the canvas.

Selecting A Data Flow Operator


You can add operators that will act upon your source data as it flows to the data
targets. OWB includes a variety of operators on the Object Palette, or you can
design your own using the Oracle Transformation Library or Expression Builder.
See Chapter 6, "Mapping Operators and Transformations" for more information on
creating custom operators.
A commonly used Data Flow operator is a Mapping Data Generator. This operator
is used to add a pseudo column to the source metadata before reaching the target.
To add a Data Generator operator to a mapping, drag a Data Generator icon from
the object palette and drop it on the canvas. OWB adds a Mapping Data Generator
Operator onto the Mapping Editor canvas.

The Source to Target Mappings 5-23


Defining Mappings

Figure 5–12 The Mapping Editor Including A Data Generator

There is no need to bind it to any object in the OWB repository since this build-in
Operator already has a predefined set of attributes. You are now ready to connect
your operators.

Defining The Data Flow Connections


To connect Mapping Operators, you draw lines from output attributes or output
attribute groups to input attributes or groups between the operators. These lines are
Data Flow Connections; these lines graphically represent how the data flows from a
source to a target.
To connect operators:
1. Click and hold down the mouse button while the pointer is positioned over an
output attribute.

5-24 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

2. Drag the mouse away from the output attribute and toward the input attribute
to which you want data to flow.
As you drag the mouse, a line appears on the Mapping Editor canvas to
indicate a connection.
3. Release the mouse over the input attribute.
You have now created a data flow connection between a data source and data
target. Repeat steps one through three until you have created all the data flow
connection appropriate for your situation.

Figure 5–13 The Connected Operators In A Mapping

This defines a mapping. Note that to complete a mapping, you may also need to
include transformations in addition to those described—transformations such as
pre– and post–mapping processes and mapping transformations. Chapter 6,

The Source to Target Mappings 5-25


Defining Mappings

"Mapping Operators and Transformations" shows you how to create definitions for
these and other custom transformations.
Before you can actually generate a mapping, you may need to alter settings for
attributes in the data target. The following section describes how to do this. If not,
then skip the following section and proceed to the next section that describes how
to reconcile and validate your mapping.

Configuring A Mapping
In mapping a source operator to a target operator, you may need to edit certain
characteristics in your mapping. To customize your mapping, you can provide
additional configuration information. Configuration can either be an intrinsic part
of your ETL design or be of a more physical nature, for instance, based on how and
where you want to deploy your Mapping.
The following section addresses the more commonly used settings that require
configuration. See "Configuring The Mapping For Deployment" on page 7-13 for
more complete information on configuring a mapping.

Setting The Load Type


OWB generates code to extract data from source operators and then loads it to
target operators. For each load operator, you define a load type which determines
the type of load code that OWB generates. The generated code can have one of these
load types:
■ INSERT–This type of operation specifies that the incoming row sets will be
inserted into the data target.
■ UPDATE–This type of operation specifies that the incoming row sets will be
used to update existing rows in the data target.
■ INSERT/UPDATE–This type of operation specifies that for each incoming
row, an insert operation will first be performed. If the insert fails, an update
operation occurs.
■ UPDATE/INSERT–This type of operation specifies that for each incoming
row, an update operation will first be performed.
■ DELETE–This type of operation specifies that the incoming rowsets will be
used to determine which of the rows at the target get deleted.

5-26 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

■ TRUNCATE/INSERT–This type of operation specifies that the data target


will first be truncated before the incoming rowset is inserted into the data
target.

Warning: If you choose this option, the procedure cannot be rolled


back even if the execution of the mapping fails.

■ DELETE/INSERT–This type of operation specifies that all the rows in the


data target will first be deleted before the incoming rowset is inserted into
the data target.
■ CHECK/INSERT–This type of operation specifies that the data target will
first be checked if it contains any rows. If not, the incoming rowsets will be
inserted into the data target.
■ NONE–no operation will be performed on the data target. This setting
might be useful for test runs; all transformations and extraction will be run
but will have no effect on the target.
For more specific information on setting target characteristics, see "Configuring
Attribute Properties" on page 7-13.
To define the load type:
1. Right-click the header of the target operator.
2. Select Operator Properties.
OWB returns the Table Properties for the operator.
3. Click Data Entity Parameters to expand the properties list.
4. Click the Loading Type row on the right-hand column.
5. Select a loading operation from the pulldown list.

The Source to Target Mappings 5-27


Defining Mappings

Figure 5–14 The Loading Types Property Inspector

Configuring Physical Properties For a Mapping


Mappings will require you to configure their physical properties. For example, you
may also need to define the physical location of the file from which we will read the
records. Configuring this kind of physical property for a Mapping can be done
using the Configuration Properties dialog. See "Configuring The Mapping For
Deployment" on page 7-13 for more information.
The following instructions will lead you through the steps to accomplish physical
logical configuration.
To Configure the Physical Properties for a mapping:
1. Select a Mapping object from the Warehouse Editor Navigation Tree.
2. Right Click the mapping you want to configure
3. Select Configure.. from the popup menu.
OWB launches the Configuration Properties dialog.

5-28 Oracle Warehouse Builder 3i User’s Guide


Defining Mappings

Figure 5–15 The Configuration Properties Dialog

4. Select the Steps node and expand the child nodes until you see the property you
need to set.
5. Click the close window button to save the setting.

Validating the Mapping


To ensure you have not made mistakes in defining your mapping, you can validate
it. The validation procedures verify foreign key references, object references, data
type (mis)matches, and other properties in your mapping. See "Validating
Definitions" on page 8-24 for more information on validation.
To validate a mapping:
1. Select a Mapping on the Mapping Node in the Warehouse Module Editor.
2. Select Module > Validate... on the main menu.
The results of a validation are reported in a Validation Results window.

The Source to Target Mappings 5-29


Defining Mappings

Figure 5–16 The Validation Results Window

3. Click on the Details button to see the full message that appears in the
Validation Message Field.

5-30 Oracle Warehouse Builder 3i User’s Guide


Generating the Mapping

Figure 5–17 The Details Window

If you have errors, the Validation Details window will often include suggestions for
correcting them. You can open an editor to make these corrections by clicking Edit
in the Validation Results Window.
Once you have reconciled the operators and validated the mapping, you are ready
to generate the SQL code defined by the mapping. The next section describes how
to view and edit that code.

Generating the Mapping


When you generate the mapping, you are implementing the SQL code that
performs the DML and DDL commands necessary to move the data from the
sources to the targets defined in your mapping.
Once you have fully defined a mapping, configured it, and successfully validated it,
the code generator creates the code that will actually implement you ETL design.
generating the code for a mapping can be done using two methods:
■ From the Module Editor–this method will create scripts with the generated
code that the user can deploy and run.

The Source to Target Mappings 5-31


Generating the Mapping

■ From the Mapping Editor–this method will generate code that the user can
inspect from a code viewer.
To generate code from the mapping editor, select Mapping > Generate from the
Mapping Editor menu. OWB will then generate the code for the mapping. When the
code generation completes, OWB returns the Code Viewer.

Figure 5–18 The Generated Code For A Mapping

For a Mapping that extracts records from a flat file and loads them as rows into a
target table, the generated code results in a SQL*Loader control-file. The control-file
reflects a Mapping definition from a flat file to a table source and includes a date
stamp:

5-32 Oracle Warehouse Builder 3i User’s Guide


Editing Mapping Operator Attributes

Editing Mapping Operator Attributes


An operator’s properties play a critical role in the mapping process. Therefore, you
will need to become familiar with editing mapping operator properties and
attributes using the Mapping editor.

Note: Several properties and parameter settings involve PL/SQL


or SQL*Loader expressions. When you edit or create these settings,
the Expression Builder appears automatically for you to construct
these expressions. See "Using Expression Builder" on page 6-2 for
information on using Expression Builder.

Adding or Removing Operator Attribute Groups


When you create a new attribute group, you may do so directly in the mapping
editor by right-clicking the name header and choosing the Add/Remove Groups
option.

Figure 5–19 The Adding/Remove Groups Dialog

You cannot convert a input group to an output group or vise-versa.


This feature works only for Splitters and Joiners. See "Adding Data Flow Operators
To A Mapping" on page 6-6 for more information.

Editing Operator Attributes


For each mapping operator, you can add, delete and rename Attributes and
Attribute Groups.

The Source to Target Mappings 5-33


Editing Mapping Operator Attributes

Adding Or Removing Attributes


You can add attributes to, or remove attributes from, an operator from the Mapping
Editor canvas. The following procedure starts with an open Mapping Editor
containing mapping operators.
To add attributes to an Operator
1. Select a mapping operator.
2. Click Edit > Add/Remove Attribute or right-click the operator’s display set >
Add/Remove Attribute or right-click on the attribute group of the operator and
select Add/Remove Attribute from the popup menu.
3. OWB returns the Add/Remove Attribute dialog.

Figure 5–20 The Add/Remove Attribute dialog

4. Enter the new attribute name in the Add/Remove Attributes dialog.


5. Click Add.
6. Click OK.
See "Creating New Attributes" on page 5-35 for an alternate method to add
attributes.
To remove attributes from an operator
1. Select an attribute group in a mapping operator.
2. Click Edit > Add/Remove Attribute or right-click the operator’s display set >
Add/Remove Attribute or right-click on the attribute group of the operator and
select Add/Remove Attribute from the popup menu.

5-34 Oracle Warehouse Builder 3i User’s Guide


Editing Mapping Operator Attributes

3. OWB returns the Add/Remove Attribute dialog.


4. Select the attribute you want to remove in the Add/Remove Attributes dialog.
5. Click Delete.

Renaming Attributes
To rename an operator, attribute or attribute group, select the appropriate item on
the Mapping Editor canvas and
■ Select Edit > Rename from the menu or right-click an attribute and select
Rename from the popup menu.
■ Specify the new name of the operator in the Rename dialog box.

Figure 5–21 The Rename Attribute Dialog

■ Click OK.
You can also right mouse-click on the operator and select Rename from the popup
menu.

Creating New Attributes


The section "Adding Or Removing Attributes" on page 5-34 described how to
change an operator’s properties using the Operator Property inspector. Another
method to create operator attributes is to use the connecting lines. You can create a
new attribute for an operator within the Mapping Editor by
■ Dragging and dropping the attribute group header to the operator that you
want the attributes to belong.
This is a copy operation. Any name conflict will be resolved by
auto-generated names. The drag begins in the input/output indicator.

The Source to Target Mappings 5-35


Editing Mapping Operator Attributes

■ You can create a new unconnected attribute by right clicking the attribute
header and choosing Add/Remove Attribute.

Reconciling Your Mapping


Once you have added or changed attributes and/or attribute groups or have
changed the repository object to which the mapping operator is bound, you should
reconcile the mapping operators with their corresponding repository objects.
Reconciliation enables you to synchronize mapping operators with repository
objects. You can reconcile mapping operator attributes with repository object
attributes using the Inbound Reconciliation dialog. Reconciliation is an optional
task that you perform only if you have changed attributes in a repository object.
Using this mechanism, you can:
■ capture structural changes applied to the associated object in the repository
and propagate these to the mapping operator.
■ associate the mapping operator to a repository object of the same type
■ associate the mapping operator to a repository object of a different type.
You can do all this while still preserving the connections with other mapping
operators. See "About Reconciliation" on page 5-6 and "Reconciling Mappings" on
page 7-2 for more information about reconciliation.

Reconciling Inbound Operators


You use the Inbound reconcile operator dialog to bind a mapping operator to a
repository object. You can reconcile inbound an operator by name, position, or
object identifier match. You can also use a combination of the above three methods.
Using this mechanism, you can:
■ capture structural changes applied to the mapping operator and propagate
these to the associated object in the repository.
■ create a new repository object that inherits the structure of the mapping
operator and binds to it.
You can do all this while still preserving the connections with other mapping
operators. See "About Reconciliation" on page 5-6 and "Reconciling Mappings" on
page 7-2 for more information about reconciliation.
To start inbound reconciliation, select the mapping operator on the canvas and:
■ Select Edit > Reconcile Inbound menu item from the menu bar or

5-36 Oracle Warehouse Builder 3i User’s Guide


Editing Mapping Operator Attributes

■ Right mouse-click the header of the mapping operator and select the
Inbound Reconcile menu item from the popup menu.
OWB launches Inbound Reconcile Operator dialog.

Figure 5–22 The Inbound Reconcile Operator Dialog

The Inbound Reconcile operator dialog enables you to select the object in the
repository to reconcile the mapping operator with and then select the strategy for
matching the attributes of the mapping operator with the selected repository object.
Note that operators of a certain origin (table, file) can be reconciled with a different
repository object type (view, etc.) See "Reconciling Mapping Operators With
Repository Objects" on page 7-2 for more information on Reconcile Strategies.

Reconciling Outbound Operators


To start Outbound Reconcile, you select an operator on the canvas and
■ Select Edit > Reconcile Outbound menu item from the menu bar or
■ Right mouse click on the header of the Operator and select Reconcile
Outbound menu item from the popup menu.

The Source to Target Mappings 5-37


Editing Mapping Operator Attributes

OWB will open the Outbound Reconcile Operator dialog.

Figure 5–23 The Outbound Reconciliation Dialog

In the Outbound reconcile operator dialog you bind a mapping operator to a


repository object by choosing:
■ Create a new object if the repository object does not already exist in that
module, or
■ Reconcile with an existing object; in this case you need to select the
appropriate Reconcile Strategy.
In addition to reconciling the attributes of an operator, the reconciliation process
may also update the logical properties of an operator.
Once you have edited your attributes and reconciled the mapping, you can now
generate the Mapping. Select Mapping > Generate from the Mapping Editor menu.
OWB will then generate the code for the mapping. When the code generation
completes, OWB returns the Code Viewer. See "Defining Code Generation Strategies
For The Mapping" on page 7-24 for more information on generating code.

5-38 Oracle Warehouse Builder 3i User’s Guide


Editing Mapping Operator Attributes

Figure 5–24 The Mapping Editor After Editing Attributes

Committing Changes To The Mapping


OWB does not commit your changes to the repository until you click the Commit
icon on the tool bar, or exit OWB and click Yes on the pop-up Commit confirmation
panel (Builder always returns this panel on exit).

Note: If you generate code at any time during your OWB Session,
Multi-User Locking feature will remain in effect until after you
commit your changes.

The Source to Target Mappings 5-39


Taking The Next Step

Taking The Next Step


This chapter described the concepts behind the OWB Mapper and how to create a
mapping that will generate the code necessary to move data from a source to a
target. It described how to define and update attribute and attribute group
properties for mapping operators. This chapter also included basic information
regarding how to validate the code and view the code in order to edit it manually.
Chapter 6, "Mapping Operators and Transformations" shows you how to add more
sophisticated flow operators to a mapping, how to access transforms in the Oracle
Library, create custom transformations, and import PL/SQL procedures that will
enhance how your data flows from sources to targets.

5-40 Oracle Warehouse Builder 3i User’s Guide


6
Mapping Operators and Transformations

This chapter is the second of three chapters that discusses mapping by describing
advanced mapping features. Specifically, this chapter describes how to add Data
Flow operators that transform and manipulate data as it moves from a source to a
target.
This chapter describes how to construct transform expressions using specific icons
on the Object Palette. It also describes how to use Expression Builder to create
transforms using standard transformations selected from the Oracle Library as well
as defining custom transformations..
This chapter includes the following sections:
■ Using Expression Builder
■ Adding Data Flow Operators To A Mapping

Mapping Operators and Transformations 6-1


Using Expression Builder

Using Expression Builder


Mapping operations may require you to add simple SQL expressions to transform
your data. The Expression Builder provides an easy to use editor that allows quick
construction of expressions by using a drag and drop interface. These expressions
can then be verified to be syntactically and semantically correct before leaving the
editor.

Figure 6–1 The Expression Builder Interface

The following two sections describe Expression Builder and how to use it to build
data transform expressions.

About Expression Builder


An expression component transforms data that flows through it. In order to specify
transforms, you need to create SQL expressions for each output parameter defined
in an expression component. For example, these expressions may be snippets of

6-2 Oracle Warehouse Builder 3i User’s Guide


Using Expression Builder

SQL that are used in-line as part of a bigger SQL statement. With Expression
Builder, you can drag and drop pre-defined SQL expressions selected from the GUI.
These expressions enable you to use
■ Any input to the operator in which the expression is defined.
■ Transformations or predefined functions from the Oracle Transform
Libraries as well as from Custom Transforms
Expression Builder contains the following fields:
■ The "expression type" title will be dynamically populated based on the
expression type. Allowed expressions types include:
– Filter Condition
– Join Condition
– Split Condition
– Constant
– Data Generator Output Attribute
– Output Attribute in Expression
– Having Clause for Aggregation
– Update Target Condition
– Delete Target Condition
■ The tree items list which displays two tab cards:
– Inputs–contains a list of input attributes to the operator that you are
defining the expression in.
– Transformations–contains a list of the Oracle Transformation Library,
the Global Shared Library, and a Custom Transformation Library
available within the active module
■ The description field that displays relevant information about the selected
functions.
■ The expression field within which you build expressions. You create your
expressions by typing them manually into the Expression field. You can
also create them by dragging them from the predefined functions available
from the tree list into the Expression field. Or you may create them by
clicking keypad operators available below the Expression field.

Mapping Operators and Transformations 6-3


Using Expression Builder

■ A set of Operator buttons from which you can select accepted operators.
The available operators vary by the expression type you are building.
■ A drop-down list of available SQL clauses that are appropriate for the
active expression type.
■ The validate button which you use to validate the current transformation
expression in the expression builder. The validation return status will be
displayed in the message field located directly below the operator buttons.

Creating Expression Components


Expression Builder launches from the Operator Properties inspector if a parameter
requires an expression. Expression Builder displays an Inputs tab card containing a
set of parameters that are appropriate for the type of operator for which you are
building and expression. It also displays a Transformation tab card that provides
access to the transformation libraries. You can choose from a list of available
transforms and parameters in the Oracle Transformation Libraries navigation
tree—see "About Oracle Transformation Libraries" on page 3-59 for more
information.

6-4 Oracle Warehouse Builder 3i User’s Guide


Using Expression Builder

Figure 6–2 The Expression Builder Interface Showing Transformation Libraries

Expression Builder plays a critical role in defining operators such as Expression,


Constant, and Transformation all of which are described in the next section.
Therefore, to effectively create definitions for operators, you need a working
knowledge of SQL and PL/SQL; some of the operators described in the next section
require you to write SQL and PL/SQL statements appropriate for your situation.
After creating an expression , you can use Expression Builder to evaluate it by
clicking the Validate button after you have entered your expression. Validation w
ensures that all mapping objects referred to by the expression have affiliated
repository objects. The validation system uses the design repository database to
syntactically validate the expression. The deployment database could be different
than the design repository and thus not accept the expression. As such, the
validations your expressions are not guaranteed to be correct. If this occurs, the
expression errors can only be found at deployment time

Mapping Operators and Transformations 6-5


Adding Data Flow Operators To A Mapping

Adding Data Flow Operators To A Mapping


This section describes how to add and edit flow operators to a mapping. The flow
operators enable you to control what data moves from sources to targets. They also
enable you to change your data as appropriate once it reaches the data recipient. In
many cases, some of these operators may also change the data values themselves.
The following instructions describe how to add various flow operators to your
mapping. While flow operators differ in how you set them up in a mapping, all
have the following common steps:
1. Drag and drop an icon from the Object palette to the Mapping Editor Canvas.
2. Define attributes, procedures, and/or functions.
3. Connect the Operator to a data provider and/or to a data recipient.
Most flow operators require you to enter a condition statement into a field located
in the operator’s Property Inspector. You use Expression Builder to do this. See
"About Expression Builder" on page 6-2 for detailed information on Expression
Builder

Filtering Data
You can conditionally filter out rows from a row-set using the Filter operator. The
Filter operator filters data from a source to a target by placing a WHERE clause in the
code represented by the mapping. You connect the Filter operator to an operator
that is upstream in the Mapping, perform some filtering based on some condition
and pass a subset of rows to any down-stream operator that's connected to it.
The Filter operator can have only one INOUT attribute group. This group can be
connected to both a source and target row-set. It then produces a row-set that is a
filtered subset of the source row-set, based on a boolean filter condition expression.
The Filter operator contains the following property:
■ Filter Condition (operator level)–The boolean condition which determines
which rows will be passed on to the output row-set.
To filter data:
1. If you have not already done so, define a source operator as described in
"Selecting A Source Operator" on page 5-17.
2. Drop the Filter icon onto the Canvas.

6-6 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–3 The Filter Icon

3. Connect the source attributes appropriate for your mapping to the Filter
attribute group labeled INOUTGRP1.

Figure 6–4 The Mapping Editor With A Filter Operator

4. Open the Filter Property Inspector by right-clicking the operator header and
selecting Operator Properties... from the popup menu.

Mapping Operators and Transformations 6-7


Adding Data Flow Operators To A Mapping

Figure 6–5 The Filter Property Inspector

5. Click the field to the right of the Filter Condition property and click the ...
button to open Expression Builder.
OWB returns the Expression Builder window.
6. Create the correct expression in Expression Builder.
For the example, create the expression shown in Figure 6–6 by double-clicking
on the appropriate inputs from the INPUTS tab, and using the appropriate
operator buttons. You may also type in the expression free form.

6-8 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–6 The Expression Builder Showing A Filter Condition

7. Click OK in Expression Builder and close the Filter Property inspector.


8. If you have not already done so, define a target operator as described in
"Selecting A Source Operator" on page 5-17 and connect the filter outputs to the
target INOUT attribute group
9. Link the appropriate data provider attributes to the Filter and then to the
appropriate data target attributes.
10. Select Mapping > Generate Mapping… from the Mapping Editor menu.
OWB returns the Code Viewer window.

Mapping Operators and Transformations 6-9


Adding Data Flow Operators To A Mapping

Figure 6–7 The Code Viewer Window

11. Examine the generated code for this map in the code viewer dialog box. You
will see the filter condition expression generated as a "WHERE" clause (for
set-based view mode). The filter input names in the original filter condition
have been replaced by actual column names from the source table, qualified by
the source table alias.

Ordering Data
You can produce a sorted row-set through the Sorter operator. The Sorter allows
you to specify on which input attributes the sorting is performed and whether the
sorting is performed in ascending or descending order.
The Sorter operator has one input/output attribute group. This group can be
connected from any output or input/output attribute group and to any target input

6-10 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

or input/output attribute group. OWB sorts provided data moving to a data


recipient by placing an ORDER BY clause in the code represented by the mapping.
The Sorter operator contains the following properties:
■ Order By Expression (operator level)–This property is an ordered list of
attributes in the input/output attribute group, specifying that sorting is
performed in the same order as the ordered attribute list. Ascending or
descending sorting can be set for each attribute participating in the sort.
To order data:
1. Drag a source operator from the Object Palette onto the Mapping Editor
Canvas.
2. Drag the Mapping Sorter operator from the Object Palette onto the Mapping
Editor Canvas.

Figure 6–8 The Sorter Icon

3. Drag a target operator from the Object Palette onto the Mapping Editor Canvas.
4. Draw a line from the input/output attribute group of the source operator to the
input/output attribute group INOUTGRP1 of the Mapping Sorter.

Mapping Operators and Transformations 6-11


Adding Data Flow Operators To A Mapping

Figure 6–9 The Mapping Editor With A Sorter Operator

5. Open the Sorter Property Inspector by right-clicking the operator header.


6. Click the field to the right of the Order By Expression property.

6-12 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–10 The Sort Condition Property

7. Click the ... button to open the Order By Expression window.

Mapping Operators and Transformations 6-13


Adding Data Flow Operators To A Mapping

Figure 6–11 The Sort By Expression Window

8. Select the attributes you want to sort and define whether they will ascend or
descend clicking the appropriate button.
9. Click OK.

Splitting Data
You can use the Splitter operator to split a single input row-set into several output
row-sets. The Splitter uses a boolean split condition as a filter to produce each
output row-set. Each output rowset will have a cardinality less than or equal to the
input cardinality. The effect of the splitter is similar to having several Filter
operators connected to a single upstream source.
The Splitter operator creates an output group called REMAINING_ROWS. If you
use this group, it will produce a row-set containing all input rows not included in
any of the other output groups.You may delete this output group if you want, but
you cannot edit it.
The Splitter Operator contains the following properties:

6-14 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

■ Split Condition (output attribute groups)–The text expression template for


the Split Condition. For code generation, the actual source columns are
substituted for the input attribute names in the expression template.
Generally, the expression should be a legal SQL expression which could be
used in a "WHERE" clause. See the "languages" section in chapter 7 for a
fuller description of the syntax rules for expressions in various contexts.
■ Data Type (attributes)–The data type of the attribute.
■ Precision (attributes)–The precision of the attribute (used for numeric type
attributes only).
■ Scale (attributes)–The scale of the attribute (used for numeric type attributes
only).
■ Length (attributes)–The length of the attributes (used for string-type
attributes only).
The following instructions describe how to split data from a single source to three
targets.
To split data from one source to several targets:
1. Drag a source operator from the Object Palette onto the Mapping Editor
Canvas.
2. Drag the Splitter operator from the Object Palette onto the Mapping Editor
Canvas.

Figure 6–12 The Splitter Icon

3. Drag a target operator from the Object Palette onto the Mapping Editor Canvas.
4. Drag a second target operator from the Object Palette onto the Mapping Editor
Canvas.
5. Drag a third target operator from the Object Palette onto the Mapping Editor
Canvas.
6. Connect the attribute group from INOUTGRP1 of the source to the INGRP1 of
the Splitter.

Mapping Operators and Transformations 6-15


Adding Data Flow Operators To A Mapping

Figure 6–13 The Mapping Editor With A Splitter Operator

All output attributes are created automatically, and output attribute data types
will be automatically set to match the data type of the corresponding input
7. Open the Splitter Property Inspector by right-clicking a Group header.
8. Click the field to the right of the Split Condition property.

6-16 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–14 The Split Condition Property Inspector

9. Click the ... button immediately to the right of the Split Condition property to
open Expression Builder.
10. Enter a Split Condition in the Expression Builder Editor.

Figure 6–15 The Expression Builder Showing A Split Condition

11. Click Validate to validate the Split Condition expression.


12. Click OK.

Mapping Operators and Transformations 6-17


Adding Data Flow Operators To A Mapping

13. Close the Attribute Group Property inspector.

14. Repeat the previous 5 steps except select the appropriate OUTGRP on the
Splitter.
15. Connect OUTGRP1on the Splitter to INOUTGRP1 in the first target.

16. Repeat the previous step except connect the appropriate OUTGRP on the
Splitter to the appropriate INOUTGRP on the targets.
17. Select Mapping > Generate > Mapping from the Mapping Editor menu.
OWB opens the Mapping Code Viewer.

Figure 6–16 The Mapping Code Viewer

18. Examine the generated code for this map in the code viewer dialog box. You
should see the Split Conditions in the WHERE clauses of the SELECT queries
for the insert DML (There will be a separate query for each target).

6-18 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

De-Duplicating Data
OWB enables you to remove duplicate data from a source to a target by placing a
DISTINCT clause in the select code represented by the mapping. You use the
Deduplicator to perform this operation.
To eliminate duplicate data:
1. Drag a source operator from the Object Palette onto the Mapping Editor
Canvas.
2. Drag a target operator from the Object Palette onto the Mapping Editor Canvas.
3. Drag the Deduplicator operator from the Object Palette onto the Mapping
Editor Canvas.

Figure 6–17 The Deduplicator Icon

4. Map the attributes in the source operator to the input/output attribute group
INOUTGRP1 of the deduplicator operator.
5. Map the attributes in the input/output attribute group INOUTGRP1 of the
deduplicator operator to the attributes of the target operator.

Mapping Operators and Transformations 6-19


Adding Data Flow Operators To A Mapping

Figure 6–18 The Mapping Editor With A Deduplicator

6. Click the input/output attribute group INOUTGRP1 of the target operator.


7. Select menu item Mapping > Generate > Intermediate Result… from the
Mapping Editor menu.
OWB returns the Code Viewer window showing DISTINCT in the select
statement.

6-20 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–19 The Code Viewer Showing Distinct In the Code

Aggregating Data
The Aggregator performs data aggregations, such as SUM or AVG, and provides an
output rowset with aggregated data. Each Aggregator operator shares a GROUP BY
and HAVING clause, so each output parameter in the output parameter group has
the same cardinality. This operator delivers an aggregated row-set derived from the
input row-set; the number of rows in the output row-set is less than or equal to the
number of input rows.
The Aggregator operator has one input attribute group and one output attribute
group. The source row-set can be connected to input attribute group and the
aggregator operator produces the corresponding aggregated row-set in its output
attribute group.
The Aggregator operator contains the following properties:
■ Group By Clause (operator level)–This property defines how the incoming
row-set is grouped to return a single summary row for each group. This
consists of an ordered list of attributes in the input attribute group
specifying how this grouping is performed. All output attributes with no
aggregation function applied (that is Function in the Expression property
for those attributes is NONE ) is necessary to be included in this clause.
■ Having Clause (operator level)–This property is a boolean condition
restricting the groups of rows returned in the output attribute group to

Mapping Operators and Transformations 6-21


Adding Data Flow Operators To A Mapping

those groups for which this condition is true. If this clause is not specified,
all the summary rows for all the groups will be returned in the output
attribute group. This clause can refer to any attributes or an expression
(possibly with aggregation functions) of the attributes in the input attribute
group.
■ Expression (attribute level)–This property defines the aggregation functions
to be performed on the attribute where this expression is specified. If no
aggregation function is necessary, NONE should be specified for the
Function of this property.
To add an aggregator to a mapping:
1. Drag a source operator from the Object Palette onto the Mapping Editor
Canvas.
2. Drag a target operator from the Object Palette onto the Mapping Editor Canvas.
3. Drag an Aggregator operator from the Object Palette onto the Mapping Editor
Canvas.

Figure 6–20 The Aggregator Icon On The Object Palette

4. Map the attributes from the source operator appropriate for your situation to
the attribute group INGRP1 of the aggregator operator.
5. Right-click on the attribute group header OUTGRP1 of the aggregator operator
and select Add/Remove Attributes… from the popup menu.
OWB opens the Add/Remove Attributes dialog.
6. Add the appropriate attributes. See "Adding or Removing Operator Attribute
Groups" on page 5-33 for information on this dialog.
7. Right-click on an attribute in the Aggregator operator and select Attribute
Properties… from the popup menu.
OWB opens the Aggregator Properties Inspector.

6-22 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–21 The Aggregator Properties Inspector

8. Edit the Expression property by clicking the … button to the right of that
property.
OWB opens the Expression dialog. Select a function and a parameter from the
drop down lists.

Figure 6–22 The Expression Dialog

9. Click OK.
10. Repeat steps 7-9 as appropriate for additional attributes on the Aggregator
operator.
11. Click the title bar of the aggregator operator in the canvas. The property
inspector will be refreshed with the properties for the operator the aggregator
operator.
12. Edit the property called Group By Clause by clicking the … button to the right
of that property.
OWB opens the Group By Clause window.

Mapping Operators and Transformations 6-23


Adding Data Flow Operators To A Mapping

Figure 6–23 The Group By Clause Window

13. Verify that your properties appear in the list of GROUP BY parameters.

14. Click OK.

15. Edit the property called Having Clause by clicking the … button to the right of
that property.
OWB opens Expression Builder. Use Expression Builder to create a sum
expression—or example, sum(INGRP1.OR_TOTAL) > 10000.

Figure 6–24 The Expression Builder Showing A Sum Statement

6-24 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

16. Map the attributes you edited from the attribute group OUTGRP1 in the
aggregator operator to the attributes in the target.

Figure 6–25

Joining Data Sources


You can use the Joiner operator to join together multiple row-sets from different
sources, which may have different cardinalities, and produce a single output
row-set. The Joiner operator is associated with each output attribute group for a
data provider. It is a boolean condition expression that relates column values in
each source row-set to at least one other row-set(s).

Tip: You can have intervening operators between the data source
operator and the Joiner (such as an expression operator), but an arbitrarily
complex and non-performing SQL or PL/SQL statement may be generated.
Therefore, a Joiner should immediately follow the data source operators to
be joined in the mapping.

Mapping Operators and Transformations 6-25


Adding Data Flow Operators To A Mapping

If the input row-sets are related by foreign key relationships in the repository, OWB
will use these foreign key relationships to form a default join condition. You can use
this default condition as it is or you can modify it. If the sources are not related by
foreign key relationships, then you must define a join condition.
The join condition property for any output parameter group can be left blank—a
blank condition will not generate a validation error in the expression builder.
However, by leaving the join condition blank, the Joiner operator brings in all of the
columns of the source it references despite of the number of columns actually being
mapped which can increase the overhead in the ETL process. Therefore, you may
want to create a complete join condition for the first input attribute group but leave
the rest blank. The advantage of doing it the first way is that an input attribute
group could be removed and the final join condition would still be correct.
You may define a join condition to relate columns that are not unique or foreign
keys in the source table. However, the performance of the generated query will be
severely degraded. For this case, it might be better to create an index on the desired
column in the source row-set before attempting to run the generated map.
The join condition may contain other relational operators. Again, it is best if the
related operand columns are both indexed in the sources. However, most real-life
applications would have no need for relational operators other than = .
The join condition may contain transform function calls, but if it does the
performance of the generated query may be severely degraded. For this case it
would be better to create a stage table with a column for the transformed column,
populate the stage table with another map, then join the stage table with the other
sources.ee Appendix F, "Performance Enhancements" for more information on the
value of staging tables.
The join condition may contain arithmetic operators to form a special join condition
(for example, LINES.PO_OR_ORDER_ID + 10 = ORD.ORDER_ID). However,
this will also degrade performance because all values from the source table have to
be read and transformed to find the joined rows for a given row. Therefore, it would
be better to create a stage table with the transformed data before joining. See
Appendix F, "Performance Enhancements" for more information on the value of
staging tables.
The join condition expression can not contain any aggregation functions (SUM, etc).
If a join condition expression contains aggregation functions, compile errors will
occur when deploying the generated code for the map.
You may add an unlimited number of input groups to the Joiner. However, only one
output group is allowed.

6-26 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

The Joiner operator contains the following properties:


■ Join Condition (operator level)–The text expression template for the Join
Condition. For code generation, the actual source columns are substituted
for the input attribute names in the expression template. Generally, the
expression should be a legal SQL expression which could be used in a
WHERE clause.
■ Data Type (attributes)–The data type of the attribute.
■ Precision (attributes)–The precision of the attribute (used for numeric type
attributes only).
■ Scale (attributes)–The scale of the attribute (used for numeric type attributes
only).
■ Length (attributes)–The length of the attributes (used for string-type
attributes only).
To add a Joiner to a mapping:
1. Drag a first source operator from the Object Palette and drop it onto the
Mapping Editor Canvas.
2. Drag a second source operator from the Object Palette and drop it onto the
Mapping Editor Canvas.
3. Drag a target operator from the Object Palette and drop it onto the Mapping
Editor Canvas.
4. Drag the Joiner operator from the Object Palette and drop it onto the Mapping
Editor Canvas.

Figure 6–26 The Joiner Icon

5. Connect the INOUTGRP1 attribute group from the first source to the INGRP1
group of the Joiner operator.
OWB automatically create all of the output attributes. The output attribute data
types are set to match the data type of their corresponding input data types.

Mapping Operators and Transformations 6-27


Adding Data Flow Operators To A Mapping

Tip: Rename the input group on the Joiner operator to more


accurately reflect it’s function. For the example, right click on
INGRP1 on the Joiner operator and select menu Rename… from
the popup menu. Enter a new name in the Rename dialog and click
OK

6. Connect the INOUTGRP1 attribute group from the second source operator to
the INGRP2 group of the Joiner operator.

Figure 6–27 The Mapping Editor Showing A Joiner Operator

7. Right-click the title bar of the Joiner operator and select the Operator
Properties… from the popup menu.

6-28 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–28 The Join Operator Property Inspector

8. Click the … button immediately to the right of the Join Condition property.
OWB opens the Expression Builder indicating the default join condition for
what you have mapped.

Mapping Operators and Transformations 6-29


Adding Data Flow Operators To A Mapping

Figure 6–29 The Expression Builder Showing A Join Condition

9. Click Validate.
OWB returns the results in the Validation Results window in Expression
Builder.
10. Click OK.

11. Close the Joiner Operator Property inspector.

12. Select Mapping > Generate > Mapping… from the Mapping Editor menu.
OWB opens the Code Viewer dialog which displays the join condition in the
WHERE clause of the SELECT query for the insert DML.

Adding Sequences
A sequence operator provides numeric data which increments each time it is
referenced. The operator contains a display set named OUTGRP which contains two

6-30 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

parameters called CURRVAL and NEXTVAL and no inputs. You determine which
parameter to use as the output of the sequence operator.
You can generate a row-set of consecutively incremented values using the Sequence
operator. You can connect a Sequence operator to a target operator input or to the
inputs of many other types of down-stream operators. The Sequence operator is one
of the exceptions to the rule that all attributes of an input attribute group must be
connected to attributes from the same output group. You may combine the sequence
outputs with outputs from other up-stream operators .
You can bind a Sequence operator to a repository sequence in one of the repository
modules, but you must reconcile it to that object. The repository sequence must then
be generated and deployed before the map is deployed or the generated package
for the map will have errors.
Sequences are incremented even if rows are not selected. If you want a sequence to
start from the last number, then you should not run your SQL package in Set Based
or in Set Based With Failover operating modes. See Setting The Default Operating
Mode on page 7-28 for more information on configuring mode settings.
The Sequence operator contains the following property:
■ Bound Name (operator level)–The name of the physical sequence that will
be used in the generated code. If the sequence has been reconciled from a
repository component, the Bound Name will be equal to the physical name
of the repository sequence.
To add a Sequence to a mapping:
1. Drag a source operator from the Object Palette and drop it onto the Mapping
Editor canvas.
2. Drag a target operator from the Object Palette and drop it onto the Mapping
Editor canvas.
3. Drag the Sequence icon from the Object Palette and drop it onto the Mapping
Editor Canvas.

Figure 6–30 The Sequence Operator Icon

Mapping Operators and Transformations 6-31


Adding Data Flow Operators To A Mapping

Builder returns the Add Sequence dialog where you can select one of the four
options:
■ If you select Create new repository sequence and bind, then select the
warehouse module where you want to the sequence to reside and click OK.
Builder returns the New Sequence Wizard. Follow the wizard steps to
create a new sequence.
■ If you select Import sequence into repository and bind, then select the
source module from where you are importing the table and click OK.
Builder returns the Database Link Information dialog. Click New DB Link
to establish connection with your source database and click OK. Builder
returns the Import Object Wizard.
■ If you choose Select from existing repository sequence and bind, you can
either type the prefix to search for a sequence or select from the displayed
list of sequences within the selected module and click OK.

Figure 6–31 The Add Sequence Dialog

6-32 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

4. Drag the source operator from the palette onto the map. .
5. Drag the sequence operator from the palette onto the map.
6. Connect the appropriate source attributes to the appropriate target operator
attributes.
7. Connect the sequence to the appropriate attribute in the target.

Figure 6–32 The Mapping Editor Showing A Sequence Operator

8. Select Mapping > Generate > Mapping… from the Module Editor menu.
OWB opens the Code Viewer dialog displaying the sequence in the SELECT list
for the insert DML.

Mapping Operators and Transformations 6-33


Adding Data Flow Operators To A Mapping

Figure 6–33 The Code Viewer Showing A Sequenced Load

Adding External Processes


The external process operator provides the means to represent a process not defined
by OWB in order to incorporate it into OWB’s data flow. The external process
operator comprises a complete, self-contained operation and requires no inputs or
outputs. During code generation, OWB generates a job control code (TCL script) for
external process operators that can be deployed as part of the OWB workflow.
Three types of processes are available in OWB :
■ OS Executable
■ Pure Integrate
■ Pure Extract

6-34 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

External Processes are self-contained; you may not use an external process with
other mapping operators.
To add an External Process operator to a mapping:
1. Drag the External Process icon from the Object Palette and drop it onto the
Mapping Editor Canvas.

Figure 6–34 The External Process Icon

2. Right-click the External Process operator header


OWB returns the External Process Properties inspector.

Figure 6–35 The External Process Property Inspector

3. Click field .

Mapping Operators and Transformations 6-35


Adding Data Flow Operators To A Mapping

4. Select an External Process from the pull down list to the right of the External
Process property
5. Select the map that contains the External process from the navigation tree in the
Warehouse Module Editor.
6. Click Configure.
OWB returns the Configuration Properties inspector.

Figure 6–36 The External Process Configuration Properties Inspector

7. Expand the Steps property and specify the process’ directory location and input
parameters or, in case of Pure Extract, the status file name.

Adding Data Generators


You use a Data Generator operator to provide pseudo-column information. It allows
for downstream mapping of information such as record number, system date, and
sequence values. It also provides a place to enter constant information. The Data

6-36 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Generator operator connects the mapping in OWB to SQL*Loader to generate the


data stored in the database record, rather than reading it from a datafile. The
following functions are available:
■ RECNUM
■ SYSDATE
■ SEQUENCE
It is possible to for OWB to generate data by specifying only sequences, record
numbers, system dates, and constants as field specifications. SQL*Loader inserts as
many records as are specified by the LOAD keyword.

Setting a Column to the Datafile Record Number


Map the RECNUM keyword to an attribute to set that attribute to the number of the
logical record from which that record was loaded. Records are counted sequentially
from the beginning of the first datafile, starting with record 1. RECNUM is
incremented as each logical record is assembled. Thus it increments for records that
are discarded, skipped, rejected, or loaded. For example, if you use the option
SKIP=10, the first record loaded has a RECNUM of 11.

Setting a Column to the Current Date


A column specified with SYSDATE gets the current system date, as defined by the
SQL language SYSDATE function.
The target column must be of type CHAR or DATE. If the column is of type CHAR,
then the date is loaded in the form ’dd-mon-yy.’ After the load, it can be accessed
only in that form. If the system date is loaded into a DATE column, then it can be
accessed in a variety of forms that include the time and the date. A new system
date/time is used for each array of records inserted in a conventional path load and
for each block of records loaded during a direct path load.

Setting a Column to a Unique Sequence Number


The SEQUENCE keyword ensures a unique value for a particular column.
SEQUENCE increments for each record that is loaded or rejected. It does not
increment for records that are discarded or skipped.

Mapping Operators and Transformations 6-37


Adding Data Flow Operators To A Mapping

The combination of column name and the SEQUENCE function is a complete


column specification.
Table 6–1 The Sequence Value Options
Value Description
column_name The name of the column in the database to which to assign the
sequence.
SEQUENCE Use the SEQUENCE keyword to specify the value for a
column.
integer Specifies the specific sequence number to begin with.
COUNT The sequence starts with the number of records already in the
table plus the increment.
MAX The sequence starts with the current maximum value for the
column plus the increment.
incr The value that the sequence number is to increment after a
record is loaded or rejected.

If a record is rejected (that is, it has a format error or causes an Oracle error), the
generated sequence numbers are not reshuffled to mask this. For example, if four
rows are assigned sequence numbers 10, 12, 14, and 16 in a particular column, and
the row with 12 is rejected; the three rows inserted are numbered 10, 14, and 16, not
10, 12, 14. This allows the sequence of inserts to be preserved despite data errors.
When you correct the rejected data and reinsert it, you can manually set the
columns to agree with the sequence.
The Data Generator operator has only one output group. The Data Generator
operator has predefined attributes corresponding to Record Number, System Date,
and a typical Sequence. Modification of these attributes is not recommended but
you can create new attributes. You must ensure the value entered for the expression
is valid SQL*Loader syntax in the context used. There can be at most one Data
Generator operator for a given map. The Data Generator operator is only valid for
an SQL*Loader mapping.
The Data Generator contains the following properties:
■ Expression (common attribute property)–expression to use when this
attribute is mapped. It is the responsibility of the user to ensure this
expression contains valid SQL*Loader syntax for where the attribute is
used.
To add a Data Generator to a mapping:

6-38 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

1. Drag the Data Generator icon from the Object Palette and drop it onto the
Mapping Editor Canvas.

Figure 6–37 The Data Generator Icon

2. Right-click the RECNUM attribute.


3. Select Attribute Properties... from the popup menu.
OWB returns the RECNUM Attribute Properties inspector.

Figure 6–38 The RECNUM Attribute Properties Inspector

4. Click on field to the right of Expression.


5. Click the ... button located on the right side of the field.
OWB returns the Expression Builder.
6. Use Expression Builder to define an Expression for RENUM.
7. Repeat steps two through six for the SYS_DATE and SEQUENCE attributes if
necessary.

Mapping Operators and Transformations 6-39


Adding Data Flow Operators To A Mapping

Adding Expressions
The expression operator enables you to write SQL expressions, each of which
defines a non-procedural algorithm for one output parameter of the operator. The
expression text can contain combinations of input parameter names, variable
names, and library functions. You use the Expression operator to transform the
column value data of rows within a row-set using SQL-type expressions, while
preserving the cardinality of the input row-set. To create these expressions, you
open the Attribute Property inspector for the output attribute and open Expression
Builder.
You may have only one input attribute group and one output attribute group in the
Expression operator, both of which are created automatically when you drop it on
the Mapping Editor canvas.
The output expressions for this operator can not contain any aggregation functions.
To use aggregation functions, use the Aggregator operator.
The Expression operator contains the following properties:
■ Data Type (attributes)–The data type of the attribute.
■ Precision (attributes–The precision of the attribute (used for numeric type
attributes only).
■ Scale (attributes)–The scale of the attribute (used for numeric type attributes
only).
■ Length (attributes–The length of the attributes (used for string-type attributes
only).
■ Expression (output attributes)–The text expression template for the output
attribute. For code generation, the actual source columns are substituted for the
input attribute names in the expression template.
To add an expression operator:
1. Drag source operator from the Object Palette and drop it onto the Mapping
Editor Canvas.
2. Drag a target operator from the Object Palette and drop it onto the Mapping
Editor Canvas.
3. Drag the Expression operator from the Object Palette and drop it onto the
Mapping Editor Canvas.

6-40 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–39 The Expression Icon

4. Connect the appropriate source attributes to the appropriate target table


attributes.
5. Connect the appropriate source attributes to the INGRP of the Transformation
Operator. This automatically creates the input attributes.
6. Create an output attribute named OUTPUT1 in the Expression operator output
attribute group.
■ Right-click OUTGRP.
■ Select Add/Remove Attributes from the popup menu.
■ Click Add.
■ Click OK.
7. Select the OUTPUT1 attribute, right-click it, and select the Attribute Properties
from the popup menu.

Mapping Operators and Transformations 6-41


Adding Data Flow Operators To A Mapping

Figure 6–40 The Attribute Properties Inspector

8. Open Expression Builder to edit the expression for the attribute.


■ Click on the … button immediately to the right of the Expression property.
■ Create an expression by using the Inputs tree, the expression operator
buttons, or type in the expression manually.

6-42 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–41 The Expression Builder For Defining An Expression

9. Click Validate. You should see a message in the Validation results window
reading Validation Successful!.
10. Click OK to close Expression Builder.
11. Close the attribute property editor.

12. Connect OUTPUT1 in the Expression output attribute to the appropriate target
attribute.

Mapping Operators and Transformations 6-43


Adding Data Flow Operators To A Mapping

Figure 6–42 The Mapping Editor Showing An Expression Operator

13. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the expression.

Adding Constants
You can define constants for use in the mapping through the constant operator.
These constants are initialized at the beginning of the execution of the mapping and
these values can be used as inputs to pre-mapping process, post-mapping process,
mapping output parameter and other operators in the data flow.
The constant operator can have only one output attribute group. This group can be
connected to any target input or input/output attribute group. If the constant
defined is of data type VARCHAR or VARCHAR2, its expression needs to be a valid

6-44 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

SQL expression returning a value of data type VARCHAR or VARCHAR2. In the


case for a simple constant string literal, it needs to be within single quotes.
The Constant operator contains the following properties:
■ Expression (attribute level)–This property defines the constant value
represented by the attribute. It needs to be a valid SQL or PL/SQL
expression returning a value that is of the same data type of the attribute.
To add a constant operator:
1. Drag source operator from the Object Palette and drop it onto the Mapping
Editor Canvas.
2. Drag a target operator from the Object Palette and drop it onto the Mapping
Editor Canvas.
3. Drag the Constant icon from the Object Palette and drop it onto the Mapping
Editor Canvas.

Figure 6–43 The Constant Icon

4. Connect the appropriate source attributes to the appropriate target table


attributes.
5. Connect the appropriate source attributes to the INGRP of the Transformation
Operator. This automatically creates the input attributes.
6. Create an output attribute named OUTPUT1 in the Expression operator output
attribute group.
■ Right-click OUTGRP.
■ Select Add/Remove Attributes from the popup menu.
■ Click Add.
■ Click OK.
7. Select the OUTPUT1 attribute, right-click it, and select the Attribute Properties
from the popup menu.

Mapping Operators and Transformations 6-45


Adding Data Flow Operators To A Mapping

Figure 6–44 The Attribute Properties Inspector

8. Open Expression Builder to edit the expression for the attribute.


■ Click on the … button immediately to the right of the Expression property.
■ Create an expression by using the Inputs tree, the expression operator
buttons, or type in the expression manually.

6-46 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–45 The Expression Builder For Defining A Constant

9. Click Validate. You should see a message in the Validation results window
reading Validation Successful!.
10. Click OK to close Expression Builder.

11. Close the attribute property editor.

12. Connect OUTPUT1 in the Constant output attribute to the appropriate target
attribute.

Mapping Operators and Transformations 6-47


Adding Data Flow Operators To A Mapping

Figure 6–46 The Mapping Editor Showing Constant Operator

13. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the constant.

6-48 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–47 The Code Viewer For A Constant

Adding Transformations
You use the Transformation Operator to transform the column value data of rows
within a row-set using a PL/SQL function, while preserving the cardinality of the
input row-set.
The Transformation Operator must be bound to a function or procedure contained
by one of the modules in the repository. The inputs and outputs of the
Transformation Operator will correspond to the input and output parameters of the
bound repository function or procedure. Also, if the Transformation Operator is
bound to a function, a "result" output is added to the operator that corresponds to
the result of the function. The bound function or procedure must be generated and
deployed before the mapping can be deployed, unless the function or procedure
already exists in the repository.

Mapping Operators and Transformations 6-49


Adding Data Flow Operators To A Mapping

When you place a transformation operator onto the Mapping Editor Canvas, a
selection dialog opens displaying a tree of function libraries, categories, functions
and procedures. You pick a given function or procedure from the list and the
operator appears on the Mapping Editor Canvas with the input and output
parameters predefined.
OWB provides a set of pre-defined PL/SQL library functions that already exist in
the installed run-time schema, any of which can be selected as a bound function
when dropping a Transformation Operator on a mapping. In addition, you may
choose a function or procedure from the Global Shared Library.
The Transformation operator contains the following properties:
■ Function Call (operator level, read-only)–This is the text template for the
function call that will be generated by the code generator for the function call,
with the operator attribute names listed as the calling parameters. For the actual
call, the operator attribute names will be replaced with the actual source or
target columns that are connected to the attributes.
■ Function Name (operator level, read-only)–The name of the function (or
procedure) to which this operator is bound.
■ Procedure (operator level, read-only)–A boolean value indicating, if true, that
the bound transform is a procedure rather than a function and as such, it gives
no returned value
■ Data Type (attributes, read-only)–Indicates the data type of the input, output, or
result parameter of the bound function which corresponds to the given
attribute.
■ Default Value (input attributes, read-only)–The default value (blank if none) for
the given attribute.
■ Optional Input (input attributes, read-only)–A boolean value indicating, if true,
that the given attribute is optional. If the attribute is optional, it does not need
to be connected in the mapping.
■ Function Return (output attributes, read-only)–A boolean value indicating, if
true, that the given output attribute is the result attribute for the function. The
result attribute is normally named result, but this property exists to avoid
confusion in case there is another output named result, or the user changes the
name of the result output.
To add a transformation operator:
1. Drag a source operator from the Object Palette onto the Mapping Editor canvas.

6-50 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

2. Drag a target operator from the Object Palette onto the Mapping Editor canvas.
3. Drag a Transformation operator from the Object Palette onto the Mapping
Editor canvas.

Figure 6–48 The Transformation Operator Icon

The editor returns the Add Transformation page.

Figure 6–49 The Add Transformation Dialog

Mapping Operators and Transformations 6-51


Adding Data Flow Operators To A Mapping

4. Select one of the three options by clicking it. See "Adding Sequences" on
page 6-30 for information about each option.
■ Create a new transformation repository and bind
■ Import existing transformation into repository and bind
■ Select from existing repository transformation and bind
This selection contains a search text box and a directory tree for all the
transforms stored in the OWB repository.
5. Click on the appropriate node to locate a Transformation function or procedure.
6. Double-click on a transformation to select it.
OWB returns to the Mapping Editor displaying a transformation operator

Figure 6–50 The Transformation Operator

7. Connect the appropriate source attributes to the appropriate target table


attributes for your application.
8. Connect the appropriate source attributes to the inputs of the Transformation
Operator.
9. (Optional step) Select one of the inputs, right-click it, and select the Attribute
Properties from the popup menu.
OWB opens the Attribute Properties inspector.

6-52 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–51 The Attribute Properties Inspector

■ Select an input attribute.


■ Notice that the Optional Parameter property is true. If it reads true, then
you need not connect the input parameter.
■ Close the attribute property inspector.
10. Connect the Transformation operator output attributes to the pirate target
attributes.

Mapping Operators and Transformations 6-53


Adding Data Flow Operators To A Mapping

Figure 6–52 The Mapping Editor Showing A Transformation Operator

11. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the transformation.

Adding Mapping Input Parameters


An input parameter operator enables you to pass parameter values into a mapping.
These values can then be used to affect the actions of a mapping. The input
parameter has a cardinality of one and effectively creates a single row-set that can
be combined with another row-set as input to a downstream operator.
The names of the input attributes become the names of the mapping output
parameters. The parameters can be used by connecting the attributes of the
mapping input parameters operator within the mapping editor. There can be at

6-54 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

most one mapping input parameter operator and one mapping output parameter in
a given mapping.
The default value for the mapping parameter for code generation of the PL/SQL
"main" function will appear in the DEFAULT clause following the function
parameter declarations in the generated "main function definition in the PL/SQL
package. For example, if a mapping parameter named param1 with data type
VARCHAR2 is defined, with a default value of ’HELLO’, the generated main
function in the PL/SQL package will appear as:
... param1 IN VARCHAR2 DEFAULT ’HELLO’ ...
Or, if a mapping parameter output named "param1" with data type VARCHAR2 is
defined the generated main function in the PL/SQL package will appear as:
... param1 IN VARCHAR2 ...
The Mapping Input operator contains the following properties:
■ Default Value (attribute level–The character string value which, if specified, will
be place in the generated code as the default value for the specified attribute: i.e.
if the value entered is ‘1-JUN-2001’ then the generated code would contain …
DEFAULT ‘1-JUN-2001’
■ Data Type (common attribute level)–Specifies the data type for this input
parameter
The following instructions assume you have already mapped a source operator to a
target operator.
To add an input parameter to a mapping:
1. Drag a Mapping Input operator from the Object Palette onto the Mapping
Editor Canvas.

Figure 6–53 The Mapping Input Operator

2. Add an attribute appropriate for your mapping to the Mapping Input operator:
■ Right-click the MAP_INPUT attribute group.

Mapping Operators and Transformations 6-55


Adding Data Flow Operators To A Mapping

■ Select Add/Remove Attributes from the popup menu.


■ Add a name for the attribute in the Add/Remove Attributes dialog.
■ Click OK.

Figure 6–54 The Add/Remove Attributes Dialog

3. Change the Data Type for the new attribute as appropriate for your application
by using the attribute properties Inspector:
■ Right-click the new property.
■ Select Attribute Properties... from the popup menu.
■ Select a new property from the pulldown list.

6-56 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–55 The Attribute Properties Inspector

4. Map the MAP_INPUT attribute to the INOUTGRP1 of the appropriate target


operator.

Mapping Operators and Transformations 6-57


Adding Data Flow Operators To A Mapping

Figure 6–56 The Mapping Editor Showing An Input Parameter Operator

5. If necessary, edit target attribute’s condition to match the new attribute in the
Input Mapping operator.
6. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the main procedure entry
point to the mapping containing the parameter.

6-58 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–57 The Code Viewer Showing A Mapping Input Parameter

Adding Mapping Output Parameters


You can use a Mapping Output Parameter operator to pass values out of a
mapping.
The Output Parameter operator must have exactly one Input attribute group. There
can be at most one Output Parameter operator for a given map. Only attributes not
associated with an actual row set may be mapped into an Output Parameter, i.e.
Constant, Input Parameter, output from a Pre Process, or output from a Post
Process. An Output Parameter operator is not valid for an SQL*Loader mapping.
The default value for the mapping parameter for code generation of the PL/SQL
main function will appear in the DEFAULT clause following the function parameter
declarations in the generated main function definition in the PL/SQL package. For
example, if a mapping parameter named param1 with data type VARCHAR2 is

Mapping Operators and Transformations 6-59


Adding Data Flow Operators To A Mapping

defined, with a default value of ’HELLO’, the generated main function in the
PL/SQL package will appear as:
... param1 OUT VARCHAR2 DEFAULT ’HELLO’ ...
Or, if a mapping parameter output named param1 with data type VARCHAR2 is
defined the generated main function in the PL/SQL package will appear as:
... param1 OUT VARCHAR2 ...
The Mapping Output Parameter operator contains the following properties:
■ Data Type (common attribute level)–Specifies the data type for this output
parameter
■ Bound Name (common attribute level)–Specifies the actual physical name for
this output parameter
The following instructions assume you have already created a mapping.
To add an Output parameter to a mapping:
1. Drag a Mapping Output operator from the Object Palette onto the Mapping
Editor Canvas.

Figure 6–58 The Mapping Output Operator

2. Add an output attribute to the MAP_OUTPUT operator.


■ Right-click the MAP_OUTPUT attribute group.
■ Select Add/Remove Attributes from the popup menu.
■ Add a name for the attribute in the Add/Remove Attributes dialog.
■ Click OK.

6-60 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–59 The Add/Remove Attributes Dialog

3. Change the data type of the new attribute to as appropriate for your application
by using the Attribute Properties inspector.
■ Right-click the new property.
■ Select Attribute Properties... from the popup menu.
■ Select a new property from the pulldown list.

Figure 6–60 The Attribute Properties Inspector

Mapping Operators and Transformations 6-61


Adding Data Flow Operators To A Mapping

4. Connect the MAP_OUTPUT attribute to the INOUTGRP1 of the appropriate


target operator.

Figure 6–61 The Mapping Editor Showing An Output Parameter Operator

5. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the main procedure exit point
to the mapping containing the parameter.

6-62 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–62 The Code Viewer Window Showing An Output Parameter

Adding A Pre-Mapping Process


The Pre-Mapping Process operator is a specific kind of operator. It calls a function
or procedure (whose metadata is defined in OWB) prior to the start of map
execution. Connections are restricted to constants or to output attributes of a
Mapping Input Parameter operator. The output parameter group provides the
connection point for the returned value (if implemented via a function) and the
output parameters of the function or procedure. There are no restrictions on the
connection of these output attributes
When you drop a Pre-Mapping Process operator onto the Mapping Editor Canvas a
dialog box opens in which a tree of all the available libraries, categories, functions
and procedures. You chose a function or procedure from the tree, and the operator
appears with all the correct input and output parameters predefined.

Mapping Operators and Transformations 6-63


Adding Data Flow Operators To A Mapping

The Pre-Mapping Process operator has attribute groups corresponding to the


number and direction of the parameters associated with the PL/SQL procedure or
function selected. This list of groups and attributes are not modifiable through any
other means than reconciliation.
There can be at most one Pre-Mapping Process operator for a given map. Only
constants, mapping input parameters, and output from a Pre-Mapping Process may
be mapped into a Post Process operator.

Notes:
■ Only components that have a "dummy" source can be input to Triggers
(both pre & post). This means, Constants, and Mapping Input
Parameters can be input to both Pre & Post Triggers.
■ Mapping Input Parameters work like Constants, they can be mapped
into anything that a constant could.
■ Mapping Output Parameters cannot be mapped TO anything, but can
be mapped FROM either Constants, Mapping Input Parameters, or the
Output of a Pre or Post Map Trigger (including the return value).
■ Violation of these rules is reported at generation time.

To add a pre-mapping process operator to a mapping:


1. Drag a Pre-Mapping Process operator from the Object Palette onto the Mapping
Editor canvas.

Figure 6–63 The Pre-Mapping Process Operator

2. Select the appropriate procedure from the selection list.

6-64 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–64 The Pre-Mapping Process Selection List

3. Connect the output attribute of the Pre-Mapping Process operator to the


INOUTGRP1 of the appropriate target operator.

Mapping Operators and Transformations 6-65


Adding Data Flow Operators To A Mapping

Figure 6–65 The Mapping Editor Showing A Pre-Mapping Process Operator

4. You may choose to rename the operator.


■ Right-click the operator header.
■ Select Rename from the popup menu
■ Enter a new name
■ Click OK.

6-66 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–66 The Rename Component Dialog

5. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the pre-mapping process.

Figure 6–67 The Pre-Mapping Process Code Viewer Window

Mapping Operators and Transformations 6-67


Adding Data Flow Operators To A Mapping

Adding A Post-Mapping Process


The Post-Mapping Process operator is a specific kind of operator. It calls a function
or procedure (whose metadata is defined in OWB) after the end of a map execution.
Connections are restricted to constants or to output attributes of a Mapping Output
Parameter operator. The output parameter group provides the connection point for
the returned value (if implemented via a function) and the output parameters of the
function or procedure. There are no restrictions on the connection of these output
attributes
The Post-Mapping Process operator has attribute groups corresponding to the
number and direction of the parameters associated with the PL/SQL procedure or
function selected. This list of groups and attributes are not modifiable through any
other means than reconciliation.
There can be at most one Post-Mapping Process operator for a given map. Only
constants, mapping input parameters, and output from a Post-Mapping Process
may be mapped into a Post-Mapping Process operator. The Post-Mapping Process
operator is not valid for an SQL*Loader mapping.

Notes:
■ Only components that have a "dummy" source can be input to Triggers
(both pre & post). This means, Constants, and Mapping Input
Parameters can be input to both Pre & Post Triggers.
■ Mapping Input Parameters work like Constants, they can be mapped
into anything that a constant could.
■ Mapping Output Parameters cannot be mapped TO anything, but can
be mapped FROM either Constants, Mapping Input Parameters, or the
Output of a Pre or Post Map Trigger (including the return value).
■ Violation of these rules is reported at generation time.

To add a post-mapping process operator to a mapping:


1. Drag a Post-Mapping Process operator from the Object Palette onto the
Mapping Editor canvas.

6-68 Oracle Warehouse Builder 3i User’s Guide


Adding Data Flow Operators To A Mapping

Figure 6–68 The Post-Mapping Process Operator

2. Select the appropriate procedure from the selection list.

Figure 6–69 The Add Transformation Window Used For Selecting a Post-Process
Mapping Operator

3. Connect the output attribute of the Pre-Mapping Process operator to the


INOUTGRP1 of the appropriate target operator.

Mapping Operators and Transformations 6-69


Adding Data Flow Operators To A Mapping

Figure 6–70 The Mapping Editor Showing A Pre-Mapping Process Operator

4. You may choose to rename the operator.


■ Right-click the operator header.
■ Select Rename from the popup menu
■ Enter a new name
■ Click OK.

Figure 6–71 The Rename Component Dialog

6-70 Oracle Warehouse Builder 3i User’s Guide


Taking The Next Step

5. Select Mapping > Generate > Mapping… from the Mapping Editor main
menu.
OWB opens the Code Viewer window displaying the post-mapping process.

Taking The Next Step


This chapter described how to add flow operators to a mapping and transform data
as it moves from source to target. It also described how you can use standard
transformations selected from the Oracle Library, custom transformations for a
specific need, pre-packaged SQL operations, or imported PL/SQL procedures.
This chapter marks the end of the definition phase and the beginning of the
configuration for generation phase for building a warehouse. The next chapter
describes how to reconcile a mapping, validate the mapping, configure the physical
properties for a mapping, and define code generation strategies.

Mapping Operators and Transformations 6-71


Taking The Next Step

6-72 Oracle Warehouse Builder 3i User’s Guide


7
Mapping Configuration and Code
Generation

The previous two chapters described how to define a mapping, how to add
operators, transformations, and external processes, how to edit a mapping, and how
a mapping generates the code necessary to load your data warehouse. This chapter
describes the tasks necessary to configure the physical properties of a mapping, and
how to manage code generation. It also provides an in depth discussion of
reconciling mapping operators with repository objects, and mapping validation.
This chapter contains the following sections:
■ Reconciling Mapping Operators With Repository Objects
■ Configuring The Mapping For Deployment
■ Defining Code Generation Strategies For The Mapping
■ Setting A SQL*Loader Step
■ Setting An External Process Step
■ Taking The Next Step

Mapping Configuration and Code Generation 7-1


Reconciling Mapping Operators With Repository Objects

Reconciling Mapping Operators With Repository Objects


Once you have selected the source and target objects, configured their properties,
and linked the operators, you may need to reconcile the mapping objects with their
corresponding repository objects. After reconciliation, you are ready to configure
the physical properties of your mapping.

Reconciling Mappings
Mapping operators are independent from the repository objects to which they refer.
The process of linking a mapping operator to a repository object is known as
binding. Binding a mapping operator links it to a repository object both by unique
object identifier and by physical name at the object and attribute levels. If you look
at the Bound Name property of the mapping operator or the Bound Name property
of any of its attributes you will see that these are the physical names of the
corresponding repository object and its attributes. Additionally you can identify the
repository object to which a mapping operator is bound by looking at the tool tip
for the mapping operator; the part in parentheses gives the qualified physical name
of the repository object. The logical names used in the mapping for both mapping
operators and attributes do not need to be the same as the bound names. If you set
your Project Preferences to Logical name mode without propagation to physical
names or if you define your mapping operator and attribute names in the Mapping
Editor then the logical names will generally be different. See
Within the Mapping Editor there are several methods of binding a mapping
operator to a repository object. Some of these methods relate to the original creation
of the mapping operator and some relate to reconciliation—inbound or
outbound—after either the mapping operator or the repository object has been
changed. You reconcile mapping operator attributes with repository attributes using
the Inbound Reconciliation dialog. The Inbound Reconcile Operator Window

7-2 Oracle Warehouse Builder 3i User’s Guide


Reconciling Mapping Operators With Repository Objects

Using this mechanism, you can:


■ capture structural changes applied to the associated object in the repository
and propagate these to the mapping object.
■ associate the mapping object to a repository object of the same type
■ associate the mapping object to a repository object of a different type.
You can do all this while still preserving the connections with other mapping
objects. For example, a mapping table operator can be reconciled with new and
removed columns for a table in the repository from which it was derived.

More About Naming Mapping Objects


Generally speaking, all interaction with objects inside the mapping environment
use the logical name. The physical name, which is used for code generation, is
available as the (logical) property Bound Name in those cases where the user
manages the name. For objects brought in to the mapping environment, the
reconciliation process will maintain the sanctity of the original physical names and
attempt to do so with the logical name. Objects created or renamed manually inside
the mapping will present the user with any validation issues and not attempt any

Mapping Configuration and Code Generation 7-3


Reconciling Mapping Operators With Repository Objects

sort of automatic name fixing. Physical names (Bound Name ) edited inside the
mapping will be in upper case.
Logical names are used as the displayed identifier of all components, groups,
attributes, and display sets in the mapping environment. Logical names are always
case sensitive. Multiple mapping objects with the same logical name may be placed
on the map as long as their internal constraints allow it. Mapping objects that can be
reconciled must have unique logical names. In the event that a new reconcilable
mapping object would end up with the same name as an existing mapping object, a
new unique name will be created. For example, if creating a mapping table
Employee is attempted from two different installed modules, the automatic
correction algorithm described later will be used to create an alternate logical name
for the second table. Group, attribute, and display set names must be unique within
the containing element. For manual processes (create/rename) the user will be
required to enter a correct name. For batch processes (reconciliation/system
creation/copy and map), this may mean that the automatic correction algorithm
described in the detail section will be used to create an alternate logical name.
Physical names (or Bound Names) are used by the generation framework to
produce the mapping code. Physical names will be case preserved during the
reconciliation process, but will be in upper case if created or modified in the
mapping environment.This is specifically consistent with the behavior if the
integrator framework, i.e., import preserves case, edit does not. Multiple mapping
objects with the same physical name may be placed on the map as long as their
internal constraints allow it. [See the individual operator descriptions later in this
chapter.] Group, attribute, and display set names must be unique within the
containing element. For "copy and map", the automatic algorithm described later
will be used to create a compliant physical name. For all other cases, this may mean
that namespace validation will fail and the user must take corrective action.
The name correction algorithm (when enabled) is:
1. Truncate the name to ensure the total length of the proposed name and any
suffix does not exceed the maximum allowed length.
2. (Physical) Replace illegal characters by underscore.
3. (Physical) Trim leading & trailing spaces.
4. (Physical) Prefix proposed name with A if 1st character is illegal.
5. Add_n to the proposed name, where n is the first number in ascending
order that would make the resulting name unique in its domain.
6. Repeat the first steps until both criteria are met.

7-4 Oracle Warehouse Builder 3i User’s Guide


Reconciling Mapping Operators With Repository Objects

For Transformation Functions, a special name correction is always active:


■ (Physical) Prefix reserved word names with X_

Using Inbound Reconciliation


You can reconcile an inbound operator by name, position, or object identifier match.
You can also use a combination of the above three methods. The most common use
of inbound reconciliation is to update a mapping operator to align with changes in
its referenced repository object. The other less common options for inbound
reconcile are discussed later.
To start reconciliation, select the mapping operator on the canvas and:
■ Select Edit > Reconcile menu item from the menu bar or
■ Right mouse-click the header of the mapping operator and select the
Reconcile menu item from the popup menu.
OWB will then launch the Reconcile dialog box. The Reconcile dialog box enables
you to select the object based on the references internally maintained that points to
the corresponding repository column/field from where the mapping attribute
derives its definition. Note that operators of a certain origin (table, file) can be
reconciled with a different repository object type (view, etc.)

Inbound Reconciliation Strategies


Reconciliation strategies are instructions to the inbound (and outbound)
reconciliation process on how to match the mapping operator with the repository
object to achieve the desired binding. There are three matching options that can be
used individually or in conjunction by clicking one or more checkboxes. At least
one checkbox must be checked to perform reconciliation.

Matching By Object Identifier


This strategy uses the unique object identifiers to determine the correlation between
the mapping operator attributes and the columns / fields / parameters of the
selected repository object. On inbound reconciliation, attributes of the mapping
operator that could not be matched with those of the repository object are removed.
This may happen if an attribute was added to the mapping operator and not
reconciled or a column was removed from the repository object before
reconciliation. When an attribute is removed, any incoming or outgoing mapping
line connected to that attribute will be removed from the canvas. Attributes of the
selected repository object that could not be matched with those of the mapping

Mapping Configuration and Code Generation 7-5


Reconciling Mapping Operators With Repository Objects

operator are added as new attributes at the end of the mapping operator. Mapping
lines for matched attributes are preserved.
Use Match by object identifier if you want to keep your mapping operators in step
with changes to the bound repository object and you want to maintain separate
logical names for your mapping operator attributes regardless of changes to
physical names in the repository object.
Match by object identifier is not available if you want to reconcile to a different
repository object and this check box is grayed out when you select a different object
in the tree. In this case the following two strategies are available.

Figure 7–1 Inbound Reconcile Window Using Match By Object Identifier

Matching By Physical (Bound) Name


This strategy uses matching between the bound names of the mapping operator
attributes and the physical names of the columns / fields / parameters of the
repository object to perform the reconciliation. Matching is case sensitive. On
inbound reconciliation, attributes of the mapping operator that could not be
matched with those of the repository object are removed. (When an attribute is
removed, any incoming or outgoing mapping line connected to that attribute will

7-6 Oracle Warehouse Builder 3i User’s Guide


Reconciling Mapping Operators With Repository Objects

be removed from the canvas.) Attributes of the selected repository object that could
not be matched with those of the mapping operator are added as new attributes to
the mapping operator. Mapping lines for matched attributes are preserved.
Bound names are read-only after you have bound a mapping operator to a
repository object so it is not possible to manipulate these to achieve a different
match result in inbound reconciliation.
Use Match by physical name as a strategy for reconciliation with the current bound
repository object if you want to maintain equivalence of physical names and logical
names in your mapping operators. This aids clarity when comparing mappings
with generated code but has the limitations associated with physical names. Note
that use of this reconciliation strategy will treat the rename of a column in the
repository object as if the column was deleted and a new column inserted.
Therefore mapping lines for renamed attributes will be removed.
Use Match by physical name as a strategy for inbound reconciliation with a
different repository object:
■ if there have been any deletions or insertions of columns / fields /
parameters in the repository object which would change the structure of the
mapping operator. or
■ if you want to maintain physical names in your mapping operators and you
use the same names consistently across objects

Mapping Configuration and Code Generation 7-7


Reconciling Mapping Operators With Repository Objects

Figure 7–2 Inbound Reconcile Using ‘Match By Name’

Matching By Position
This strategy matches mapping operator attributes with columns / fields /
parameters of the selected repository object by position; that is the first attribute of
the mapping operator is reconciled with the first attribute of the repository object,
the second with the second, and so on. If the mapping operator has more attributes
than the repository object then the excess attributes are removed from the mapping
operator (When an attribute is removed, any incoming or outgoing mapping line
connected to that attribute will be removed from the canvas ). If the selected
repository object has more attributes than the mapping operator then these are
added as new attributes at the end of the mapping operator. Mapping lines for
existing attributes in the mapping operator are preserved.
As a strategy for inbound reconciliation with the current bound repository object
Match by position behaves in a similar way to Match by object identifier under
normal circumstances. Only if the repository object has undergone a lot of changes
involving deletion and recreation of existing attributes will there be a discernible
difference. Your choice will depend on which is more important to you:
■ preserving the mapping operator’s relationship with other mapping
operators—use Match by object identifier, or

7-8 Oracle Warehouse Builder 3i User’s Guide


Reconciling Mapping Operators With Repository Objects

■ keeping the mapping operator structure in line with the repository object
structure—use Match by position.
Use Match by position as a strategy for reconciliation with a different repository
object if you want to preserve the logical names of your mapping operator
attributes. This strategy is most effective when the only changes to the repository
object are the addition of extra columns / fields / parameters at the end of the
object. Otherwise you may need to perform some editing of the mapping to
re-connect mapping lines to the relevant attributes.

Figure 7–3 Inbound Reconcile Using ‘Match By position’

When none of the "match by" checkboxes are checked, the reconcile process will
replace the attributes of the operator with an exact copy of the column/fields of the
selected repository object.
When you select multiple checkboxes, the following priority order in types of
matching will be used
1. Match by object identifier
2. Match by position,

Mapping Configuration and Code Generation 7-9


Reconciling Mapping Operators With Repository Objects

3. Match by name.
Reconciliation is supported for the following operator types:
Table 7–1 The Operator Objects Reconciled With Repository Objects
Operator Object Repository Object
Mapping Tables Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Views Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Materialized Table, Views, Materialized Views, Sequences, Files, Dimensions
Views and Facts.
Mapping Sequences Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Flat Files Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Dimensions Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Facts Table, Views, Materialized Views, Sequences, Files, Dimensions
and Facts.
Mapping Transformations Transformations only (not for OWB 3i).

In addition to reconciling the attributes of an Operation, the reconciliation process


may also update additional logical properties of an Operator; for example for a Flat
File operator, information about the character set, filename will be refreshed as well.

Using Outbound Reconciliation


There are two main uses of outbound reconciliation. The first is to create a new
repository object with the same structure and properties as a mapping operator
created in the Mapping Editor. For example, used in conjunction with the copy and
map feature this is a very quick way of creating repository definitions of staging
tables. The second use of outbound reconciliation is the inverse of that of inbound
reconciliation; that is to update an existing repository object in line with changes in
the mapping operator.
You can create new mapping objects or update existing objects in the repository and
propagate the structure from mapping operators to the repository objects by using
the Outbound Reconciliation dialog. Using this dial you can create/update object in

7-10 Oracle Warehouse Builder 3i User’s Guide


Reconciling Mapping Operators With Repository Objects

the repository whose structure (columns, data types, etc.) are derived from the
mapping operator.
■ Automatically create a new object in the repository that matches the
structure of the Mapping Operator.
■ Propagate changes in the attributes of a Mapping Operator to the repository
object from which it was originally derived.
■ Copy and map the attributes of one Operator with a second Operator and
propagate these changes to the repository object associated with the second
Operator.
■ Perform a create-like function to create a new Operator in the Mapping
Editor and a new associated object in the repository.
To start Outbound Reconcile, you select an eligible operator on the canvas and
■ Select Edit > Reconcile Outbound menu item from the menu bar or
■ Right mouse click on the header of the Operator and select Reconcile
Outbound menu item from the popup menu.
OWB will then launch the Outbound Reconcile dialog box.

Mapping Configuration and Code Generation 7-11


Reconciling Mapping Operators With Repository Objects

Figure 7–4 The Outbound Reconciliation dialog

The following Mapping Operators are eligible for Outbound Reconcile:


Table 7–2 The Outbound Reconcile Operators
Operator Type Notes
Table Creates or updates an table object in the repository. Attributes
and data-type information are copied as columns of the table.
Constraint properties are not copied.
View Creates or updates an view object in the repository. Attributes
and data-type information are copied as columns of the view.
Materialized View Creates or updates an materialized view object in the
repository. Attributes and data-type information are copied as
columns of the materialized view. Constraint properties are not
copied.
Transformation Creates or updates a function object in the repository Input
attributes and data-type information are copied as input
parameters of the function. Output attribute and data-type
information is copied as return specification for the function.

7-12 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

You can use the outbound reconcile feature to create new objects or update existing
objects in the repository that are derived from a mapping operator. After you have
created a mapping operator, you can copy and map its attributes into a new
operator. You can then create a new corresponding repository object that inherits
the same properties.
Select an operator on the mapping canvas and choose Edit > Reconcile Outbound
and
1. Define a mapping flat file operator and its attributes on the Mapping Editor
Canvas.
2. Create a new unbound mapping table operator with no attributes.
3. Copy and map all the attributes of the mapping flat file Operator to the
Mapping Table. You can do this by
■ left-clicking and dragging the mapping lines across to the new operator, or
■ right-clicking the Operator Group and selecting Link INOUTGRP1 to >
<Operator name> > INOUTGRP1.
To create a new table in the repository associated with this Mapping Table,
1. select the Mapping Table and choose Edit > Reconcile Outbound.
2. Select Create a new table and its location in the repository in the Outbound
Reconcile dialog
3. Click OK.
A replica table with identical properties and attributes as the Mapping Table is
created in the repository.

Configuring The Mapping For Deployment


In order for the code to deploy the mapping you need to configure the mapping’s
Physical Properties. These properties include configuring each operator’s physical
properties as well as the steps necessary for code deployment.
The following sections describe those settings in the Mapper that must be set to
complete the definition phase of building a warehouse.

Configuring Attribute Properties


Before you configure the physical properties for a mapping, you may need to
configure how your source attributes behave as they load into the mapping targets.

Mapping Configuration and Code Generation 7-13


Configuring The Mapping For Deployment

The following mapping objects contain attribute properties that may require
changing prior to loading:
■ Tables
■ Facts
■ Dimensions
■ Views
■ Materialized Views
The following settings are useful whenever a surrogate key (for instance, a
Sequence operator) is used on a target in a map.

Delete: Use For Matching


This property sets OWB to delete a data target’s row only if there is a match
between the source attribute a mapped target attribute. If a match is found, then a
delete occurs on the row. By Setting this property to Yes (default), the attribute will
be used as a matching attribute. Note: The Use Constraints will override this
setting. The See

Insert: Use For Loading


This property prevents the select attribute’s data from moving to a target even
though it is mapped to do so. By selecting Yes (default), the data will reach the
mapped target.

Update: Operation
When a matching row is located and an update operation is performed on the
target, different computations can be done between the data of the source attribute
and the target attribute on the matched row before the resulting value is stored onto
the target.
You can specify one of the following target conditions:

= target:= source
+= target:= source + target
-= target:= target - source
=- target:= source - target
||= target:= target||source

7-14 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

=|| target:= source||target

Update: Use For Matching


This property sets OWB to update a data target’s row only if there is a match
between the source attribute a mapped target attribute. If a match is found, then an
update occurs on the row. By Setting this property to Yes (default), the attribute will
be used as a matching attribute. If you use this setting, then all the key columns
must be mapped if there is only one unique key defined on the target entity. Note:
The Use Constraints will override this setting.

Update: Use For Loading


This property prevents the selected attribute’s data from moving to a target even
though it is mapped to do so. By selecting Yes (default), the data will reach the
mapped target attribute.

Note: The rules of UPDATE are the following:


If all columns of a UK are not mapped - UK is not used in construction
of match condition.
If not columns of UK are mapped - OWB return an error
If column (not key column) is not mapped - it would not be used in
loading

After you’ve completed these settings, you are ready to set the physical properties
of the mapping.

Configuring The Mapping Operator Physical Properties


The Operator Properties are located in the Property Configuration inspector. You
open the Property Configuration inspector by selecting an mapping object in the
module tree and
■ Select Module > Configure from the menu bar
■ Right-click the Mapping on the Warehouse Module Editor and select
Configure from the popup menu.

Mapping Configuration and Code Generation 7-15


Configuring The Mapping For Deployment

Figure 7–5 The Configure... Popup Menu Item for Mappings

OWB returns the Configuration Properties Inspector. From here, you select the
property that you want to set.

Figure 7–6 The Configuration Properties Inspector

7-16 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

The Configuration Properties inspector groups the physical properties of a mapping


in different groups:

Setting The Database Link or Schema Information


You can configure your mapping for Schema and Remote Schema Access. You can
also link the mapping to a particular schema by clicking on the field to the right of
Schema and entering a name. When you specify a schema by name (i.e. Schema
property value is not null), the PL/SQL and SQL generation handlers for the Extract
Operators, will consider the property value when referring to the object name in the
generated “From Clause.”
Remote Schema Access in OWB mappings is defined as accessing objects from a
particular schema in a remote database using Net8 database links. Database Links
define the physical connection information for remote access (hostname, ports, etc),
that subsequently can be referenced by the Remote Access property of an Extract
Operator. The mapping configuration enables you to link the mapping to a database
link in the warehouse module. This is done by module name—you actually create
the database link itself when you configure the module for deployment. See
"Configuring Connection Information for Database Sources" on page 4-2 for
information on setting database links for modules.
To define Database Links for a mapping:
1. From the Configure Properties inspector, click Operators > <Mapping
Operator> > Access Specification.
2. Click the right-hand field for Database Link.
3. Select a Module from the pulldown list.

Mapping Configuration and Code Generation 7-17


Configuring The Mapping For Deployment

Figure 7–7 The Configure Properties Inspector Showing The Database Link List

The Mapping is now associated to the database link for the module you selected.

Setting Partition Exchange Loading


Depending upon your situation, Partition Exchange Loading can increase the speed
at which data loads into tables. Partition Exchange Loading leverages Oracle
server’s partitioning capability to increase OWB’s loading performance. This is
especially useful in cases such as
■ The target table is partitioned.
■ The target table holds a large amount of historical data
■ Incremental insert into only one empty partition
■ The target is partitioned by a DATE column
The target can be table, dimension, or fact.
In order to make PEL useful, the target table must be partitioned and it holds a large
amount of historical data. The PEL technique is best suited for situations where
relatively small amounts of data need to be loaded into a target that has already
cumulated much larger amount of historical data Also, PEL is useful whenever all
the new data must be loaded into the same partition in a target table. If the data

7-18 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

warehouse collection is scheduled on a regular basis, this condition can normally be


satisfied.
One reason not to use PEL is if the insertion is accompanied by simultaneous index
and constraint maintenance. Therefore, using the PEL method to load data into a
non-empty partition will go slower than if the target partition is empty.
The PEL technique performs loading of new data by exchanging them into a target
table as a partition. What gets exchanged are merely identities. The table that holds
the new data takes over the identity of one empty partition from the target table; at
the same time, this empty partition assumes the identity of the source table. The
whole exchange process is a pure DDL operation, and involves no data movement.
PEL configuration requires two phases: configuring the mapping itself and then the
target (table, dimension, or fact). By default, the PEL method is disabled on all
mappings. The following instructions describe how to configure a mapping and
then a target.
To configure the mapping for Partition Exchange Loading:
1. From the Configure Properties inspector, click Operators > <Mapping
Operator> > Partition Exchange Loading.

Mapping Configuration and Code Generation 7-19


Configuring The Mapping For Deployment

Figure 7–8 The Mapping Properties Inspector Showing Partition Exchange Loading

2. Click the right-hand field for Use PEL.


3. Select True.
Once the PEL is enabled, the OWB code generator will generate different kind
of batch processing code.
4. Click the right-hand field for Partition Granularity.
This property tells OWB PL/SQL code generator how the target table is
partitioned. There are seven levels of partition granularity you can choose from.
5. Select the granularity level appropriate for the mapping operator.
You configure the target once the mapping is configured. In configuring the target,
the following three sub-areas related to the target need be configured:
■ The target must be correctly partitioned—all of the partitions must be created
before the PEL method can be used..

7-20 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

■ All indexes on the target must be local indexes.


■ All primary and unique constraints on the target must be created by the USING
INDEX option.
To configure the target:
1. Create All Partitions.
■ To create partitions for a table, dimension, or fact, use its property inspector.
See
■ All partition names must follow a strict naming convention. A strict
partition naming convention enables the PEL to automatically construct the
correct partition name based on freshly loaded data. The partition name
must contain information of all the time levels leading to the intended
granularity.
■ After all the partitions are added with correct names, the partitions must be
further configured for their “VALUE LESS THAN” properties. Using the
name and the “VALUE LESS THAN” property, OWB will generate a DDL
script for creating the partitioned table. In essence, the “VALUE LESS
THAN” property defines what the partition will contain; and the partition
name defines how the partition will look like. Figuring out correct value for
the “VALUE LESS THAN” property may prove equally error-prone as
figuring out the correct partition name.
2. Create All Indexes Using the LOCAL option.
■ Using only local indexes is one of the most important reasons for the PEL’ s
performance benefit. Local indexes require that all indexes be partitioned in
the same way as the table. When the temporary table is swapped into the
target table using the PEL, so are the identities of index segments.
■ There is no need to manipulate actual index blocks. The “Index Type”
parameter is configured to “UNIQUE” and the “Local Index” parameter is
configured to “true.”
■ Finally, if an index is created as a local index, the partition key column must
be the leading column of the index, or the index cannot be created.
3. Set Primary/Unique Keys Use to “USING INDEX” option.
This step specifies that all primary and unique key constraints are created with
the “USING INDEX” option. By using the “USING INDEX” option, a constraint
will not trigger automatic index creation when it is being added to the table.
Instead, the server will look among existing indexes for one with same column

Mapping Configuration and Code Generation 7-21


Configuring The Mapping For Deployment

list as that of the constraint. This implies that each primary or unique key
constraint must be backed by a user-defined unique local index. The index that
supports this option was created in step 2.

Adding Optimizing Hints


Application developers often develop insights into their data. For example, they
may know that a query runs much faster if a set of tables is joined in one order
rather than another. OWB can incorporate these insights into the generated SQL code
packages as SQL Optimizer Hints.
To define hints for a mapping:
1. From the Configuration Properties inspector, click Operators > Hints.
2. Click the right-hand field in either an Extraction Hint or a Loading Hint.
3. Click the ... button.
OWB opens the Extraction or the Loading Hint window.

7-22 Oracle Warehouse Builder 3i User’s Guide


Configuring The Mapping For Deployment

Figure 7–9 The Extraction Hint Window

4. Select a hint from the pulldown list.


5. Click Add.
The hint appears in the Existing Hints field. Enter additional text as
appropriate for your situation into the Extra Text column.
6. Click OK.
The editor includes the hint in the mapping definition.
For detailed information on optimizer hints and how to use them, see the Oracle8i
Designing and Tuning for Performance guide.

Mapping Configuration and Code Generation 7-23


Defining Code Generation Strategies For The Mapping

Setting Constraint Handling


Setting this parameter to false will disable all referential constraints to and from the
target table. This speeds loading by omitting constraint checking by the database.
After all the data is loaded, the constraints will be automatically enabled by OWB.
OWB will not guarantee referential integrity when using this option. If the data
does not comply with the constraints, the constraint will become invalid. In such
cases, you will have to manually resolve the data’s referential integrity.
To set constraint handling:
1. From the Configure Properties inspector, click Operators > <Mapping
Operator> > Constraint Management.
2. Click the right-hand field for Enable Constraints.
3. Select True or False.
4. Click the right-hand field for Exceptions Table.
5. Enter the appropriate name into the field.

Defining Code Generation Strategies For The Mapping


OWB implements a mapping by generating a PL/SQL package based upon a
mapping. A code generation strategy is the mechanism in a mapping which
determines the implementation language for each operator after considering the
limitations of the implementation languages. For example, a Filter Operator can be
generated either in SQL as a WHERE clause in the SQL statement, or in PL/SQL as
an IF statement inside a Fetch loop. The following sections describe the Code
Generator and several different code generation strategies for mapping.

Viewing The Generated Code for a Mapping


The code generator can be invoked from both the Module Editor and the Mapping
Editor. The major distinction between the two is that the code generated from
within the Mapping Editor is not persisted in the repository and excludes auditing
code and code that may be necessary for deployment.Code can be generated for a
mapping as for any child-object of a warehouse module..

Note: If you generate code at any time during your Warehouse


Builder Session, Multi-User Locking feature will remain in effect
until after you commit your changes.

7-24 Oracle Warehouse Builder 3i User’s Guide


Defining Code Generation Strategies For The Mapping

There are two kinds of code-generation in the Mapping Editor:


■ Mapping
You can generate simplified code from the mapping editor that demonstrate
logically how data extraction, transformation and load are performed. The
generated code will not include support for auditing or bulk-processing. Code
generation for a mapping selected in the Mapping editor can be opened as follows
■ Select the Mapping > Generate > Mapping menu item from the menu bar
or
■ Right mouse click and select the Generate > Mapping menu item from the
popup menu
■ Intermediate Results
This type of code generation is intended to give the resultant mapping code up
to a certain attribute group in the mapping. There are three different aspects of
viewing the intermediate code result for an attribute group, namely Incoming,
Outgoing and Loading code.Intermediate Results can be launched from the
mapping editor by selecting an Attribute Group for an operator and
■ Clicking Mapping > Generate > Intermediate Results from the menu bar
or
■ Right mouse-click on the canvas and selecting Generate > Intermediate
Results from the popup menu.
Once started, code will generate for all upstream operators up to the current
selected Attribute Group. Once the code is generated, the Code Viewer launches so
that you can inspect the code that comes into an input attribute group, what code
goes out of an output attribute group and what load code is generated for a
terminating input group.
The code generator will only generate code to handle the specified loading type as
specified in the data target operator. For example, if you choose INSERT/UPDATE
as the loading type, only INSERT and UPDATE code will appear in the generated
code.

Note: Note, where applicable the system may generate code for
multiple strategies. For example, if a step can be implemented in
set-based and row-based operating mode, the code viewer will
include both modes.

Mapping Configuration and Code Generation 7-25


Defining Code Generation Strategies For The Mapping

Using the Code Viewer


You can view the generated code for a mapping from the Mapping Editor. Note that
code also can be generated from within the Module Editor. The major distinction
between the two is that the code generated from within the Mapping Editor is not
persisted in the repository and excludes code that may be necessary to deploy the
code.

Viewing Intermediate Results


There are three different aspects of viewing the intermediate code result, namely
■ Incoming
■ Outgoing
■ Loading
You can also choose among any of the aspects when viewing the code. At any
particular moment, not all the aspects are possible. For example, an output attribute
group does not have the Input intermediate code result. To select an aspect,
■ Click View > Aspect from the menu bar of the Code Viewer.

Figure 7–10 The Intermediate Results Viewer

The Code Viewer for intermediate code-generation is non-modal—you can return to


the mapping canvas and select any attribute group to see their intermediate code.
The code viewer will refresh with the code text generated for the selected attribute
group.

7-26 Oracle Warehouse Builder 3i User’s Guide


Defining Code Generation Strategies For The Mapping

Viewing Code From The Module Editor


Code can be generated for a mapping as for any child-object of a warehouse
module. Code generation for a mapping selected in the Module editor can be
initiated as follows:
■ Select the module and then Module > Generate… from the Module Editor
menu or
■ Right-click on the module and select Generate…from the popup menu.
Select Generate Create Scripts from the Generation Mode dialog box.
The generated code will contain all possible strategies that can be generated for that
particular mapping. For PL/SQL mappings, a runtime parameter will determine
which operating mode to use when running the package.
.

Note: If a view is part of mapping, OWB does not generate a DDL


statement for view. OWB generates regular package with
assumption that view is updatable.
No error checking is done to verify if view is updatable or not.
You must ensure that view complies with the definition of
updatable view before including this view into the map (see 8i SQL
Reference for the definition of updatable view). OWB Validation or
Generation does not have any special treatment for view. View or
Materialized view are treated the same way as regular tables

Configuring Loading Step Strategies


A mapping step is the result of the implicit mapping graph analysis performed on a
mapping. Mapping steps are automatically created and maintained; you cannot
add, delete or rename them. A step can be one of the following three types:
PL/SQL, SQL*Loader, External Process.
Each type will have its related physical configuration parameters which the user
can configure via the Configuration Property inspector. Code can be generated for
mapping steps in its associated language and physical configuration parameters are
used in the generation process. The Step properties encompass the runtime
parameters.

Mapping Configuration and Code Generation 7-27


Defining Code Generation Strategies For The Mapping

Setting The Default Audit Level


This is the audit level that will be used when executing the package. Audit levels
dictate the amount of audit information that will be captured in the runtime schema
when the package is run. The audit level settings are described in the following
table..
Table 7–3 The Default Operation Levels
Setting Description
None No auditing information will be recorded in runtime.
Statistics Statistical auditing information will be recorded in runtime.
Error Details Statistical plus error information will be recorded in runtime.
Complete All auditing information will be recorded in runtime.

Setting the Default Purge Group


This is the purge group used when executing the package. Each audit record in the
runtime schema will be assigned to the purge group specified.

Setting Maximum Number of Errors


This is the number for maximum errors reached that will be used when
generating/executing the package. When executing this package, the execution will
terminate when the number of errors reached is greater than the maximum number
of errors value.

Setting Commit Frequency


This is the commit frequency that will be used when executing the package. Data
will be committed to the database after processing the number of rows specified in
this parameter.

Setting The Default Operating Mode


The Default Operating Mode setting involves specifying how code will be
generated from the mapping. The next section discusses how to set the default code
generation mode.

7-28 Oracle Warehouse Builder 3i User’s Guide


Defining Code Generation Strategies For The Mapping

You use this setting for the operating mode used for running the generated code
package.
Table 7–4 The Default Operating Modes
Setting Description
Set based Execute set based (batch) processing - uses SQL as the
implementation language.
Row based Execute row based processing - uses PL/SQL as the
implementation language.
Row based (target only) Execute row based processing - uses PL/SQL as the
implementation language for the data target.
Set based fail over to row Execute set based (batch) processing, but switch to row based if
based error occurs.
Set based fail over to row Execute set based (batch) processing, but switch to row based
based (target only) (target only) if error occurs

Set Based
The Set Based option enables OWB to insert all of the data in a single SQL
command. This option depends upon a correctly designed mapping. This strategy
starts from the beginning of the mapping and assigns SQL as the implementation
language to each operator unless an operator does not support SQL as the
implementation language. All the operators from that point forward will have
PL/SQL as the implementation language. This strategy is very similar to Batch but
can handle procedures in mapping as well.

Row Based
This strategy starts from the beginning of the mapping and assigns SQL as the
implementation language to each operator up till a point that all the operators from
that point forward supports PL/SQL as the implementation language. You use this
strategy to give maximal amount of auditing or debugging information to the user
since it is likely that the expressions or transforms in the mapping will be
implemented in PL/SQL.

Row Based (Target Only)


This strategy is similar to Default except the implementation language of the data
target operators will always be PL/SQL. When this strategy is used with fail-over, it
allows the error rows to be stored into the audit table when data are being loaded
into the target. This is mainly used when the source data is clean but there may be

Mapping Configuration and Code Generation 7-29


Setting A SQL*Loader Step

errors when loading into the targets. Examples are foreign key constraint violation
when loading fact with missing primary key at the dimension, or incompatible
implicit data type conversion due to the limited length, scale or precision at the data
targets.

Set Based Fail Over To Row Based


The mapping will first be executed in set based mode. If there is any error occurred,
the execution will fail over to row based. If this operating mode is not supported
(because it cannot be implemented by the generator), a runtime exception will occur
if you attempt to run the mapping in this mode.

Set Based Fail Over To Row Based (Target Only)


The mapping will first be executed in set based mode. If any error occurred, the
execution will fail over to row based (target only). If such operating mode is not
supported (because it cannot be implemented by the generator), a runtime
exception will occur if you attempt to run the mapping in this mode.

Setting Bulk Processing


The Bulk Processing properties enable you to load incremental amounts of rows
from a source to a target. Setting this to false means that PL/SQL will process the
data one row at a time. Setting it to TRUE means PL/SQL will process the data
grouped by the amount of rows specified by the Bulk Size property.

Setting the Analyze Statistics Percentage


This is the percentage of rows to estimate when gathering statistics on the target
tables. After data is loaded into the target tables, statistics used for cost-based
optimization are gathered on each target table. You can set this parameter to the
percentage of rows in each target table that will be used for this analysis.

Setting A SQL*Loader Step


Utilizing Oracle Warehouse Builder’s flexible configuration framework, a
SQL*Loader mapping can be configured to suit your specific physical requirements.
The values chosen during configuration will directly affect the content of the
generated SQL*Loader and the runtime control files.
SQL*Loader provides two methods for loading data:
■ Conventional Path Load

7-30 Oracle Warehouse Builder 3i User’s Guide


Setting A SQL*Loader Step

■ Direct Path Load


A conventional path load executes SQL INSERT statement(s) to populate table(s) in
an Oracle database. A direct path load eliminates much of the Oracle database
overhead by formatting Oracle data blocks and writing the data blocks directly to
the database files. A direct load, therefore, does not compete with other users for
database resources so it can usually load data at near disk speed.
Certain considerations, such as restrictions, security and backup implications, are
inherent to each method of access to database files. Refer to the Oracle 8i Utilities
Manual for further information.
When designing and implementing a mapping to extract data from a Flat File via
SQL*Loader, there are several places where you can choose values for properties to
affect the SQL*Loader script generated. These places allow you the flexibility to
ensure the generated SQL*Loader script matches your specific logical and physical
requirements.
First, from a logical perspective, each load operator in a map has an operator
property called Loading Types. The value contained by this property affects how
the SQL*Loader ‘INTO TABLE’ clause for that specific load operator will be
generated. Modification of this property is accomplished by opening the mapping
diagram, selecting a specific load operator, and then choosing ‘Operator Properties’.

Table 7–5 The Loading Types And INTO TABLE Relationship


Loading Types INTO TABLE
INSERT/UPDATE APPEND
DELETE/INSERT REPLACE
TRUNCATE/INSERT TRUNCATE
CHECK/INSERT INSERT
NONE INSERT

Next, there are two locations where you have the opportunity to supply physical
configuration information to affect the generated SQL*Loader output. One is the
configuration of the physical properties for a load operator. The other is by setting
the values in the physical step configuration. Each will be described below.

Mapping Configuration and Code Generation 7-31


Setting A SQL*Loader Step

Setting Load Operator Physical Parameters


Each load operator has physical configuration parameters which you can utilize to
cause generation of specific SQL*Loader output. For more specifics on the meaning
and significance of each SQL*Loader option and clause, please refer to the Oracle 8i
Utilities Manual. Each of these properties described below affect how the INTO
TABLE clause is generated.

Setting Enable Constraints


If the Enable Constraints property is set to the value TRUE then the ‘REENABLE
DISABLED_CONSTRAINTS’ clause is generated. This option automatically
re-enables integrity constraints at the end of a direct-path load.

Setting The Exceptions Table


If the Exceptions Table property is set to a non-blank value then the ‘EXCEPTIONS
table’ clause is generated. This option specifies a table that must exist when
SQL*Loader is run. It will be used to insert the Reweds of all rows that have
violated one of the integrity constraints when constraint re-enabling is processed
during a direct path load.

Setting SQL*Loader Parameters


The SQL*Loader Parameters properties enable you to define the SQL*Loader
options appropriate for your mapping. Refer to the Oracle 8i Utilities guide for more
specific information on SQL*Loader.
The following parameters are available in the configuration properties inspector:
■ PARTITION NAME indicates that the load is a partition-level load.
Partition-level loading lets you load one or more specified partitions or
subpartitions within a table. Full database, user, and transportable tablespace
mode loading do not support partition-level loading; only table mode loading
does. Because incremental loading (incremental, cumulative, and complete) can
be done only in full database mode, partition-level loading cannot be specified
for incremental loads. In all modes, partitioned data is loaded in a format such
that partitions or subpartitions can be loaded selectively.
■ SORTED INDEXES identify the indexes on which the data is presorted. This
clause is allowed only for direct path loads. Generally, you specify only one
index in the SORTED INDEXES clause because data that is sorted for one index
is not usually in the right order for another index. When the data is in the same
order for multiple indexes, however, all indexes can be specified at once. All

7-32 Oracle Warehouse Builder 3i User’s Guide


Setting A SQL*Loader Step

indexes listed in the SORTED INDEXES clause must be created before you start
the direct path load.
■ SINGLEROW is intended for use during a direct path load with APPEND on
systems with limited memory, or when loading a small number of records into a
large table. This option inserts each index entry directly into the index, one
record at a time. By default, SQL*Loader does not use SINGLEROW to append
records to a table. Instead, index entries are put into a separate, temporary
storage area and merged with the original index at the end of the load. This
method achieves better performance and produces an optimal index, but it
requires extra storage space. During the merge, the original index, the new
index, and the space for new entries all simultaneously occupy storage space.
With the SINGLEROW option, storage space is not required for new index
entries or for a new index. The resulting index may not be as optimal as a
freshly sorted one, but it takes less space to produce. It also takes more time
because additional UNDO information is generated for each index insert. This
option is suggested for use when either of the following situations exists:
■ Available storage is limited
■ The number of records to be loaded is small compared to the size of the
table (a ratio of 1:20, or less, is recommended)
■ TRAILING NULLCOLS tells SQL*Loader to treat any relatively positioned
columns that are not present in the record as null columns.
■ RECORDS TO SKIP invokes the SKIP command in SQL*Loader. SKIP specifies
the number of logical records from the beginning of the file that should not be
loaded. By default, no records are skipped. This parameter continues loads that
have been interrupted for some reason. It is used for all conventional loads, for
single-table direct loads, and for multiple-table direct loads when the same
number of records were loaded into each table. It is not used for multiple-table
direct loads when a different number of records were loaded into each table.
■ FILES specifies the names of the export files to import. The default extension is
.dmp. Because Export supports multiple export files (see the following
description of the FILESIZE parameter), you may need to specify multiple
filenames to be imported. You need not be the user who exported the export
files; however, you must have read access to the files. If you were not the
exporter of the export files, you must also have the IMP_FULL_DATABASE role
granted to you.

Mapping Configuration and Code Generation 7-33


Setting A SQL*Loader Step

Setting Step Parameters


The parameters described in this section affect the specific output of the generated
SQL*Loader script’s common heading section. This section includes the setting of
type of loading to be performed, options which determine how the load is to be
performed, and the specification of the physical files from which to load data. For
more specifics on the meaning and significance of each SQL*Loader option and
clause, please refer to the Oracle 8i Utilities Manual.
The SQL*Loader Step has the following Configuration Parameters:
Parameters Affecting Script Type
■ Operation Recoverable–Controls the output of the RECOVERABLE clause.
True indicates that the load is recoverable. False indicates that the load is
not recoverable and records are not recorded in the redo log.
■ Continue Load–If this parameter is set to TRUE, then the generated
SQL*Loader script will be CONTINUE_LOAD. Otherwise, the SQL*Loader
script will be LOAD. CONTINUE_LOAD is used when a direct load of
multiple tables was discontinued and needs to be restarted. It is used in
conjunction with the operator-level SKIP option.
■ Nls Characterset–Specifies the character set to be placed in the
‘CHARACTERSET’ clause
Parameters Affecting the OPTIONS clause:
■ Direct Mode–Specifies the value of the DIRECT option as either = TRUE
or = FALSE. True indicates that a direct path load will be done. False
indicates that a conventional load will be done.
■ Perform Parallel Load–Specifies the value of the PARALLEL option as
either = TRUE or = FALSE. True indicates that direct loads can operate in
multiple concurrent sessions.
■ Errors Allowed–If the value specified is greater than 0, then the ‘ERRORS =
n’ option will be generated. SQL*Loader will terminate the load at the first
consistent point after this error limit is reached.
■ Records To Skip–If the value specified is greater than 0, then the ‘SKIP = n’
option will be generated. This value indicates the number of logical records
from the beginning of the file that should not be loaded. If the value is not
specified, no records will be skipped.

7-34 Oracle Warehouse Builder 3i User’s Guide


Setting A SQL*Loader Step

■ Records To Load–If the value specified is greater than 0, then the ‘LOAD =
n’ option will be generated. This value specifies the maximum number of
records to load. If a value is not specified all of the records will be loaded.
■ Rows Per Commit–If the value specified is greater than 0, then the ‘ROWS
= n’ option will be generated. For direct path loads, the value identifies the
number of rows to read from the source before a data save is done. For
conventional path loads, the value specifies the number of rows in the bind
array.
■ Bind Size–If the value specified is greater than 0, then the ‘BINDSIZE = n’
option will be generated. The value indicates the maximum size in bytes of
the bind array.
■ Read Size–If the value specified is greater than 0, then the ‘READSIZE = n’
option will be generated. The value is used to specify the size of the read
buffer.
■ Read Buffers–If the value specified is greater than 0, then the
‘READBUFFERS n’ clause will be generated. READBUFFERS specifies the
number of buffers to use during a direct path load. Do not specify a value
for READBUFFERS unless it becomes necessary, as indicated by ORA-2374.
■ File–If this parameter is set to a non-blank value, then the ‘FILE=’ option
will be generated.

Note: The value specified will be enclosed in single quotes in the


generated code. FILE specifies the database file from which the
temporary segments are allocated for the entire session.

■ Preserve Blanks–If this parameter is set to the value of true, then the
‘PRESERVE BLANKS’ clause will be generated. PRESERVE BLANKS
retains leading whitespace when optional enclosure delimiters are not
present. It also leaves trailing whitespace intact when fields are specified
with a predetermined size.
Parameters Affecting the INFILE clause(s):
The Data Files configuration parameter allows you to specify the characteristics
of the physical files to be loaded. Using this section you have the ability to
specify the name of the file to loaded, the bad file name, discard file name, and
the maximum number of discards allowed for each of the files to be loaded.

Mapping Configuration and Code Generation 7-35


Setting A SQL*Loader Step

The initial values for these parameters will be set from the properties of the flat
file used in the mapping.
■ Data File Name–The full physical filename of a data file to be loaded. The
value entered will be placed in the ‘INFILE’ clause. You should enter the
complete path name for the file in the syntax of the operating system on
which the SQL*Loader script will be deployed. Note: the value specified
will be enclosed in single quotes in the generated code.
■ Bad File Name–The full physical filename of a bad file that SQL*Loader
will create to store records that cause errors during insert or are improperly
formatted. The value entered will be placed in the ‘BADFILE’ clause. You
should enter the complete path name for the file in the syntax of the
operating system on which the SQL*Loader script will be deployed. Note:
the value specified will be enclosed in single quotes in the generated code.
■ Discard File Name–The full physical filename of a discard that SQL*Loader
will create to store records that are neither inserted into a table nor rejected.
The value entered will be placed in the ‘DISCARDFILE’ clause. You should
enter the complete path name for the file in the syntax of the operating
system on which the SQL*Loader script will be deployed. Note: the value
specified will be enclosed in single quotes in the generated code.
■ Discard Max–The value entered, if greater than 0, will be used to generate
the ‘DISCARD n’ clause. It specifies the number of discards that will
terminate the load.
Only the following operators support generation of SQL*Loader:
Extract Operators:
■ Mapping File
■ Data Generator
Transformation Operators:
■ Filter
■ Expression
■ Transformation
Load Operators:
■ Mapping Table
■ Mapping View

7-36 Oracle Warehouse Builder 3i User’s Guide


Taking The Next Step

■ Mapping Dimension
■ Mapping Fact
Strategy:
Oracle Warehouse Builder will examine each operator in the mapping to determine
if it supports SQL*Loader generation. Only if all of the operators support
SQL*Loader generation will SQL*Loader be a valid generation

Setting An External Process Step


This section describes the setting of Step Parameters associated with an External
Process Step.

Setting OS Executable/Pure Integrate


Setting the Executable Location–This is the directory path and name of the
executable.
Setting Command Line Parameters–This is the string of parameters to be passed to
the executable.

Setting Pure Extract


Setting the FTP Directory–This is the directory for performing FTP.
Setting the Status File Name–This is the filename which contains the execution
status of the Pure Extract process.

Taking The Next Step


This chapter described how to transform data as it moves from source to target. You
can use standard transformations selected from the Oracle Library, custom
transformations for a specific need, or pre-packaged SQL operations.
This chapter marks the end of the definition phase and the beginning of the
configuration for generation phase for building a warehouse. The next chapter
describes how to reconcile a mapping, validate the mapping, configure the physical
properties for a mapping, and define code generation strategies.

Mapping Configuration and Code Generation 7-37


Taking The Next Step

7-38 Oracle Warehouse Builder 3i User’s Guide


8
Configure, Generate and Deploy

The definitions stored in an OWB repository describe a logical model of a data


warehouse and its mappings. This model can be physically realized in any number
of ways depending on how these definitions are configured. So far, in Chapter 7,
you have seen how the mappings are configured. This Chapter shows you how to
configure the rest of the definitions for a specific instance, validate the definitions,
and generate and deploy the scripts that create and populate the instance.
Once you have populated a physical instance, you may later need to drop,
reconfigure, rename, and upgrade the objects in this initial warehouse. This chapter
also describes how OWB helps you make these changes.
This chapter includes the following sections:
■ Configuring a Physical Instance
■ Validating Definitions
■ Generating Scripts
■ Deploying Scripts
■ Upgrading a Warehouse Physical Instance
■ Taking the Next Step

Configure, Generate and Deploy 8-1


Configuring a Physical Instance

Configuring a Physical Instance


Before you can create the physical instance of your data warehouse you must first
specify the physical characteristics. This is called configuration. Configuration
entails defining configuration properties for each definable warehouse parameter.
Table 8–1 summarizes the parameters you can configure for each object deployed to
the physical warehouse.

Table 8–1 Physical Characteristics


Warehouse Object Parameters
Warehouse Module Database link definitions, generation preferences, the job name to
register with OEM, runtime and generation target directory names,
and general warehouse module identification properties
Dimension Indexes, partitions, partition keys, constraints, columns,
performance, parallel, partition parameters, table space used to store,
generation options for time dimensions, generation options, and
identification
Fact Indexes, partitions, partition keys, constraints, columns,
performance, parallel, partition parameters, table space used to store,
and identification
Mapping These parameters are covered in Chapter 7.
Materialized View Indexes, partitions, partition keys, performance, parallel, partition
parameters, materialized view parameters, table space used to store,
and identification
Sequence Sequence Parameters and Identification
Table Indexes, partitions, partition keys, constraints, columns,
performance, parallel, partition parameters, table space used to store,
and identification
Transformation Identification
Categories
View Identification

In order to configure your data warehouse you must use the Configuration
Properties inspector. The Properties inspectors are specific to the type of object that
is being configured. Make sure you go through and configure each object you are
planning to deploy. The Properties inspectors allow you to look at the current
parameter settings and modify them according to your needs.

8-2 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

There are two kinds of configurations:


■ Configuration of existing logical objects
■ Configuration of new physical objects

Configuring Existing Logical Objects


To configure existing logical objects, you specify which objects are to be physically
deployed and describe each object’s physical characteristics. An object’s physical
characteristics are determined by a set of parameters stored in its Configuration
Properties inspector. Most parameters have default values.
To configure existing objects:
1. Double-click the name of the warehouse module.
The Warehouse Module Editor displays with the Logical Tree on top. All of the
objects listed in the Logical Tree have Configuration Properties inspectors.
2. Highlight an item in the tree and select Edit > Configure....
The Properties inspector displays with its categories of configuration
parameters rolled up. The warehouse module Properties inspector is displayed
in the example below. It has seven configuration parameter categories.

3. Expand each category to display their parameters.


4. Choose the parameter you want to configure and click in the space to the right
of the parameter’s name to be able to edit the parameter value.

Configure, Generate and Deploy 8-3


Configuring a Physical Instance

Depending on the parameter, you can either select an option from a drop-down
list, or type in a value. Use the parameter descriptions starting on page 8-7 to
help define your parameters. The descriptions are separated into objects and go
in the order that they display in the Warehouse Module Editor.

Configuring New Physical Objects


Physical objects such as database links, indexes, partitions, and partition keys
cannot be created when you are designing the logical warehouse. If you want these
objects created in your database when you deploy, you must first create the objects
and then configure them. These objects can only be created in relation to certain
logical objects. Database links can only be created in the warehouse module
Configuration Properties inspector, and indexes, partitions and partition keys can
only be created in the dimension, fact, table, and materialized view Properties
inspectors.
To create and configure new objects:
1. Open the Warehouse Module Editor, select the object to which you want to add
a new physical object and select Edit > Configure... .
The Properties inspector displays with its categories of configuration
parameters. The physical object names are listed at the top.

The physical objects are listed on


the top of the Configuration
Properties inspector.

8-4 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

2. Choose the object you want to create and click in the space to the right of the
object’s name.
The ... button appears. This button allows you to add and delete objects.

The button appears.

3. Click the ... button.


A pop-up panel for the object displays.

Configure, Generate and Deploy 8-5


Configuring a Physical Instance

4. Type in the name of the object you want to create and click Add. You can
continue on adding new objects by typing in new names and clicking Add.
When you are done click OK.
5. Expand the object type name to display the new object.

6. Expand the new object name and categories to display the new object’s
configuration parameters.

7. Choose the parameter you want to configure and click in the space to the right
of the parameter’s name to be able to edit the parameter value.
Depending on the parameter, you can either select an option from a drop-down
list, or type in a value. Use the parameter descriptions starting on page 8-7 to
help define your parameters. The descriptions are separated into objects and go
in the order that they display in the Warehouse Module Editor.

8-6 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Configuring Warehouse Modules


To configure a Warehouse Module:
1. Open the Warehouse Module Editor, select the Warehouse Module and select
Edit > Configure....
The Configuration Properties inspector displays with seven categories of
configuration parameters.

2. Expand to display the parameters for each category.


The following sections discuss each of the categories and their corresponding
parameters. Use these as a reference.

Database Links
Target schemas pull data from database sources using PL/SQL packages, and these
packages rely on database links to connect with the sources. Thus, a definition for a
database link must be created, configured, and deployed for each database source.
The link is deployed in the target schema.
Each time you create a mapping that pulls data from a database source, OWB
verifies that a definition for the required database link exists. If the definition does
not exist, OWB creates one from the connection information stored in mapping’s
source module. Thus, the default parameter values for a database link correspond
with the connection information in a source module.
When you deploy a physical instance, you must verify that the database links
generated by OWB point to the correct sources. For example, if a test application

Configure, Generate and Deploy 8-7


Configuring a Physical Instance

system was used to develop the logical warehouse but the physical instances use
real data stored in production systems, then you must reconfigure the definitions to
reflect this change.
OWB stores definitions for database links in the warehouse module that pulls the
data but are visible in the Properties inspector.

You can specify the host machine using and SQL*Net connect string or provide the
host name, port, and the ID of the database instance.

Note: If your source and target tables are in the same instance,
you can choose to link directly to the schema. You set this up in the
mapping configuration. This will improve performance.
When the source module references an Oracle Designer repository,
you must configure the database link so it points to the actual
database and not the Designer repository.

Generation Preferences
This category defines preferences for the generated scripts. The End of Line
parameter that you set is dependent up on the platform to which you are deploying
your warehouse. For example, if you are deploying to a UNIX platform, use \n; and
if you are deploying to an NT platform, use \r\n.

Oracle Enterprise Manager Registration


This parameter is used to configure OWB so you can schedule jobs and manage
their dependencies using Oracle Enterprise Manager and Oracle Workflow.

8-8 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Table 8–2 Parameter for Oracle Enterprise Manager


Parameter Default Description
OEM Job Name _job Suffix append to the name of the mapping
used to generate the script.

Note: SQL*Loader: the TCL scripts must be executed on the


machine that hosts the runtime schema. There is only one TCL
script to execute per mapping.

Run Time Directories


This category defines a set of directories used at run time by SQL*Loader and a
directory and host for the OWB Work Flow Queue Listener. OWB uses the set of
subdirectories as parameters for the generated TCL scripts that can be registered
with Oracle Enterprise Manager. After the generated scripts have been registered
and deployed to a file system, you can schedule SQL*Loader jobs using Oracle
Enterprise Manager.

Table 8–3 Run Time Directories


Parameter Default Description
Log Directory log\ Log directory for the SQL*Loader.
Archive Directory archive\ Not currently used.
Receive Directory receive\ Not currently used.
Input Directory input\ Not currently used.
Invalid Directory invalid\ Directory for Loader error and rejected records.
Work Directory work\ Not currently used.
Sort Directory sort\ Not currently used.
Queue Listener Directory workflow\ Location of OWB Work Flow Queue Listener.
Queue Listener Host localhost Machine name for the Work Flow Queue
Listener.

Configure, Generate and Deploy 8-9


Configuring a Physical Instance

Note: OWB generates the subdirectories in the default Top


Directory. If you configure a Top Directory different from the
default, then you must create the subdirectories.

Generation Target Directories


This category defines the subdirectories within the Top Directory where OWB stores
generated scripts for a target schema.

Table 8–4 Parameters Target Directory


Parameter Default Description
TCL Directory tcl\ Location where TCL scripts that can be
registered with Oracle Enterprise Manager are
stored. These are used to schedule and run
initial and incremental loader jobs.
DDL Directory ddl\ Location where scripts that create database
objects for the target schema are stored.
DDL Extension .ddl File name extension for DDL scripts.
DDL Spool Directory ddl\log\ Location where DDL scripts are buffered
during script generation processing.
LIB Directory .lib\ Owner’s password
LIB Extension .lib Location where scripts that generate
user-defined funtions and procedures are
stored.
LIB Spool Directory lib\log\ Suffix append to mapping’s name
PL/SQL Directory pls\ Location where PL/SQL scripts are stored.
PL/SQL Extension .pls File name extension for PL/SQL scripts.
PL/SQL Run Parameter File _run.ini Suffix for the parameter script in a PL/SQL job.
PL/SQL Spool Directory pls\log\ Location where PL/SQL scripts are buffered
during script generation processing.
Loader Directory ctl\ Location where control files are stored.
Loader Extension .ctl Suffix for the loader scripts.
Loader Run Parameter File _run.ini Suffix for the parameter initialization file.

8-10 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Table 8–4 Parameters Target Directory


Parameter Default Description
Pure Extract Run Parameter File _run.ini Suffix for the parameter script in a P*E job.
Pure Integrate Run Parameter File _run.ini Suffix for the parameter script in a P*E job.

Identification
The Top Directory parameter specifies the location where OWB stores generated
scripts. The value for the parameter must terminate with appropriate file separator
for the OS that OWB client is running on, on NT this would be the "\", and on
UNIX this would be the "/" (backslash character). The directory contains several
subdirectories which are configured in the Generation Target Directories category,
and it resides on or must be mapped directly to the machine that hosts the target
warehouse.

Note: OWB generates the subdirectories only when the default


Top Directory is used. If you configure a different Top Directory,
then you must create the directories and its subdirectories.

Configuring Dimensions
OWB always generates two scripts for a dimension: one to create the dimension
object and the other to create the underlying table. Additional scripts are generated
when indexes are defined on the dimension table, or when the definition was
generated by the Time Dimension Wizard. In the latter case, OWB generates an
insert statement that loads the dimension. The configuration parameters for a
dimension specify how these scripts are generated and whether the dimension is
deployed.
To configure a Dimension:
1. Open the Warehouse Module Editor, select the Dimension and select Edit >
Configure....

Configure, Generate and Deploy 8-11


Configuring a Physical Instance

The Configuration Properties inspector displays with seven categories of


configuration parameters.

2. Expand to display the parameters for each category.


The following sections discuss each of the categories and their corresponding
parameters. Use these as a reference. For information on creating indexes,
partitions, and partition keys see "Configuring Tables" on page 8-19.

Performance and Parallel Parameters


Use these to influence query and load performance.

Table 8–5 Performance and Parallel Parameters


Parameter Default Description
Log to Redo logging Recovery requirements for a data warehouse are
usually less strenuous than for a transaction system.
Set to nologging to improve performance.

8-12 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Table 8–5 Performance and Parallel Parameters


Parameter Default Description
Analyze 99 Value represents the sample size as a percentage of
total rows. When set to a nonzero value, OWB
generates a DDL script to analyze the table.
OWB stores the generated script in the \DDL
directory as ’tablename_ANALYSE’ and the script can
be run at the discretion of the warehouse
administrator.
To improve performance, use a high number for a
large dimension table and a low number for a small
dimension table.
Parallel parallel Enables parallel processing when the table is
created. If you are using a single CPU or a
non-Oracle database, set to nonparallel to improve
performance.

For additional information on the package OWB uses in the analyze script, see the
Oracle8i Designing and Tuning and Performance and PL/SQL User’s Guide and Reference
guides.

Partition Parameters
When you partition a table, you specify a partition key and method (Hash or
Range). The Partition Parameters apply when you create hash partitions. For more
information see "Partitions" on page 8-21.

Storage Space
A dimension table can reside in one or more tablespaces. Use the Tablespace
parameter to specify the name of each tablespace.

Generation Options for Time Dimension


When you create a definition for a dimension using the Time Dimension Wizard,
OWB generates an insert statement to load the underlying table. The Start and End
Date parameters determine the range of dates.

Generation Options
This category contains parameters that determine whether to generate scripts that
create a dimension object and its underlying table.

Configure, Generate and Deploy 8-13


Configuring a Physical Instance

Table 8–6 Generation Options


Parameter Default Description
Generate Table true Generate a script to create the dimension table.
Generate Dimension true Generate script to create the dimension object. Set
this parameter to true only when the warehouse
requires the hierarchy and level information. For
example, this information should be created for an
instance that relies on materialized views that
reference this dimension.

Identification
The Top Directory parameter specifies the location where OWB stores generated
scripts. The value for the parameter must terminate with appropriate file separator
for the OS that OWB client is running on, on NT this would be the "\", and on
UNIX this would be the "/" (backslash character). The directory contains several
subdirectories which are configured in the Generation Target Directories category,
and it resides on or must be mapped directly to the machine that hosts the target
warehouse.

Note: OWB generates the subdirectories only when the default


Top Directory is used. If you configure a different Top Directory,
then you must create the directories and its subdirectories.

Configuring Facts
To configure a Fact:
1. Open the Warehouse Module Editor, select the Fact and select Edit >
Configure....

8-14 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

The Configuration Properties inspector displays the ten categories of


parameters.

2. Expand to display the parameters for each category.


The following sections discuss each of the categories and their corresponding
parameters. Use these as a reference. For information on creating indexes,
partitions, and partition keys see "Configuring Tables" on page 8-19.

Performance and Parallel Parameters


Use these to influence query and load performance.

Table 8–7 Performance and Parallel Parameters


Parameter Default Description
Log to Redo logging Recovery requirements for a data warehouse are
usually less strenuous than for a transaction system.
Analyze 99 Value represents the sample size as a percentage of
total rows. When set to a nonzero value, OWB
generates a DDL script to analyze the table.
OWB stores the generated script in the \DDL
directory as ’tablename_ANALYSE’ and the script can
be run at the discretion of the warehouse
administrator.
Parallel parallel Enables parallel processing when the table is
created. Also enables parallel processing or access. If
you are using a non-Oracle database, set to
nonparallel to improve performance.

Configure, Generate and Deploy 8-15


Configuring a Physical Instance

For additional information on the package OWB uses in the analyze script, see the
Oracle8i Designing and Tuning and Performance and PL/SQL User’s Guide and Reference
guides.

Partition Parameters
When you partition a table, you specify a partition key and method (Hash or
Range). The Partition Parameters apply when you create hash partitions. For more
information see "Partitions" on page 8-21.

Storage Space
A fact table can reside in one or more tablespaces. Use the Tablespace parameter to
specify the name of each tablespace. A fact can also be partitioned.

Note: Partition Exchange Loading requires different settings. If


you are using Partition Exchange Loading, refer to "Setting
Partition Exchange Loading" on page 7-18.

Identification
The Top Directory parameter specifies the location where OWB stores generated
scripts. The value for the parameter must terminate with appropriate file separator
for the OS that OWB client is running on, on NT this would be the "\", and on
UNIX this would be the "/" (backslash character). The directory contains several
subdirectories which are configured in the Generation Target Directories category,
and it resides on or must be mapped directly to the machine that hosts the target
warehouse.

Note: OWB generates the subdirectories only when the default


Top Directory is used. If you configure a different Top Directory,
then you must create the directories and its subdirectories.

Configuring Materialized Views


OWB generates one script to create a materialized view and another for its foreign
key reference constraints. This is the same generation process used for views and
tables. Additional scripts are generated when indexes are defined on the view

8-16 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

To configure a Materialized View:


1. Open the Warehouse Module Editor, select the Materialized View and select
Edit > Configure....
The Configuration Properties inspector displays.

2. Expand to display the parameters for each category.


The Configuration Properties inspector for a materialized view contains six
categories, and each category, except for one, corresponds with a dimension table
category. For a discussion of those categories common to dimensions and
materialized views, see the discussion on page 8-11.
The lone exception, Materialized View Parameters, is described in detail on the
following page.

Usage Notes:
■ OWB does not generate code for a view if its query text is not included
in its Properties inspector nor if it has no columns defined.
■ OWB generates a Create Materialized View statement to deploy the
view even if its syntax is invalid: OWB does not check the syntax of
the select statement used to define a view.

Configure, Generate and Deploy 8-17


Configuring a Physical Instance

Materialized View Parameters


These determine how Oracle8i manages the view:

Parameter Default Description


Build Immediate Immediate populates the view when it is created.
Deferred delays population until the next refresh operation.
Refresh Complete Complete specifies the complete refresh method implemented
by executing the view’s query.
Fast specifies the incremental refresh method which
refreshes the view according to changes that have occurred
to the master tables.
Force specifies that when a refresh occurs, Oracle8i performs
a fast refresh if possible or a complete refresh otherwise.
For more information on restrictions to the refresh
parameter, see the Oracle 8i documentation.
Query Rewrite Enable Enable marks the view eligible for query rewrite.
Disable marks the view ineligible for query rewrite.
Base Tables Blank Type in the exact name of the base tables separated by
commas. If the tables were created in Preserve Case, enclose
table names with quotes.

Configuring Sequences
OWB generates a script for each sequence object. Each sequence object has a start
and increment parameter. Both parameters are numeric.
To configure a Sequence:
1. Open the Warehouse Module Editor, select the Sequence and select Edit >
Configure....

8-18 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

The Configuration Properties inspector displays.

2. Expand to display the parameters for each category.

Configuring Tables
OWB generates multiple scripts to create a table depending on how the table is
created. One creates the table and there are separate scripts for each constraint that
is defined on the table, there is also an ANALYZE TABLE.. script generated.
Additional scripts are generated when indexes are defined on the table.
To configure a Table:
1. Open the Warehouse Module Editor, select the Table and select Edit >
Configure....
The Configuration Properties inspector displays.

Configure, Generate and Deploy 8-19


Configuring a Physical Instance

2. Expand to display the parameters for each category.


The configuration parameters for a table specify how these scripts are generated
and whether the table is deployed. The Configuration Properties inspector for a
table contains five categories, and are a subset of the categories defined for a
dimension. The discussion on page 8-11 describes each of these parameters. The
following section describes the configuration of indexes, and partitions that you
want created on a table when it is deployed.

Note: Indexes, and Partitions are purely physical objects. They are
not created during the logical modeling. They must be created in
the Configuration Properties inspector before you can configure
their parameters. See "Configuring New Physical Objects" on
page 8-4 for more information.

Indexes
Indexes are created on tables to speed up query processing. They are often created
on large materialized views for the same reason. You can create definitions for
single and multiple column indexes. After you create a definition for an index, you
can then generate either a BITMAP, UNIQUE, or a non-specific index.

Table 8–8 Index Parameters


Parameter Default Description
Index Columns None The columns in the index.

8-20 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Table 8–8 Index Parameters


Parameter Default Description
Log to Redo Logging Indicates whether the creation of the index
will be logged in the redo log file. Set to
nologging to improve performance.
Parallel Parallel Select parallel if you want Oracle to select a
degree of parallelism. If you are using a
non-Oracle database, set to nonparallel to
improve performance.
Tablespace Users Specifies the tablespace to hold the index in
Index Type Bitmap The type of index: bitmap or unique
Local Index true Allows you to specify that the index is
partitioned on the same columns, with the
same number of partitions and the same
partition bounds as the table.
Name blank The name of the index
Previous blank Previous name of the index when it was
Deployment last deployed. This is used during
Name warehouse upgrade
Deployable true Specifies if this index is deployable.

Bitmap indexes are created on a fact table’s foreign key reference columns to take
advantage of the Oracle8i Star Transformation algorithm. Composite indexes are
created on a subset of a table’s foreign key reference columns. This more
application-specific index is created to take advantage of the Oracle8i star
optimization algorithms and works well when user queries mostly constrain a
subset of a fact table’s dimensions.
For a complete discussion of indexing strategies, see the Oracle8i Data Warehousing
and Oracle8i Designing and Tuning for Performance Release 3 (8.1.7 or 9i) guides.

Partitions
Partitions are created on fact tables to improve query and load performance and to
simplify the management of physical storage. Transportable tablespaces are often
introduced for performance reasons and to transport data across Oracle8i databases.
A transportable tablespace is the fastest means to move a large volume of data
between two Oracle8i databases. Dimension tables and materialized views also
occupy storage space and are often candidates for intelligent partitioning.

Configure, Generate and Deploy 8-21


Configuring a Physical Instance

You can create and configure definitions for partitions directly from the
Configuration Properties inspector. A table can be partitioned using hash, range
partitions, or a combination of range and hash partitions.

Table 8–9 Partition Parameters


Parameter Default Description
Value Less Specify the non inclusive upper bound for
Than the current partition. The entry is an
ordered list of literal values corresponding
to column_list in the partition_by_range_
clause. You can substitute the keyword
MAXVALUE for any literal in value_list.
MAVALUE specifies a maximum value that
will always sort higher than any other
value, including NULL.
Tablespace The value specified is the actual physical
attribute of the segment associated with the
table. For partitioned tables, the value
specified for TABLESPACE is the default
physical attribute of the segments
associated with all partitions specified for
the table.
Name blank Name of the partition
Previous blank Previous name of the partition when it was
Deployment last deployed. This is used during
Name warehouse upgrade
Deployable true Specifies if this partition is deployable.

8-22 Oracle Warehouse Builder 3i User’s Guide


Configuring a Physical Instance

Table 8–10 Partition Key Parameters


Parameter Default Description
Type Can be of any built-in data type except
ROWID, LONG, or LOB.
Name blank Name of the partition key.
Previous blank Previous name of the partition key when it
Deployment was last deployed. This is used during
Name warehouse upgrade
Deployable true Specifies if this partition key is deployable.

Hash Partitions To create a hash partition, specify a hash key, number of partitions,
and tablespace names. Oracle partitions the storage space and stores rows according
to a hash algorithm.

Range Partitions To create a set of range partition, you specify a range key, names for
the partitions, and a set of tablespaces. Oracle8i then stores rows in a partition
according to the specified ranges.

Note: If you are using Partition Exchange Loading, please refer to


the Oracle 8i documentation to set up range partitions.

Range with Hash SubPartitions You can create a set of range partitions that have
hashed subpartitions. For this case, create a range partition key, a set of partitions,
and then create a hash partition key to specify the number of logical partitions.

Configuring Views
OWB generates a script for each view defined in a warehouse module. You can
configure whether to deploy specific views or not.
To configure a View:
1. Open the Warehouse Module Editor, select the View and select Edit >
Configure....

Configure, Generate and Deploy 8-23


Validating Definitions

The Configuration Properties inspector displays.

2. Expand to display the parameters for each category.

Usage Notes:
■ OWB does not generate code for a view if its query text is not included
in its Properties inspector nor if it has no columns defined.
■ OWB generates a Create View statement to deploy the view even if its
syntax is invalid: OWB does not check the syntax of the select
statement used to define a view.

Validating Definitions
After you configure a set of definitions for a physical instance, you need to validate
the set before you generate and deploy objects and scripts to a physical instance.
This section describes why validation is necessary and how to validate a selected set
of definitions.

Rationale for Validation


A set of configured definitions need to be validated before scripts are generated for
several reasons. These are some of the main reasons:
■ Malformed definitions
As a flexible design tool, OWB allows you to create definitions that can be
malformed. For example, you could add a foreign key constraints to a fact table
that does not as of yet reference a column in a dimension table. OWB stores this
definition in the warehouse module but the definition will fail the validation
process until the reference is satisfied.

8-24 Oracle Warehouse Builder 3i User’s Guide


Validating Definitions

■ Data type mismatches


OWB allows you to create definitions that allow data type mismatches but the
validation process traps these cases and returns an warning message.
■ Metadata Import Utility
The Import Utility can include definitions that are malformed for a number of
reasons. For more information, see "Metadata Import" on page 10-8.

Valid and Invalid Definitions


During the validation process, OWB assigns a Warning or Error code to each
malformed expression within an individual definition.

Valid Definition
A definition is Valid if the validation process returns no Error codes. The definition
can include one or more Warning codes.

Invalid Definition
A definition is Invalid if the validation process returns at least one Error code. The
definition can also include one or more Warning codes.
The definitions for the following objects are all invalid because their definitions
contain at least one error code.

Configure, Generate and Deploy 8-25


Validating Definitions

Validating a Set of Definitions


You can validate a single definition, a set of definitions, or all the definitions stored
in a warehouse module.
To validate a set of definitions:
1. Open the Warehouse Module Editor, and select an object or group of objects in
the Logical Tree to validate.
2. Select Module > Validate from the toolbar menu.
OWB validates the selected objects’ definitions and returns the results in a
Validation window.

There are two panes in this window: Selected Objects and Validation Messages.
Selected Objects
This part of the window lists summary information for each object selected for
validation. The summary information includes:
■ Names of the objects selected for the validation
■ Date and time of the last validation
■ Status: Valid or Invalid
■ Date and time when the object was last updated.

8-26 Oracle Warehouse Builder 3i User’s Guide


Validating Definitions

There are also three buttons:


■ Validate: This allows you to re-validate after you have made some changes.
■ View: This displays the validation results in a text editor. This can be useful
if you want to save these results to a file.
■ Refresh: This allows you to refresh your validation results. This can be
useful if you are running validations in more that one window.
Validation Messages
This part of the window lists individual violations for the highlighted object:
■ Names of the object that violates a validation rule
■ Validation Code:
Error - This code displays if the script will cause code generation or
deployment failure.
Warning - This code displays if the script may cause failure during
generation, deployment, or runtime
Success - This code displays if the script will not cause any known
problems.
■ Validation message that describes the nature of the violation
There are two buttons:
■ Details: This allows you to view additional details about the object you
have highlighted in the Validation Details window.

■ Edit: This allows you to go directly into an Editor in OWB and edit the
object you have highlighted. For example, if you have a table highlighted
and you click Edit, the Table Editor opens with the highlighted table
displayed.

Configure, Generate and Deploy 8-27


Generating Scripts

Note: OWB returns a Validation Results window when you


validate a definition. To view these results at a later time you can
select View→Validation Messages. OWB returns the same results
in an equivalent window labeled Validation Status.

Generating Scripts
Once you have a validated a set of definitions for a configured physical instance,
you can generate the scripts required to create and populate the instance. During
this phase, OWB generates scripts for the selected warehouse module.
OWB generates several kinds of scripts for a target warehouse:
■ DDL scripts to create or drop database objects

■ SQL*Loader control files to extract and transport data from file sources

■ TCL scripts to schedule and manage jobs (registered with Enterprise Manager)
When you generate objects, it is important to note that a single script is generated
for each physical object you want to create. For example, there is one script for each
index you are creating.
This can be extremely useful if you need to re-deploy a single object at a later time.
This allows you to not have to invest the resources into deploying the entire
warehouse all over again. The following discussion summarizes the actual scripts
generated for each object in the warehouse module.
To generate scripts for a set of objects in a warehouse module:
1. Open the module and select a set of warehouse objects.
As with validation, you can select an individual object, a set of objects, or all the
objects in the module.
2. Select Module→Generate.

8-28 Oracle Warehouse Builder 3i User’s Guide


Generating Scripts

OWB displays a dialog box.

3. Select what kind of script is to be generated and click OK.


OWB generates the scripts and returns the Generated Results window.

Note: OWB returns a Generated Results window when you


generate a script to create an object. To view these results at a later
time you can select View→Generated Scripts. OWB returns the
same results in an equivalent window labeled Generated Scripts.

Configure, Generate and Deploy 8-29


Generating Scripts

The Generated Scripts


OWB generates a variety of scripts that are used to implement, populate, and run a
configured instance of the data warehouse described by definitions stored in a
warehouse module.
The following discussion summarizes the scripts generated for each kind of
warehouse object. These summaries correspond with the branches of a warehouse
module’s physical navigation tree.

Database Links
A data warehouse pulls data from its database sources using database links. The
mechanism is straightforward:
■ OWB generates a script for a database link to the source database.
■ The database link is deployed in the target schema.
■ The PL/SQL scripts that pull data from a source database reference the source
tables using the deployed synonyms.
For example, OWB generates the following script to create a database link to the
GCCAPPS source.
ALTER SESSION ENABLE PARALLEL DDL;
CREATE DATABASE LINK GCCAPPS
CONNECT TO gccapps IDENTIFIED BY manager
USING ’gccnc’;

This database link is deployed to the physical instance by executing the script.

Dimensions
OWB can generate multiple ddl scripts for each dimension depending on whether
indexes are configured. The scripts can include a ddl script for:
■ The underlying table and its configured partitions
■ The hierarchies and levels defined on the table.
■ The indexes and index partitions configured for the table.

8-30 Oracle Warehouse Builder 3i User’s Guide


Generating Scripts

After generating the ddl, OWB returns the Generation Results window.

The Generated Results window contains a list of scripts that create three different
kinds of objects for the Days dimension:
■ A Table
■ A Dimension
■ An Index
You can view any of the generated scripts by selecting the dimension’s name and
then clicking the View button. The example below illustrates the code generated to
add hierarchies onto an existing table:
ALTER SESSION ENABLE PARALLEL DDL;
CREATE FORCE DIMENSION customers_DIM
LEVEL customer IS CUSTOMERS.cs_cust_WH
LEVEL account IS CUSTOMERS.at_account_ID
LEVEL segment IS CUSTOMERS.sg_segment_ID
HIERARCHY customer_sums (
customer CHILD OF account CHILD OF segment )
ATTRIBUTE customer DETERMINES (cs_loctype,cs_ship_to_num)
ATTRIBUTE account DETERMINES (at_account_desc)
ATTRIBUTE segment DETERMINES (sg_segment_desc);

Views and Materialized Views


OWB can generate multiple ddl scripts for each materialized view depending on
whether indexes are configured for the view. The scripts can include ddl scripts for:
■ The materialized view and its configured partitions.
■ The foreign key reference constraints.
■ The indexes and index partitions configured for the table.
■ The partitions configured for the table.

Configure, Generate and Deploy 8-31


Generating Scripts

After generating the ddl, OWB returns the Generated Results window. You can view
the generated code and deploy the materialized view from this window.
If the view you are generating is part of a mapping, OWB does not generate a ddl
script for the view. OWB generates regular package with assumption that the view
is updatable. No error checking is done to verify if view is updatable or not.
You must make sure that the view meets the definition of an updatable view before
including this view into the map. See the Oracle 8i SQL Reference for the definition
of updatable view. Views and materialized views are generated in the same way as
regular tables

Notes: When you generate scripts for a view:


■ OWB does not generate code for the view if a query script in its
definition has an error. OWB does not check the query script for
errors when you define the view.
■ If a view references dimensions, then you must deploy the
dimensions before you deploy the view.

Mappings
OWB generates multiple scripts to implement each PL/SQL mapping:
PLS scripts create the PL/SQL packages that pull data from database sources,
perform transformation operations, and load data into the physical instance of
the data warehouse.
DDL scripts create database links.

TCL scripts that are registered with Oracle Enterprise Manager and Oracle
Workflow to support job scheduling as well as to capture and log audit and
error information.

Run the Packages When OWB returns the Generated Results window for a mapping,
it enables the Run button. Thus, after you deploy the mapping to the target schema,
you could push this button to load data into the target warehouse. See Chapter 9,
"Periodic Loads and Updates" for information on how to schedule and monitor
database loading using Oracle Enterprise Manager and Oracle Workflow, and see
Chapter 10, "Administration" for information on analyzing audit and error
messages using the Builder Runtime Audit Viewer.

8-32 Oracle Warehouse Builder 3i User’s Guide


Generating Scripts

Sequences
OWB generates a single DDL script for each sequence defined by the warehouse
module. Each script creates a sequence object in the physical instance.

Tables
OWB generates multiple DDL scripts for each table which include DDL scripts for:
■ The table and its configured partitions
■ Constraints on the table
■ The indexes and index partitions configured for the table
■ The partitions configured for the table.
After generating the DDL, OWB returns the Generated Results window. You can
view the generated code and deploy the dimensions from this window.

Note: Fact tables always reference dimensions over foreign key


reference columns. You must deploy the referenced dimensions to
the physical instance before you deploy the fact table.

Post Generation Tasks


After the scripts have been generated, the Generated Scripts window displays with
two tabs:
■ The Schema Objects Tab
■ The Transforms Tab

Configure, Generate and Deploy 8-33


Generating Scripts

The Schema Objects Tab.

The Schema Objects tab displays objects that you can deploy to create your
warehouse. Use the Ctrl button to select multiple objects.
You can select from these actions:
■ View Code: Use this button to view and edit the code generated by OWB.
Select the object’s name and then click View Code. OWB returns the generated
code in a code editor. You can choose to view or edit the code. If you edit the
code, you will be prompted to save your changes when you close the window.
■ Deploy...: This deploys the selected objects to your target data warehouse. See
the descrption under the Transforms tab for more information.
■ Save as File: This allows you to save the code to a file in order to use another
tool to deploy. See the descrption under the Transforms tab for more
information

8-34 Oracle Warehouse Builder 3i User’s Guide


Generating Scripts

The Transforms Tab.

The Transforms tab displays mappings that you can deploy to create your
warehouse. Use the Ctrl button to select multiple objects.
Select an object and choose from these actions:
■ View Code: Use this button to view and edit the code generated by OWB.
Select the object’s name and then click View Code. OWB returns the generated
code in a code editor. You can choose to view or edit the code. If you edit the
code, you will be prompted to save your changes when you close the window.
■ Deploy...: Use this button to deploy selected object to a physical instance of the
warehouse. This is the point in time when your data warehouse is physically
created. In order to create your data warehouse, you must select all the
necessary generated scripts and then click Deploy... .You must select the
runtime database you are deploying to each time you deploy. This allows you
to be able to configure once and deploy to many instances.
OWB allows for flexible deployment. This means that you have the option of
selecting which scripts you want to deploy to your warehouse. Typically, you
would deploy all scripts when you initially create your warehouse. However, if
you decide to create additional objects, such as indexes at a later time, you have
the option of generating and deploying those scripts without having to
re-deploy your entire warehouse.

Configure, Generate and Deploy 8-35


Generating Scripts

■ Save as File: This allows you to save the code to a file in order to use another
tool to deploy. Choose this option when you want to deploy a script that creates
an object to a subdirectory of the Top Directory. The Top Directory is an
operating system directory that is configured for the warehouse module.
OWB writes the generated script to a subdirectory that corresponds with the
script’s language as defined in the Generation Results or Generated Scripts
inspector. Specifically, the script is written to the file:
\Top Directory\ddl\database_link_name.ddl
For example, the generated scripts for the Customers dimension are written to
the DDL subdirectory in the following form:
e:\target\ddl\Customers.ddl
e:\target\ddl\Customers_DIM.ddl
Where the Top Directory was configured as e:\target.
■ Run: Use this button to run a deployed PL/SQL package that implements a
mapping. The usage of this button is intended for testing PL/SQL load
packages with a relatively small data samples. Initial loads and periodic
refreshes of a physical instance should be scheduled as jobs.

Note: This function will run the last deployed package that is
currently in the database. If you have made changes, you must first
re-deploy, before running the scripts.

■ OEM Register: Use this button to register the selected TCL scripts with Oracle
Enterprise Manager. OWB generates one TCL scripts for each mapping. Oracle
Enterprise Manager and Oracle Workflow uses the TCL script to initiate,
execute, and terminate the capture of audit statistics and error messages. If you
plan to schedule jobs using Oracle Enterprise Manager or Oracle Workflow, you
must register the TCL script with Oracle Enterprise Manager.

8-36 Oracle Warehouse Builder 3i User’s Guide


Deploying Scripts

Notes:
■ If you modify the configuration parameters in any way, you
must regenerate the scripts, redeploy all of them, and then
reregister them with OEM.
■ If you attempt to register a job with Enterprise Manager that
already exists in its Job Library, OWB returns a VDJ-2003 error.
You must remove the job from Job Library before you can
successfully register a new version.

Deploying Scripts
To create and populate the physical instance of the data warehouse, you run the
generated scripts to deploy objects in the target schema, deploy the scripts to an
operating system directory, register the scripts with Oracle Enterprise Manager and
Oracle Workflow, and then schedule jobs to initially load the warehouse.
To deploy generated job scripts:
1. Select a module and open the Warehouse Module Editor.
2. Select View > Generated Scripts.

Configure, Generate and Deploy 8-37


Deploying Scripts

The Generated Scripts window displays with the Schema Objects tab on top.

3. Select the tab that contains the object or mapping you want to deploy and click
Deploy.... You can select multiple objects by pressing Ctrl while you select.
The Connection Information dialog displays.

4. Specify the runtime connection information and click OK.

8-38 Oracle Warehouse Builder 3i User’s Guide


Deploying Scripts

The Database Deployment dialog displays. Use this to verify the objects you are
deploying.

5. Click Create to continue with the deployment.


The deployment process runs and writes the scripts to the file system
configured as Top Directory in the warehouse module. Once the process is

Configure, Generate and Deploy 8-39


Deploying Scripts

complete, the Database Deployment dialog displays again, only this time, the
results of the deployment are displayed in the lower half of the window.

Note: To change the suffix appended to each mapping’s name


(JOB), see the discussion on configuring a warehouse module in the
section "Generation Target Directories" on page 1-27.

6. Click Close. The scripts have now been deployed to the database.

Note: When you schedule and execute jobs using Oracle


Enterprise Manager or Oracle Workflow, you must deploy the
following TCL scripts generated by OWB to the Top Directory:
■ SQL*Loader mapping

■ PL/SQL mapping

■ External OS Command mapping


■ Pure Extract mapping
■ Pure Integrate mapping

8-40 Oracle Warehouse Builder 3i User’s Guide


Upgrading a Warehouse Physical Instance

Upgrading a Warehouse Physical Instance


Once you have populated a physical instance, you may later need to drop,
reconfigure, rename, and upgrade the objects in this instance to reflect changes in
your environment. OWB enables you to directly propagate incremental changes in
your logical warehouse design to your physical instance, without having to drop
objects or lose existing data. For example, you may have tables containing data in
your physical instance. If you modify the definition of these tables within OWB by
adding an index, changing a constraint, or renaming a column, you can directly
reconcile these changes with the tables in your physical instance using the
warehouse upgrade feature. Your changes are applied in a manner that preserves
the existing rows of data within the tables in the physical instance.

Figure 8–1 Warehouse Physical Instance Upgrade

Change Repository
Metadata

Warehouse Warehouse
Metadata Analysis
Analyzed

Upgrade Impact
Plan Generated Report

SQL and DDL Generate


Scripts Generated Code
for Upgrade

Execute Upgrade
Scripts Warehouse

OWB utilizes the Change Management (CM) Pack to analyze the existing contents
of a target instance and synchronize them with changes in the OWB warehouse
design. Next, OWB provides an Impact Report generated by CM detailing the plan
for the upgrade; CM also generates necessary SQL and DDL scripts to manage this
transition. Before executing the scripts, you should review the Impact Report to
make an informed choice on whether to perform the upgrade or take the
appropriate action.

Configure, Generate and Deploy 8-41


Upgrading a Warehouse Physical Instance

Note: The Change Management Pack only comes with Oracle


Enterprise Manager 2.2 and Oracle 8.1.7 and higher.

You can create, add, update, and rename the following Warehouse objects:

Dimension Table Materialized View Constraint (UK, FK, and


check constraint)
Dimension Object Materialized View log Indexes
Hierarchy Table Database link
Fact Table View

Note: The upgrade feature does not work if you deploy a table
with Float data type because the OEM Change Management Pack
does not support it. If you want to upgrade tables with FLOAT data
type, the NUMBER data type can be used to achieve the same
results.

The warehouse upgrade feature does not currently support deleting objects. To
a

delete an object, you can select the Drop objects first checkbox in the Generation
Mode dialog. This will create DROP scripts for the objects selected.

OWB and the OEM Change Management Pack (OEM/CM)


Before you choose to upgrade a warehouse instance, OWB analyzes the difference
between your warehouse design and the target warehouse instance. For this
purpose, OWB utilizes OEM/CM to compare OWB metadata against objects in the
target warehouse.
For example, the change can be as simple as adding a column to a table, or it can be
as complex as adding a column, removing a column, adding an index and removing
a partition all at once . OWB passes information on to CM in terms of what the
target table should look like. CM processes this information and generates the
scripts necessary for creating the table as well as creating a report which lists, in
detail, the impact the changes will have. OWB retrieves the impact report generated
by CM. An SQL summary of the changes that will take place is provided by CM.
CM then generates a TCL script to deploy the changes.

8-42 Oracle Warehouse Builder 3i User’s Guide


Upgrading a Warehouse Physical Instance

For OWB to utilize the OEM Change Management Pack, you must have:
■ Oracle 8.1.7 database running.
■ OWB 3i client installed in the same Oracle home as the Oracle 8.1.7 client.
■ OEM Change Management 2.2 installed in the same oracle home as Oracle 8.1.7
client, with OMS 2.2 running on an accessible host.
Additionally, you need to configure the OEM Preferences panel within the OWB
Preferences window.
To configure the OEM Preferences panel
1. Select Project > Preferences.
OWB returns the OWB Preferences window containing seven tabs.
2. Select the OEM tab.
3. Enter the following connection information:
■ The OEM Domain - This should be the same machine that you used during
the OEM installation. For more information, please refer to the OWB
Installation Guide.
■ The OEM User
■ The OEM Password
4. Click OK.
OWB is now configured to utilize the OEM Change Management Pack technology.

Generating and Executing Upgrade Scripts


To update scripts for a set of objects in a warehouse module, open the warehouse
module editor and select a set of definitions you want to upgrade. As with
validation, you can select an individual definition, a set of definitions, or all the
module’s definitions (See discussion "Generating Scripts" on page 8-28).
To generate and execute upgrade scripts
1. Right-click any warehouse module or objects under any warehouse module in
the Logical Tree, and select Module/Object→Generate.
OWB returns the Generation Mode dialog.

Configure, Generate and Deploy 8-43


Upgrading a Warehouse Physical Instance

2. Select the radio button next to Generate upgrade scripts.

3. Click OK.
OWB returns the Connection Information dialog.
4. Enter the username, password, machine name, port number and SID for the
target runtime schema you want to upgrade.

5. Click OK.
OWB returns the Generation Progress panel indicating the progress of the
analyses and script generation for the selected objects.
Once the process is complete, OWB returns the Generation Results dialog.
6. The Generation Results dialog displays an “Impact Report” listing all objects to
be upgraded using the newly generated scripts.

Note: There is only one Impact Report generated for all the objects
selected for upgrade.

8-44 Oracle Warehouse Builder 3i User’s Guide


Upgrading a Warehouse Physical Instance

From this dialog, you can view the Impact Report and Generation Summary
information and perform the following actions:
■ View Code
Click this button to view a SQL summary of the changes that will take
place. The summary is shown in a separate window and is read-only.
If you view the generated code, you will see hints that contain previously
deployed object names. This is included for informational purposes only.
For example, if you are changing the name of the object from DIM to DIM1,
DIM will be in the hint. This basically informs you that the table DIM1 that
you are creating, was named DIM when it was created last.
■ Upgrade
Use this button to upgrade the selected objects at the physical instance of
the target warehouse.
■ Save File
■ Print File

Configure, Generate and Deploy 8-45


Upgrading a Warehouse Physical Instance

7. If there are no errors and your schema objects can be readily upgraded from the
information supplied, the Upgrade button is activated. Click Upgrade to run
the scripts.

Note: If the Upgrade button is deactivated, look for error


messages within the Impact Report.

OWB returns the Upgrade dialog.

8. The Upgrade dialog confirms script that will upgrade the objects that were
selected. At this point, you must click Execute to execute the script.

9. When the script completes, you can either click Commit to save the changes
you have made, or Rollback to erase the changes and stop the upgrade.
The physical instance in your target warehouse is upgraded.

8-46 Oracle Warehouse Builder 3i User’s Guide


Upgrading a Warehouse Physical Instance

10. Close the window.

Note: Since dimensions are not supported by CM, when a


dimension is upgraded, OWB will drop and create the dimensions.
The drop and create statements appear along with the summary
scripts.
These statements are executed only after you commit and close the
Upgrade window.

Configure, Generate and Deploy 8-47


Taking the Next Step

Taking the Next Step


This chapter showed you how to implement a physical instance of a logical
warehouse. The following tasks were described:
■ Configure a physical instance of the logical warehouse defined by a OWB
warehouse module.
■ Validate a set of configured definitions
■ Generate a complete set of scripts to create, populate, and run a physical
instance of the logical warehouse.
■ Deploy the warehouse objects to a physical instance.
■ Test the PL/SQL packages deployed to a physical instance.
■ Register TCL scripts generated by OWB with Oracle Enterprise Manager.
■ Move, or upgrade, a physical instance to a new version of OWB.
The physical instance of the data warehouse is now ready to be loaded with data.
The next chapter, “"Periodic Loads and Updates",“ shows you how to use Oracle
Enterprise Manager and Oracle Workflow to schedule jobs that initially load data
into the physical instance and periodically refresh the instance.

8-48 Oracle Warehouse Builder 3i User’s Guide


9
Periodic Loads and Updates

This chapter shows you how to set up and schedule jobs that initially load and
periodically refresh a data warehouse. You can enforce the job processing sequence
manually or through automation. This chapter illustrates both methods.
This chapter covers the following topics:
■ Loading and Updating Jobs
■ Scheduling with Oracle Enterprise Manager
■ Managing Dependencies Using Oracle Workflow
■ Viewing the Runtime Audit
■ Taking the Next Step

Periodic Loads and Updates 9-1


Loading and Updating Jobs

Loading and Updating Jobs


Jobs that load new data or update existing data in a data warehouse must be run in
a strict sequence to insure that all foreign key references can be satisfied. Generally,
this means that referenced tables must be loaded before the tables making the
references can be loaded.
The most obvious case is a fact table and its dimensions. The dimensions must be
loaded before the fact table can be loaded. A less obvious case is a materialized
view, its underlying fact table, and the dimensions it references. The materialized
view cannot be refreshed until the fact table and the referenced dimensions have
been loaded.
To insure that warehouse load and refresh jobs are correctly sequenced, you can
schedule the jobs in batches, one batch at a time. After the first batch finishes, you
check its completion status before you schedule the second batch, and so on.

Scheduling Jobs
There are two main ways for you to schedule your deployed scripts:

Manual Scheduling After you generate and deploy your scripts you are given the
option of registering them as jobs in Oracle Enterprise Manager (OEM). You can
then schedule a job, or sequence of jobs. OEM allows you to manually schedule
each job within a batch and check the completion status of each job in the batch
before scheduling the next batch. For more information about scheduling using
OEM, see "Scheduling with Oracle Enterprise Manager" on page 9-3.

Automated Scheduling After setting up your jobs in OEM, you can proceed to
automate those jobs based on a process you define. Oracle Workflow allows you to
automate the entire schedule for a set of jobs by defining a process. You can then
schedule the process rather than the individual jobs. The Oracle Workflow server
manages the process so that jobs run in the proper sequence. If an exception occurs,
the Workflow server terminates the process. This minimizes rather than eliminates
manual intervention. For more information about scheduling using Workflow, see
"Managing Dependencies Using Oracle Workflow" on page 9-10.

Types of Jobs
These are the different types of jobs listed in the OEM:
■ Loader Mappings extract and load data from flat file sources.
■ PL/SQL Mappings extract, transform, and load data from database sources.

9-2 Oracle Warehouse Builder 3i User’s Guide


Scheduling with Oracle Enterprise Manager

■ Pure*Extract and Pure*Integrate Mappings are imported from an exported file.


■ Generic Mappings allow operating system scripts to be executed.
The Loader and PL/SQL scripts were generated and deployed to the target
warehouse. The following discussion shows you how to deploy generated job
scripts (TCL) associated with these mappings to a file system configured in the
warehouse module. The file system is configured as the Top Directory and the
subdirectories are configured as Target Generation Directories.
You can deploy and register any kind of mapping script to Enterprise Manager’s
Job Library including Pure Integrate Mappings.

Note: If you modify a configuration value in a warehouse module


or a mapping definition after the scripts have been deployed to the
Generation Directories or registered with Oracle Enterprise Manager,
you must:
■ Re-generate the scripts.
■ Re-deploy the scripts to the Generation Directories.
■ Re-register the scripts with Oracle Enterprise Manager. You
will need to remove the existing scripts from the Job Library.
These three steps should be standard operating practice even if the
configuration change seems to be a minor one.

Scheduling with Oracle Enterprise Manager


To schedule jobs with Oracle Enterprise Manager, make sure you have completed
the follow steps:
■ Configured the target schema’s warehouse module.
■ Created a Windows NT user name.
■ Configured a set of Preferred Credentials for Enterprise Manager.
■ Started services for Oracle Agents and Enterprise Manager on the machine that
hosts the target schema.
If you have not, please see the Installation Guide for more information.
The next steps in scheduling jobs with OEM are deployment and registration.

Periodic Loads and Updates 9-3


Scheduling with Oracle Enterprise Manager

Deploying and Registering the Jobs


After the warehouse module for the target warehouse schema has been configured
and Enterprise Manager has been supplied with a set of preferred credentials, you
can deploy the generated scripts and register them with Enterprise Manager.
The deployment and registration takes three steps:
1. Deploy the job scripts to the file system configured in the warehouse module.
2. Register the generated scripts with Enterprise Manager.
3. Verify that the scripts have been registered in Enterprise Manager’s Job Library.

Registering Job Scripts


To register generated job scripts:
The deployment process runs and writes the scripts to the file system
configured as Top Directory in the warehouse module. Once the process is
complete, the Database Deployment dialog displays again, only this time, the
results of the deployment are displayed in the lower half of the window.

9-4 Oracle Warehouse Builder 3i User’s Guide


Scheduling with Oracle Enterprise Manager

Note: To change the suffix appended to each mapping’s name


(JOB), see the discussion on configuring a warehouse module in the
section "Generation Target Directories" on page 1-27.

4. Click Close. The scripts have now been deployed to the database.
5. Select the deployed scripts and click Save as File. The scripts must be saved or
you will get an error message if you attempt to register them.
6. Select the objects you want to register with OEM and click OEM Register. You
must select the TCL language jobs to register with the OEM.
OWB connects with Enterprise Manager, registers the scripts necessary to run
the load jobs, and returns a confirmation list.

Verifying OEM Registration


To verify registration, start the Enterprise Manager Console. Then, from the tool bar:
1. Select Job > Job Library

Periodic Loads and Updates 9-5


Scheduling with Oracle Enterprise Manager

Enterprise Manager returns a list of jobs currently registered in its library.

You can select a specific job and set up its schedule directly from this window.
Examples in the next section show you how.

Note: You cannot register a job with Oracle Enterprise Manager if


that job already exists in Enterprise Manager’s Job Library. To
update an existing job, remove the job from the Job Library first.

9-6 Oracle Warehouse Builder 3i User’s Guide


Scheduling with Oracle Enterprise Manager

Scheduling the Jobs


Now that all the job scripts that initially load the warehouse have been registered,
you can schedule the jobs and check their runtime status using Oracle Enterprise
Manager. You schedule a job directly from the Enterprise Manager’s Job Library
Window and check its status from the Enterprise Manager’s Job pane.

Scheduling
To schedule a job, select the job’s name, click Edit. Enterprise Manager returns a
multi-page Edit Job window. Select the Schedule tab. Enterprise Manager returns
the Schedule page.

Specify the schedule and close the window. You can submit the job from this panel
now or later.

Submitting the Job


Once the job has been submitted, Enterprise Manager places an entry in the Jobs
window. This Window has two panes: Active and History. You can track the status

Periodic Loads and Updates 9-7


Scheduling with Oracle Enterprise Manager

of a submitted job (Submitted or Running) from the Active pane. After the job has
completed, you can check its status in the History pane (Completed or Failed).

If you right-click the job’s name from the History pane, Enterprise Manager returns
a pop-up list that allows you view more details regarding the job, remove the job
from the history log, or create another job like the selected job.
The Enterprise Manager’s log contains summary information about a job’s
execution, but in those cases when the job fails to terminate normally, you need
more detailed information. The OWB Runtime Audit Viewer provides that type of
information. For more information, see "Viewing the Runtime Audit" on page 9-23.

Note: The above discussion barely introduces you to Oracle


Enterprise Manager. For an in-depth discussion of its advanced
scheduling capabilities, refer to the online reference materials
within the Oracle Enterprise Manager product.

Submitting Jobs with Parameters


The default value is stored in the mapping’s configuration parameters. If you open
the parameter panel for this mapping, you can modify the value. This action takes
effect only if you re-generate the script.
The default value occurs in one of the TCL scripts generated by OWB. You can
modify the parameter’s value before you submit the job through Oracle Enterprise
Manager.
The following example shows you how to modify a parameter’s value when you
submit the job.

9-8 Oracle Warehouse Builder 3i User’s Guide


Scheduling with Oracle Enterprise Manager

Running the TCL Script To modify a parameter’s value for a job using Enterprise
Manager, open the Job Library from the toolbar, select the job name (SALES_
MAPPING_job), and then click Edit. OWB returns the Job Editor window. Select the
parameters tab. OWB returns the Parameters panel.
Select the TCL script and locate the parameter in the Parameters text box. Modify
the parameter in the text box and then submit the job.

Periodic Loads and Updates 9-9


Managing Dependencies Using Oracle Workflow

Managing Dependencies Using Oracle Workflow


To automate the scheduling of an entire set of jobs, you can define an Oracle
Workflow process. Then, you schedule the process rather than the individual jobs,
and the Oracle Workflow server manages the jobs so that they run in the proper
sequence. If an exception occurs, the Workflow server terminates the process. This
approach minimizes manual intervention.
To define a process that sequences a set of jobs defined within a warehouse module,
follow this general procedure:
1. Configure, validate, and generate the mappings.
2. Deploy the generated mappings to the Generation Target Directories and the
PL/SQL packages to the target database.

3. Register the generated mappings with Oracle Enterprise Manager.


4. Define the Workflow Queue Listener Directory and Host for the warehouse
module. These are the configuration parameters on the warehouse module that
allow you to specify the host and the location for the OWB Workflow Queue
Listener to execute.
5. Deploy the mappings as functions identified by an Item Type to the Oracle
Workflow server using the Workflow Deployment Wizard.
If you plan to schedule the Workflow process with Enterprise Manager, deploy
the process to the Enterprise Manager’s Job Library.
6. Define the workflow process using Oracle Workflow Builder.
7. Schedule the Workflow Process using Oracle Workflow Monitor or with Oracle
Enterprise Manager.
The following section describes how to define an Oracle Workflow process for the
jobs that initially load the warehouse.

Note: This example assumes that:


■ You are familiar with the terminology of Oracle Workflow Products.
■ The Oracle Workflow server, Oracle Workflow Builder, and Oracle
Workflow Monitor have been installed and configured.
■ The OWB Workflow Queue Listener Directory and Queue Listener
Host parameters have been configured.

9-10 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

Deploying to the Oracle Workflow Server


After you have deployed the mappings to the Generation Target Directories and the
PL/SQL packages to the target database, registered the TCL scripts for individual
jobs with Oracle Enterprise Manager, you can deploy the mappings to an Oracle
Workflow server using the Workflow Deployment Wizard.

Using the Workflow Deployment Wizard


To use the Workflow Deployment Wizard:
1. Select Tool > Wizard > Workflow Deployment Wizard from the OWB console,
or expand the wizard drawer and click the icon for the Workflow Deploy
Wizard.

The Workflow Deployment Wizard Welcome page displays.

2. Click Next.

Periodic Loads and Updates 9-11


Managing Dependencies Using Oracle Workflow

The Workflow Login page displays.

3. Specify the following connection information:


■ User name
■ Password
■ Host name
■ Port number
■ SID for database instance of the Workflow server
The OWB client uses this information to establish a session with the Oracle
Workflow server.
4. Click Next.

9-12 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

The wizard returns its Maps page which solicits a list of mappings to be
deployed.

This page has two panes:


■ Available maps
■ Selected Maps
Move the names of those maps that belong to the process to the Selected pane.
5. Click Next.

Periodic Loads and Updates 9-13


Managing Dependencies Using Oracle Workflow

The wizard returns its Functions page which identifies the names that Oracle
Warehouse Builder assigned to the individual mappings. Within Workflow,
these mappings are called "functions."

To display the internal function name for a specific mapping, select the
mapping’s name in the navigation tree. The wizard returns the function’s
internal name, display name, and description.
You cannot modify names on this page.
6. Click Next.
■ The Item Type page displays.

Specify the following:


■ An internal name of no more than eight characters.
■ A display name of no more than eighty characters. The name can include
spaces.

9-14 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

■ A Description of no more than 240 characters.

Note: If the Item Type you are defining already exists with the
Workflow server, it is overwritten. This includes any modifications
such attribute values and process diagram dependencies.

7. Click Next.
The Process page displays.

Specify the following information:


■ An internal name of no more than thirty characters.
■ A display name of no more than eighty characters. This name can include
spaces.
■ A Description of no more than 240 characters.
8. Click Next.

Periodic Loads and Updates 9-15


Managing Dependencies Using Oracle Workflow

The Finish page displays.

Verify the contents of this page. Use the Back button to make changes.
9. Check the Deploy the workflow process to OEM? box if you intend to
schedule the workflow process using Oracle Enterprise Manager.
The wizard deploys the name of the process to Enterprise Manager’s Job
Library only if the warehouse module is configured for Oracle Enterprise
Manager. No other method is available to deploy the process name to the Job
Library.
10. Click Finish.
The wizard deploys the mappings as a set of Workflow functions defined with
the specified Item Type to the Workflow server.

Access Level: The mappings deployed to the Workflow server


are assigned an access level of 20. Oracle Workflow Builder can edit
these mappings only if it has an access level less than or equal to 20.

You can now start the Oracle Workflow Builder and define the process to initially
load the Warehouse.

9-16 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

Defining the Workflow Process


To define a process, open the Oracle Workflow Builder client and set its access level,
open the Item Type that contains the deployed mappings, and then define the
workflow process.
1. Start Oracle Workflow Builder
Oracle Workflow Builder returns its Navigator window.

2. To set the client’s access level, Select Help > About Oracle Workflow Builder.
The About Oracle Workflow window displays. This window defines the access
level. You can change its access level by entering a new value.
Each function stored in a Workflow Server has a specific access level between
zero and one thousand. The Workflow Builder client can edit a function only if
its access level is less than or equal to that of the function.
The Workflow Deployment Wizard assigns each function an access level of (20)
during the deployment operation. Thus, to edit these functions, you must set
the access level of the OWB client to a value less than or equal to twenty.
3. Set the Workflow Builder client’s access level to a value less or equal to twenty
and Click OK.
4. Select File > Open or click the Open icon.

Periodic Loads and Updates 9-17


Managing Dependencies Using Oracle Workflow

OWB returns its Open dialog.

5. Select the Database button and then enter connection information for the Oracle
Workflow server:
■ User name and password pair for the server
■ SQL*Net connect string

6. Click OK.
Oracle Workflow Builder returns a list of Item Types in a selection panel.

7. Move the Item Type to the Visible pane and click OK.

9-18 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

The Workflow client returns it Navigator window.

8. Open your load process.


Oracle Workflow Builder inserts into its navigation tree entries for the
mappings deployed from Oracle Warehouse Builder.

Note: Do not modify OWD_STD_ERROR_PROCESS. This is


generated by OWB and there are no user-modifiable parts.

9. Fully expand the navigation tree and open the deployed process.
Oracle Workflow returns the process functions in a separate window.
Oracle Workflow stacks the functions which represent the individual mappings
on top of each other. To define the workflow process, drag each function to a
logical place within the window, and then graph the workflow process.
10. Define the dependencies among the functions as a Workflow process.

Periodic Loads and Updates 9-19


Managing Dependencies Using Oracle Workflow

The graph below illustrates the Workflow process that properly sequences the
Workflow functions to load the data warehouse.

Note: When the Oracle Workflow server executes this job:


■ The functions are processed so that the execution of a function
depends on the successful completion of all its predecessors.
■ The dimension tables are loaded in parallel but the remaining
two jobs run sequentially.

Running the Process


You can now run the process immediately using the Oracle Workflow Monitor or
schedule the process using Enterprise Manager. If you run the job using the Oracle
Workflow Monitor, you must manually start the OWB Workflow Queue Listener.
The example in the next section shows you how to run a process immediately using
Oracle Workflow Monitor.
If you run the job using Oracle Workflow Monitor or Oracle Enterprise Manager,
then you can monitor its progress using the Oracle Workflow Monitor’s Find
Process function.

9-20 Oracle Warehouse Builder 3i User’s Guide


Managing Dependencies Using Oracle Workflow

After the job completes, normally or abnormally, you can view its audit and log
entries using the OWB Runtime Audit Viewer. For more information, see "Viewing
the Runtime Audit" on page 9-23.

Running the Process Immediately


When you run a process immediately using Oracle Workflow Monitor, you must
manually start the OWB Workflow Queue Listener. You can start the Queue Listener
before or after you start the workflow process.
To run a job immediately using Oracle Workflow Monitor:
1. Select Start > Programs > Oracle Warehouse Builder > Oracle Warehouse
Builder Workflow Queue Listener
The OWB Queue Listener returns its Workflow Login panel which solicits
information required to log on to an Oracle Workflow server:

Where:

username/password Log on pair for an Oracle Workflow server


Hostname Name of the host for Oracle Workflow server
Port Listener port on the Workflow host
SID Oracle System Identifier
Item Type Internal name of the Oracle Workflow Item Type

2. Enter the information solicited and then click Logon.


The Queue Listener is now waiting for a message which is identified by the
Item Type.

Periodic Loads and Updates 9-21


Managing Dependencies Using Oracle Workflow

3. Open Oracle Workflow Monitor from your web browser.


4. Select Launch Processes.
Workflow Monitor returns the Launch Processes page.
5. Select a specific Item Type to run (GCC Warehouse Load Processes).
Workflow Monitor returns the Initiate Workflow page.

6. Select a Process Name from the down-arrow list, enter an Item Key, a User Key,
and, if necessary, enter new runtime parameters.
7. Click OK.
Oracle Workflow Monitor starts the process and returns its Notifications List
page. Choose View Diagram on this page to monitor the process.

9-22 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

Scheduling the Workflow Process


You can schedule the process using Oracle Enterprise Manager provided you
deployed it to Enterprise Manager’s Job Library.
To deploy the process, select the Deploy checkbox on the Oracle Workflow Wizard’s
Finish page. There is no other way to deploy a workflow process to OEM.
To schedule the process, find its name in the Enterprise Manager’s Job Library,
modify runtime parameters if necessary, and set up the schedule.

Viewing the Runtime Audit


Use the OWB Runtime Audit Viewer to view the runtime audit information. This is
how you can see specific details of a job after it is run. This information can be
useful when you are scheduling jobs. The Audit Viewer displays the contents of the
OWB Runtime Library for a specific load or refresh job.
For example, you can display the number of records read, number of records
inserted or updated, and detailed information about individual records when errors
occur. This information might be important to you if you are troubleshooting. You
can look for the rows that did not load correctly and you can

Periodic Loads and Updates 9-23


Viewing the Runtime Audit

Setting the Audit Level


The Audit Viewer can only report on audit information that has been stored during
the relevant mapping runs. For PL/SQL mappings, there are four different audit
levels:
■ None: No Task, Detailed Mapping, Error or Error Detail information is
available.
■ Statistics: Task and Detailed Mapping information is available, but Error and
Error Details are not.
■ Error Details (Default): All the information relevant to the Audit Viewer is
available.
■ Complete: This level stores additional information for all rows mapped, but
this extra information is not used by the Audit Viewer.
The Default Audit Level for a mapping is defined in the Mapping’s Configuration
Parameters, but this value can be overridden in the runtime TCL parameters.

Using the OWB Runtime Audit Viewer


To use the Runtime Audit Viewer:
1. Select Start > Programs > Oracle Warehouse Builder > Oracle Warehouse
Builder Runtime Audit Viewer.
The Runtime Audit Logon dialog displays.

2. Specify the runtime connection information and click OK.

9-24 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

The Runtime Audit Viewer opens and displays.

The Runtime Audit Viewer window has two panes. The left pane contains a
navigation tree. The right pane contains a list of details for the node currently
selected in the navigation tree.
3. Use the Navigation tree to select objects in the left pane to display detailed
information in the right pane.
When the Audit Viewer first opens, all of the objects are rolled up under the
Jobs node. As you expand the nodes, you will see the following layers of objects
available to view:
■ Jobs
■ Job Instances
■ Tasks
■ Detailed Mappings
"Understanding the Audit Viewer" on page 9-29 describes each of these areas in
detail.

Periodic Loads and Updates 9-25


Viewing the Runtime Audit

Viewing By Date Range


By default, only the most recent job instance is displayed in the tree, but this may be
controlled using the Date Range facility which can be accessed from either the View
menu or the toolbar.

There are three options:

Option Description
Recent (Default) Only the most recent instance of each job is displayed
All All instances of each job are displayed
Range Only those instances run within a specific date range are
displayed

Note: The Default Job node only has one job instance. The date
associated with this single job instance is the date the warehouse
tables were established, so it may disappear from the tree for some
values of the Range option.

9-26 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

Searching the Navigation Tree


The Find option from the Edit menu or the toolbar can be used to search the
navigation tree for objects with a specific name.

You can select these options:

Option Description
Name This is where you type in the name of the object you are
searching for. Names of targets are enclosed in double quotes.
When entering the name, you can use * to abbreviate the name.
For example:
"D* will match all names beginning with D, and
"D*2 will match all names beginning with D and ending with 2.
Object Type Allows you to search all object types, or one specific type.
Search In This establishes the scope of the search.
Current Folder - searches currently selected object folder in
the navigation tree.
All Folders – searches whole navigation tree.
Match Case Allows you to determine whether or not the alphabetic case
used in the Name you are searching for is significant.

Clicking the Find button displays a list of objects matching the search criteria. You
can then click over one of these entries and then click the Select in Tree button, to
select the relevant object in the navigation tree.

Periodic Loads and Updates 9-27


Viewing the Runtime Audit

The Search In option has two settings. If you select Current Folder, the current
folder you have selected in the navigation tree will be searched for a object with the
name you specified. If the object is found, you may click the Select in Tree button.
This will drill you down in the folder to the object you were searching on. If the
object is in another folder, and you have Current Folder selected, the object will not
be found.

Refreshing the Audit Viewer


You can refresh the data displayed in the Audit Viewer by selecting View >
Refresh. This is useful if you are doing error checking, and you are trouble shooting
a job.

Purging Runtime Entries


You can purge jobs from the runtime tables using the Run Time Audit Viewer. To
purge runtime entries select the Purge option from the Job menu or the toolbar. The
Audit Viewer displays a pop-up dialog box. You can purge jobs according to Job
Date or Job Name.

9-28 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

You should note that as there is only a single job instance entry for ‘Default Job’, it is
not possible to selectively purge the ‘Default Job’ entries. Since the date associated
with this single entry for ‘Default Job’ corresponds to the date the runtime tables
were first established, you should be careful not to purge all the Default Job audit
information accidentally.

Understanding the Audit Viewer


The Runtime Audit Viewer window has two panes. The left pane contains a
navigation tree with objects grouped by object type and rolled up into nodes, or
levels of detail. The right pane displays information about the node that is currently
selected in the navigation tree. In most cases this lists the objects contained within
the object selected with a certain level of information about each object displayed.
So, if the selected node in the navigation tree is expanded, the list of objects under
that node should be the same as the list of objects displayed in the right pane. The
following sections go through and explain each node; what they represent and what
kind of information is supported and displayed by Runtime Audit Viewer for each.

Nodes
Node
Details

Periodic Loads and Updates 9-29


Viewing the Runtime Audit

Viewing the Job Audit


The nodes in the navigation tree below the top Jobs node each represent a job. They
are listed in alphabetical order. The normal way to set up a mapping job is to
register it as a Workflow Process. The corresponding node will appear in the
navigation tree after the first run of the Workflow process.
When the "Jobs" node at the top of the navigation tree is selected, the right-hand
pane displays the list of jobs. This includes DEFAULT_JOB and any other named
jobs that have been run.

Default Jobs and Named Jobs


A mapping can be executed directly from either Warehouse Builder or Oracle
Enterprise Manager or it can be used as a component execution unit within an
Oracle Workflow process.
When a mapping is executed directly, the audit and error information is stored
under the category "Default Job". But when a Workflow process is run, the audit
and error details for the mappings it invokes are stored under the name of the
Workflow process.

Viewing the Job Instance Audit


Expanding one of these job nodes will cause one or more job instance nodes to be
displayed in the navigation tree, each representing a specific instance of its parent

9-30 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

job. Each time a run of the parent job is started, a new job instance is added. The text
alongside shows the name of the job and the time at which the run started.

Selecting a job node in the tree or selecting a job entry in the right hand pane and
clicking the View Instances button displays details about instances of the job. A job
instance represents a specific run of the job. The following information is displayed
for each job instance:

Column Name Description


Job The name of the job.
Date The date and time the run started.
Status The status of the run.
BEGIN indicates the job has started.
COMPLETED indicates the job completed.
FAILED indicates that the job failed to complete.
Errors For a COMPLETED run, this indicates whether any errors
occurred in any of the mappings. It is set to either YES or NO.

The Date Range option affects the job instance entries displayed here in exactly the
same way as the job instances shown in the navigation tree. By default, only the
latest job instance of a job is displayed.

Periodic Loads and Updates 9-31


Viewing the Runtime Audit

If the View errors only box is checked, a job instance will not be displayed unless it
has the Errors column = YES.

Note: The Default Job will always have only one job instance. The
date corresponds to the date the runtime tables were established,
and it will always have Status=BEGIN and Errors= NO, regardless
of the status and error details of the Tasks associated with it.

Viewing the Task Audit


A node representing a job instance can be expanded to display a set of Tasks carried
out as part of the run. For example, the execution of a PL/SQL mapping or an
SQL*Loader run will be represented as a Task. If a Workflow Process consists of
several tasks, each carrying out a PL/SQL mapping, a node representing a run of
the Workflow Process will have a subordinate Task node for each of those
mappings.

Selecting a job instance node in the tree or selecting a job instance entry in the
right-hand pane and clicking the View Tasks button will display information about
the Tasks performed by the job instance.
A Task entry represents a run of a mapping. Task entries are set up both for
mappings that are run as part of a Workflow process and for those that are run
directly. When the job instance represents a run of a Workflow process, there will be
a Task entry for each mapping that is carried out by the process. However, when a

9-32 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

mapping is executed directly, the Task entry will be associated with the single job
instance entry for ‘Default Job’.
If the View errors only box is checked, only those Task entries with errors will be
displayed.
The following information is displayed for each Task:

Column Name Description


Task The name of the task.
Date The date and time the task was started.
Type The type of the mapping (e.g. PL/SQL).
Selected The number of rows selected.
Inserted The number of rows inserted into the target tables.
Updated The number of rows updated in the target tables.
Deleted The number of rows deleted in the target tables.
Errors The number of errors detected.
Status The status of the task.
BEGIN indicates the task has started.
COMPLETE indicates the task completed.
FAILED indicates that the task failed to complete.

The statistics values are normally the sum of the corresponding values in the
relevant Detailed Mapping entries described later. However, the value for the
number of records selected may sometimes be less than the sum of the records
selected in the individual Detailed Mapping entries. (For example, this may occur in
the row-based modes, if mappings to multiple target tables are combined within a
single loop in the generated PL/SQL.)

Viewing the Task Details Audit


A node representing a Task can be expanded to display a set of Detailed Mappings.
These are also referred to as target entries for that Task. In many cases there will

Periodic Loads and Updates 9-33


Viewing the Runtime Audit

only be one Detailed Mapping for a Task, but various scenarios may cause a Task to
have more than one Detailed Mapping.

Selecting a task node in the tree, or the ‘Targets’ node below it, or selecting a task
entry in the right-hand pane and clicking the View Task Details button will display
information about its Detailed Mappings. A Detailed Mapping entry represents a
mapping to a specific target table. A Task that affects multiple target tables will
have a Detailed Mapping entry for each target table. Also, if a PL/SQL mapping is
run in “set based fail over” mode, and the set based run detects errors for a specific
target table, there will be two Detailed Mapping entries for the table. One will be for
the set based run and one for the row based run.
Also, if the relevant detailed mapping cannot be started when processing a Task,
there will be no Detailed Mapping entry for it. For example, a set-based run cannot
be started with certain Loading Types (e.g. DELETE). In these circumstances, a
“set-based fail over” run will immediately switch to the relevant row-based mode,
but a pure set-based run will cause the mapping to be abandoned, the Task itself
will not be marked as COMPLETE, and it will end up with a reduced or empty list
of Detailed Mappings.
If the View errors only box is checked, only those Detailed Mapping entries with
errors will be displayed.

9-34 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

The following details are displayed for each Detailed Mapping:

Column Name Description


Detail Mapping Identifies the detailed mapping. For PL/SQL mappings the form
depends on the mode in which the detailed mapping was run:
■ For set-based mode, it is the name of the mapping followed
by
_Bat.
■ For row-based mode, it is a character-string ending with ‘_
p’.
■ For row-based (target) mode, it is a character-string ending
with ‘_t’.
In row-based and row-based (target) modes, the beginning of
the character-string corresponds to the name of a significant
object in the mapping.)
Status The status of the detailed mapping: BEGIN indicates the
detailed mapping has started. END indicates the detailed
mapping ended.
Selected The number of rows selected.
Inserted The number of rows inserted into the target table.
Updated The number of rows updated in the target table.
Deleted The number of rows deleted in the target table.
Errors The number of errors detected.
Discarded The number of records discarded (during a SQL*Loader run).
Elapsed The elapsed time of the detailed mapping in seconds.
Source Identifies the source of the mapping. (For a PL/SQL mapping,
this may be "table-name" or "table-name"@"schema-name", or a
list of these. For a SQL*Loader run, it identifies the input file.)
Target Identifies the target of the mapping (e.g. a target table).

Note that for PL/SQL mappings, the values of the statistics reported may depend to
some extent on the mode in which the mapping is run; for example in:
■ Set-based mode, if any errors are found, normally only the first error detected
will be logged, and the number of errors will be set to 1.
■ Row-based modes, multiple errors may be logged.

Periodic Loads and Updates 9-35


Viewing the Runtime Audit

■ Set-based mode, the value for number of records selected is always the same as
the number of records inserted in the target table. If any errors are detected, the
transaction is rolled back, and the number of records selected and the number
of records inserted will both be zero.
■ Row-based (target) mode, the value for the number of records selected is
derived from a cursor that implements all the stages of a mapping. Thus the
value normally corresponds to the number of rows that will be applied to the
target table.
■ Row-based mode, the cursor used to derive the number of records selected may
omit the final stage of the mapping in some circumstances. For example, if the
final stage involves a splitter, the number of records selected will reflect the
records selected as input to the split operation, and so its value may be larger in
row-based mode than in set-based or row-based (target) modes.

Viewing the Errors


When the Detailed Mappings are displayed, clicking on the View Errors button will
display a list of the errors that were detected while running the Detailed Mapping
that was selected. The list of Detailed Mappings will be replaced by this list of
errors.

The error entries identify the target table, the column, the error number and the
error message. However, in many cases the column is set to ‘*’ as the identification
of the problem column is not readily available.

9-36 Oracle Warehouse Builder 3i User’s Guide


Viewing the Runtime Audit

If an error occurs in a set-based mapping, there will normally be a single error


message of the form:
error signaled in parallel query server P000

Further details of the cause of the error can be obtained by selecting this entry and
clicking the ‘View Error Details’ button. This error message indicates that the
set-based mapping has been abandoned and the transaction has been rolled back. If
the mapping is being run in “set based fail over” mode, the relevant row-based
mapping will be run. (This should record the error that caused the set-based run to
fail, and possibly others as well.)

Understanding Errors
When you look at the errors, it is important to understand that an error does not
always mean that the data did not load correctly. And conversely a message stating
"Rows are inserted" does not mean all is fine. Rows can be inserted but they may
violate foreign key constraints.
For example, if a row violates a foreign key constraint, an error is logged by OWB in
the runtime audit and you can see the error through the audit viewer. The violating
row is still inserted, but the foreign key constraint cannot be fully validated due to
this violation. Therefore, OWB places the foreign key constraint in "enabled
novalidate" state. The foreign key constraint is enabled, but it does not reinforce the
constraint on rows already in the table, but it will be as normal for future incoming
rows. In this way, OWB allows you to load data without forcing the process to fail
every time there is a violation.

Periodic Loads and Updates 9-37


Taking the Next Step

Viewing the Error Details


Error Details are obtained by selecting an Error entry and clicking the View Error
Details button.This identifies the type of SQL statement in which the error occurred
(e.g. BATCH INSERT, SELECT, INSERT, DELETE, etc.) and the error message.

For PL/SQL mappings run in the row-based modes, the error details will also
include a list of the values of each of the columns of the row on which the error
occurred.

Note: The column name displayed is actually the variable name


used by the cursor fetch in the generated code. The information
displayed in the Audit Viewer uses these variables, and not the
actual columns due to the complexity of the generated code.

Taking the Next Step


This chapter showed you how to set up and schedule jobs that initially load and
periodically refresh a data warehouse. Two methods were illustrated that manage
job dependencies: the first was manual and the second automated.
The manual scheduling used Oracle Enterprise Manager. The automated method
used Oracle Workflow to define a process that manages job dependencies.
The next chapter covers several administrative topics.

9-38 Oracle Warehouse Builder 3i User’s Guide


10
Administration

This chapter shows you how to complete the several administrative tasks using
Oracle Warehouse Builder utilities. There are two types of administration discussed;
Repository Administration and Reports Administration.
The chapter covers the following topics:
■ Repository Administration
■ The OWB Metadata Loader
■ The OWB Transfer Wizard
■ The Archive/Restore Utility
■ Reports Administration
■ Using the Administration Pages
■ Registering an OWB Repository
■ User Access
■ Registering a Custom Report

Administration 10-1
Repository Administration

Repository Administration
Repository Administration covers information relating to the repository and the
metadata that is stored within it. This section discusses the OWB Metadata Loader
(MDL) as well as the OWB Transfer Wizard and the Archive/Restore Utility.
When you first install or upgrade OWB, you have the option of using the following
wizards to help you set up your OWB warehouse:
■ OWB Repository Assistant
■ OWB Runtime Assistant
■ OWB MDL File Upgrade Utility
You can either run these at installation or upgrade, or defer to a later time. Please
refer to the OWB Installation Guide for specific instructions on how to use each of
these features.

The OWB Metadata Loader


The OWB Metadata Loader (MDL) allows you to export objects from an OWB
repository to a file and also import objects from a file to an OWB repository. This is
a very useful way to move the metadata into a different repository. The MDL
supports the exporting and importing of different type of objects such as tables,
facts, dimensions, materialized views mapping, transformation categories,
transformations, flat files, sequences and any other pertinent information belonging
to that object including columns, constraints, parameters, and named attribute sets.
You can export an entire project or just a subset of objects from a project. You can
also execute the export and import utilities using a command line in an MS-DOS
window.

Using the MDL With Multiple Users Starting in version 3i, OWB gives you the ability to
have multiple users accessing the same repository at the same time. It does this by
applying locks to objects that are being modified. These locks help to maintain work
done on the repository. This feature primarily affects metadata import. When you
import metadata, OWB applies locks to all individual objects you are importing.
When the import is complete, the changes are committed.

Using the MDL with Large Files Large MDL exports and imports may require a large
amount of memory. For large exports and imports, if the default -Xmx of 256M in
exp.bat, imp.bat, or owbclient.bat is not enough, MDL will fail due to lack of
memory. You need to increase the -Xmx setting in the appropriate bat file to fix this
problem.

10-2 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

When importing a large MDL file that will result in a large number of updates
and/or adds, OWB may not have the capacity to lock all of the objects affected
depending on the OWB repository configuration. In this case, OWB will attempt to
switch to single user mode. Also, if more than 300 locks or 1/6 of the total enqueue
resources for the OWB repository, whichever is less, are required to import a MDL
data file, OWB will attempt to automatically switch to single user mode. This allows
the MDL to avoid performance degradation when using a large number of locks.
This also helps limit the potential of running out of enqueue resources. If the MDL
switches to single user mode, no other users will be able to log on to the repository
until after the MDL import completes.
Whenever possible, large MDL exports and imports should be run on the database
server where the OWB repository resides in order to get the best performance.

Notes: ■To avoid potential loss of work, large imports are best done

when usage is at a minimum.

This following sections covers these topics:


■ Metadata Export
■ Metadata Import
■ Metadata Loader Command Line Utility

Metadata Export
The Metadata Export Utility exports objects from an OWB repository to an
operating system file. The Utility can export an entire project, a set of modules, or a
set of objects defined by a module. It can also export the global-shared
transformation library.

The Export File


The export file is a delimited character file which can be read with a text editor.
Each record within the file begins with a keyword followed by one or more
variable-length fields separated by a pipe ( | ) or caret ( ^ ). The separator character
is specified when the file is exported. The pipe ( | ) is the default separator
character.

Administration 10-3
The OWB Metadata Loader

Example 10–1 Sample Records from an Export File


#Project data <PhysicalName> <LogicalName> <UniversalID> <Version Label>
PROJECT|WarehouseName|Warehouse Name|A86184D5336911D58E9000B0D02A59E4|null
#Dimension <PhysicalName> <LogicalName> <UniversalID> <Prefix> <UsageType> <Imported>
<Generated>
DIMENSION|Channels|Channels Dimension Data
Mart|7E727655029911D58DC900C04F48E9ED|ch|null|N|N

Subsets of Objects You can export all of the objects in a project, or just a subset of
those objects. For example, you can export the entire Warehouse project to a file, a
few selected modules, or selected objects within a source or warehouse module.
When you export a subset of objects, the Utility exports definitions for each object
selected and all of that object’s ancestors. For example, if you export only the
dimension, the export file will contain definitions for:
■ The dimension
■ The dimension’s parent (The warehouse module)
■ The warehouse module’s parent (The warehouse project)
Table 10–1 lists the repository objects that can be exported and imported by the
Metadata Loader.

Note: If you are exporting a subset of objects, make sure that you
export all referenced objects as well. The Metadata Import Utility
allows you to import repository objects even if that object’s
references to other repository objects cannot be satisfied.

Table 10–1 Repository Objects


Projects Modules Module Objects
OWB Project Source Files
Sequences
Tables
Views

10-4 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Table 10–1 Repository Objects


Projects Modules Module Objects
Warehouse Business Areas
Dimensions
Facts
Mappings
Materialized Views
Sequences
Tables
Transformation Categories
Transformations
Views

Exported Values for Configuration Parameters By default, the Metadata Export Utility
always exports values for configuration parameters.
You can override this behavior when you run the Metadata Export Utility directly
from the command line by including the statement CONFIGPARAM=N in the
Metadata Export Utility’s parameter file. For more information see "Metadata
Loader Command Line Utility" on page 10-17.

Exporting Metadata
1. Select the name of the object(s) you want to export.
To export a project:
1. Select the Project’s name from the Project Tree view.
2. Select Project > Metadata Export > File
To export a module or set of modules from a project:
1. Select the names of the module(s) to be exported from the Project Tree view.
To select multiple modules, press CTRL and select the additional modules.

Administration 10-5
The OWB Metadata Loader

2. Select Project > Metadata Export > File


To export a subset of objects in a module:
1. Select a module from the Project Tree view and double-click to open the
Module Editor.
2. Select the names of the objects or object types to be exported.
To select multiple objects, press CTRL and select another object.

3. Select Module > Metadata Export


2. If you have made any changes, the Metadata Export Confirmation dialog
displays. Click Commit to save any changes or Rollback to ignore changes and
revert to previously saved version.

10-6 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

The Metadata Export Utility window displays. This window displays the name
of the objects you are exporting.

3. Specify the following:


■ File Name - Enter the name of the export file to be created. Use the Browse
button to assist you in locating a directory or file.
■ Log File - Enter the name of the log file to be created. The MDL writes
diagnostic and statistical information to the log file. Use the Browse button
to assist you in locating a directory or file.
■ Field Separator - Select a field separator. The MDL uses the field separator
to separate the object and its attributes as shown in Example 10–1. The
default is the pipe symbol (’|’) but you can change it to a caret symbol (’^’)
using the down-arrow list.
■ Character Set - Select the type of character set you want used to create the
export file. The default character set is defined by the machine that hosts
the OWB client. Use the down-arrow list to change the output character set.
4. Click Export.

Administration 10-7
The OWB Metadata Loader

The Metadata Export Progress panel displays the progress. When the export
completes, the Metadata Export Results dialog displays.

This dialog displays the object types and the number of each type that were
exported. For a more detailed look at the export process, click View Log File.
This displays the entire log file.

Metadata Import
The Metadata Loader imports objects from an export file into an OWB repository.
The Utility operates in one of four modes: add, replace, add and replace, and add
and merge.

Import Searching When you use the MDL Import Utility, it searches the repository for
any repository objects that exist in the repository and in the file you are importing.
The MDL allows three different way for searching for objects: Universal Identifiers,
Logical Names, and Physical Names.
■ Universal Identifiers - The Utility exports a universal identifier, also known as
the Universal Object IDentifier or UniversalID, for each object it exports. These
identifiers can be used to determine whether an object should be created,
replaced, or merged during an import operation.

10-8 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

■ Logical and Physical Names - The Utility exports each object’s physical and
logical name to the export file. These names determine whether an object
should be created, replaced, or merged during an import operation.
An example best illustrates the search algorithm. Suppose the search is by the logical
name of a repository object in the export file. The Import Utility searches the
repository for the object’s logical name.
If the Import Utility does not find the logical name, the resulting actions are based
on the import mode.

Import Mode Result


Add Mode A new object will be created if physical name does not conflict
with an already existing object.
Replace Mode A warning message is written to the log file that the object could
not be found to replace and the object is skipped.
Add and Replace Mode A new object will be created if physical name does not conflict
with an already existing object.
Add and Merge Mode A new object will be created if physical name does not conflict
with an already existing object.

If the Import Utility does find the logical name, the following actions result based
on the import mode:

Import Mode Result


Add Mode A message is written to the log file that the object already
exists and the object is skipped.
Replace Mode The object will be replaced if physical name does not
conflict with an already existing object.
Add and Replace Mode The object will be replaced if physical name does not
conflict with an already existing object.
Add and Merge Mode The object will be merged if physical name does not
conflict with an already existing object.

If an object cannot be created, replaced, or merged due to a name conflict with


another object, an error is written to the import log file.
The Import Utility uses the same algorithm for the other case: just exchange the
roles of ’logical’ and ’physical’ in the above steps.

Administration 10-9
The OWB Metadata Loader

When importing in Add and Replace, and Replace mode, the import completely
replaces the existing object’s children so that the final object is exactly the same as
the source object. Specifically, any children of a repository object that are not
replaced or added are deleted. This occurs regardless of whether a child occurs in a
mapping or is a foreign, primary, or unique key column.
For example, in the MDL export file, Table CUST contains 3 columns with physical
name Last_Name, First_Name and Middle_Init. In the OWB repository, the same
table CUST contains 4 columns with physical name Last_Name, First_Name, Status
and SSN. During a replace operation, the columns Last_Name and First_Name
will be replaced, column Middle_Init will be added, and column Status and SSN
will be deleted. The final result is that Table CUST in the OWB repository contains
the same metadata from Table CUST in the export file.
The ultimate consequence is that after the import operation, mappings and foreign,
primary, and unique key constraints can be malformed. For example, after the
import a mapping may reference non-existent columns.

Note: A Replace operation can lead to constraints and mapping


definitions that are malformed.

Table 10–2 Examples of Repository Objects and their Children


Repository Object Children

Tables, Views, Materialized Views Columns, Foreign Keys, Unique Keys, Primary
Keys, Check Constraints, Named Attributes,
Configurations

Dimensions Levels, Level Attributes, Hierarchies, Level


Relationships, Columns, Foreign Keys, Unique
Keys, Primary Keys, Check Constraints, Named
Attributes, Configurations

Facts Measures, Columns, Fact Foreign Keys,


Segmented Unique Keys, Foreign Keys, Unique
Keys, Primary Keys, Check Constraints, Named
Attributes, Configurations

Transformations Parameters, Implementations, Configurations

Files Records, Fields, Configurations

Business Areas Business Area Relationships

10-10 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Importing Metadata
To import objects from an export file:
1. Select Administration > MetaData Import from the Administration Tree view.
If you have made any changes, the Metadata Import Confirmation dialog
displays. Click Commit to save any changes or Rollback to ignore changes and
revert to previously saved version.

The MetaData Import Utility window displays.

2. Specify the following:


File Name - Type in or browse to the export file you want to import.
Log File - Create a log file for the import. OWB reads and processes the
exported metadata and writes status and diagnostic information in the log file.

Administration 10-11
The OWB Metadata Loader

Import Option
■ Add new metadata only - This option allows you to add new objects to a
repository. If you import a file that contains objects that already exist in
your repository, they are ignored. The old objects remain unchanged.
■ Add new metadata and replace existing objects - This option allows you
to add new objects to a repository and update existing objects.
■ Add new metadata and merge existing objects - This option allows you to
add new objects and merge existing objects in your repository. This allows
you to reconcile any changes you have made to your repository with any
changes or additions that have been elsewhere and then exported to an
MDL data file.
■ Replace existing objects only - This option allows you to replace existing
objects in your repository.
Search by
■ Ignore Universal Identifier - This option allows you to ignore searching
for the objects you are importing using Universal Identifiers. By default, the
Universal Identifiers are used to determine if an object already exists or not.

Note: Beginning in version 3i, OWB creates universal object


identifiers (UniversalIDs) for each object in the repository. MDL
imports run in merge mode must use UniversalID for the search
criteria in order to merge into existing mappings. If Ignore
Universal Identifier is checked, any mappings from the MDL file
that already exist in the target repository will be skipped. Also, if
the mapping in the MDL file does not have a Universal Identifier,
the mapping cannot be merged into a mapping that matches by
name.

■ Logical Names - Select this option to search your repository using the
logical names of the objects you are importing to make sure the objects do
not already exist.
■ Physical Names - Select this option to search your repository using the
physical names of the objects you are importing to make sure the objects do
not already exist

10-12 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Character Set - Select the type of character set used to create the export file. The
default character set is defined by the machine that hosts the OWB client. Use
the down-arrow list to change the output character set.

3. Click Scan to display the exported metadata header information and a


summary of the total number of object types contained in the exported
metadata file.

4. Click Import.
The Metadata Import Confirmation dialog displays only if the exported
metadata data information has not been reviewed.

5. Click Import to continue.

Administration 10-13
The OWB Metadata Loader

The Metadata Import Progress panel displays. When the import is complete, the
Metadata Import Results dialog displays.

This dialog displays the object types and the number of each type that were
imported or skipped. For a more detailed look at the import process, click View
Log File. This displays the entire log file.

The Log File There are three types of status messages that can show up in the log file:
■ Informational - This is intended to provide information about the import or
export.
■ Warning - This is intended to caution you about the import or export of an
object.
■ Error - This is intended to indicate that the MDL export or import was aborted
and did not complete successfully.

10-14 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Example 10–2 displays the contents of an import log file. Notice that the import
statistics display the total number of objects that have been added, replaced, and
skipped.

Example 10–2 Sample Import Log File


Import started at 04/25/2001 4:59:46 PM
********************************************************************************
* Import for OWB Release: 3.0.0.0.0 Version: 3.0.0.3.0
* User: user30_3i Connect String: epaglina-pc:1521:ora8i
* Data File: d:\owb3000\sco_dim_time_phy_m_tgt.mdl
* Log File: d:\owb3000\imp_dim_time_phy_m_tgt.log
* Trace: B
* Trace File: d:\owb3000\imp_dim_time_phy_m_tgt.trc
* Physical Names: Y Mode: CREATE
* Ignore Universal Identifier: Y Commit At End: Y
********************************************************************************
Informational at line 15: MDL-1207 PROJECT with physical name <PRJ_Dimension> not imported
because it already exists.
Informational at line 21: MDL-1207 DATAWAREHOUSE with physical name <WH> not imported
because it
already exists.
Informational: MDL-1134 COMMIT issued at end of import data file.

Counts for OWB Import Utility


-----------------------------

Total Projects Processed by Import = 1

-------------------------------

Project = PRJ_Dimension

Entity in Project Added Replaced Skipped


------------------------------- ----- -------- -------
DATAWAREHOUSE: 0 0 1
DIMENSION: 1 0 0
LEVEL: 3 0 0
HIERARCHY: 2 0 0
LEVELRELATIONSHIP: 4 0 0
COLUMN: 18 0 0
UNIQUEKEY: 8 0 0
PRIMARYKEY: 2 0 0
CONFIGPARAM: 60 0 60
CHILDCONFIG: 14 0 0

Import ended at 04/25/2001 4:59:52 PM

Administration 10-15
The OWB Metadata Loader

Detailed Error Messages If you are running an MDL Import or Export and get an
error, a brief error message displays.

You can click Detail to display a detailed error log that will pinpoint the repository
object and the object line that the error occurred in. This is extremely useful for ad
hoc troubleshooting. In the example below, the repository object is the dimension
CUST and the object is the level TOTAL.

Standard Error
Message

Detailed Error
Message

10-16 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Metadata Loader Command Line Utility


For a greater degree of control, flexibility and maintainability, you can execute the
Metadata Loader Utilities from a MS-DOS window. These two utilities allow you to
disable the export of configuration values, vary the separator character within an
export file, and maintain directive files for selected export operations. These
operations simplify and automate the consolidation or synchronization of metadata
in multiple repositories that have a similar project structure.
The scripts for executing both the export and import utilities reside in the
$OWBHOME\owb\bin\win32 directory for Windows platform and
$OWBHOME/owb/bin/solaris for UNIX platforms. Both the export and import
utilities are driven by a set of directives. You can specify the directives in three
ways:
1. Provide directives as a response to command-line prompts
2. Create a directives file
3. Combination of one and two
The following examples show you how to export and import OWB definitions
using these utilities with a directive file.

Directive Keywords for the Export Utility


You can direct the export utility to export a file by answering prompts or by creating
a file with a set of directives. Table 10–3 summaries the keywords used to form
export directives.
The format for a directive is:
Keyword=Value
except for the comment line indicator (#). You can use the comment indicator to
document your directive scripts: put the indication in the first column of a record
and follow it with text.
You can also form a directive by following the Keword-Equal sign with the
wildcard character (’*’), which matches any string, or with a list of named objects:
Keyword=*
Keyword=(value-1, value-2, … , k)
For example, you can specify a set of tables to be exported as:
TABLES=(Customers, Products, Days)

Administration 10-17
The OWB Metadata Loader

The directives can be written in a simple text file.

Table 10–3 Keywords for Export Utility Directives


Utility Prompt Keyword Description

Username/passw@ USERID Username, password and connection as a string.


host:port:sid

USERNAME The user name for accessing OWB repository.

PASSWORD The password that matches USERNAME.

HOST Host for OWB repository.

PORT Port for OWB repository.

SID SID for OWB repository.

Project Name PROJECT Project name. Wildcard format supported for Project,
but if used, no other object type keywords may follow.
In order to export shared transformations, use
PROJECT=Global Shared.

Export File FILE File name for the exported data.

Field Separator FIELDSEPARATOR Field separators: ’|’, ’^’ or ’~’ use without quotes.

Log File LOG File name for the status and statistics of the export.

Parameter File PARFILE Parameter file contains keyword directives.

CONFIGPARAM Export configuration values (Y/N). Default is Y.

TRACE Debug messages. Options:


S - write messages to screen
Y - write messages to a file
B - write messages to screen and a file

TRACEFILE Trace file name.

PHYSICALNAMES Use physical names (Y/N) for lookup of objects to be


exported. Default is N.

CHARACTERSET Specifies the character set to use for the export data file.

MODULES If wildcard or multi-value format used for MODULE,


no other object type keywords may follow. If simple
format is used, this keyword may appear multiple
times, directly followed by keywords for any of its
owned object types which may be selected using any
format (simple, wildcard, multiple).

TABLES

VIEWS

10-18 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Table 10–3 Keywords for Export Utility Directives


Utility Prompt Keyword Description

FILES

SEQUENCES

MATERIALIZEDVIEWS

DIMENSIONS

FACTS

TRANSFORM For wildcard or multi-value format, no FUNCTIONS


CATEGORIES keyword may follow. If simple format then this
keyword may appear multiple times, directly followed
by a FUNCTIONS keyword, which may use any
format (simple, wildcard, multiple).

FUNCTIONS

MAPPINGS

HELP Use HELP=Y for a complete list

# Comment line used in a parameter file

Export a Project
This example shows you how to export the entire GCCWarehouse project. The
operation requires two steps: create the directives file and then execute the
Metadata Export Utility (exp).

Create the Directives File The directives file is a simple text file that contains a set of
directives for the export utility.
USERID=GCCWH/GCCWH@dwdoc11-pc:1521:ora816
PROJECT=GCCWarehouse
FILE=e:\MDL\GCCWarehouse-exp-JUL01
FIELDSEPARATOR=|
LOG=e:\MDL\GCCWarehouse-exp-JUL01-LOG
CONFIGPARAM=N

Execute the Export Utility The following command invokes the Export Utility and
specifies the above directive file:
w:\owb\bin\win32>exp parfile=e:\MDL\EXP_Directives
Processing ... Export successful.

Administration 10-19
The OWB Metadata Loader

The objects have now been exported to the file and can be imported into the same or
another repository using the Import utility.

Directive Keywords for the Import Utility


You can direct the import utility to import objects from a file by answering prompts
or by creating a file with a set of directives. Table 10–4 summaries the keywords
used to form a directive. The format for each directive is Keyword=value.

Table 10–4 Keywords for Import Utility Directives


Utility Prompt Keyword Description

Username/passw@ USERID Username, password and connection as a string.


host:port:sid

USERNAME The user name for accessing OWB repository.

PASSWORD The user password that matches USERNAME.

HOST Host for OWB repository.

PORT Port for OWB repository.

SID SID for OWB repository.

Import File FILE File name for the data to be imported.

Import Mode MODE CREATE, REPLACE, UPDATE, or


INCREMENTALUPDATE

Log File LOG File name for the status and statistics of the export.

Parameter File PARFILE Parameter file contains keyword directives.

CONFIGPARAM Import configuration values (Y/N). Default is Y.

TRACE Debug messages. Options:


S - write messages to screen
Y - write messages to a file
B - write messages to screen and a file

TRACEFILE Trace file name.

PHYSICALNAMES Use physical names (Y/N) to lookup objects to be


imported. Default is Y.

CHARACTERSET Specifies the character set to use for the export data file.

HELP Use HELP=Y for a complete list

# Comment line used in a parameter file

IGNOREUniversalID Ignore (Y/N) the universal id as the search criteria.


Default is N.

10-20 Oracle Warehouse Builder 3i User’s Guide


The OWB Metadata Loader

Table 10–4 Keywords for Import Utility Directives


PRESERVEDESCRIPT Preserve the description (Y/N) of already existing objects
ION if the MDL data file does not have a description for the
object. Default is N.

SINGLEUSER Request a single user lock (Y/N) for running the import.
Default is N.

If a MODE directive is not included, then the default is CREATE.

Import Selected Modules


This example shows you how to import a two modules using the Import Utility. The
operation requires two steps: create a directive file and then execute the Metadata
Import Utility (imp).

Create the Directives File The directives file is a simple text file that contains a set of
directives for the export utility.
USERID=GCCWH/GCCWH@dwdoc11-pc:1521:ora816
FILE=e:\MDL\gccstar-exp
LOG=e:\MDL\gccstar-imp-LOG
MODE=CREATE
CONFIGPARAM=N

Execute the Import Utility The following command invokes the Import Utility and
specifies the above directive file:
w:\owb\bin\win32>imp parfile=e:\MDL\IMP_Directives.txt
Processing ...
Import successful.

Validation Rules Governing Import


When you import a set of definitions from exported metadata, the Import utility can
update existing definitions in an OWB Project. To increase flexibility, the Import
utility was designed to relax the rules governing updates to definitions. These
relaxed rules provide greater flexibility but can also have a few side-effects.

Mapping Definitions A mapping definition can be updated in a repository that is not


identical to the mapping in the exported metadata file if any objects (tables, facts,
transformations, etc.) that the mapping references cannot be found in the target
repository. A warning message is written to the log file any time this occurs.

Administration 10-21
The OWB Transfer Wizard

Code Generation Before you generate scripts from imported definitions, you should
first configure the definitions and then validate them. The validation will trap
malformed definitions. For additional information on the configuration, validation
and generation of scripts, refer to the discussion and examples in Chapter 8,
"Configure, Generate and Deploy".

Foreign Key Definitions A foreign key definition can be updated in a repository that is
not identical to the foreign key in the exported metadata file if its referenced unique
or primary key does not exist in the target repository. A warning message is written
to the log file that the foreign key does not contain a referenced key.

The OWB Transfer Wizard


The Oracle data warehousing technology consists of a comprehensive platform that
provides new tools for integrating, documenting, and browsing metadata within
the data warehouse. This technology includes services aimed at technical and
business users for data lineage, impact analysis, annotation, classification, and
reporting.
However, sharing of metadata between tools is often difficult because each data
warehousing tool has its own representation of metadata. The OWB Transfer
Wizard enables you to effectively synchronize, integrate, and use metadata stored in
multiple sources and formats.

The OWB Transfer Wizard Overview


The OWB Transfer Wizard allows you to import metadata from and export
metadata to a number of data warehousing tools, such as OWB, Oracle Discoverer,
and Oracle Express, CA ERwin, and Powersoft PowerDesigner,.
The Transfer Wizard performs two major tasks, as shown in Figure 10–1:
1. Exporting selected metadata from the OWB repository (the source) via a bridge
(for example, the OMG bridge) to a variety of targets. The target can be:
■ Object Management Group (OMG) file
■ Oracle Discoverer versions 3.1 and 4i
■ Oracle Express
2. Importing selected metadata from source tools into the OWB repository (the
target) via a bridge. The source can be:
■ Object Management Group (OMG) file

10-22 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

■ Computer Associates ERwin (3.5.1)


■ Powersoft PowerDesigner (version 6)
The Transfer Wizard creates an intermediate XML file conforming to the XML
Metadata Interchange (XMI) standard. This process is transparent when you use the
Transfer Wizard. You only need to provide the source and target parameters; the
Transfer Wizard performs the exporting, conversion, and downloading tasks.
Figure 10–1 shows an example of the transfer process for exporting metadata from
Builder into Oracle Discoverer.

Figure 10–1 OWB Transfer Wizard Model

Transfer Considerations
Before you transfer metadata between two data warehousing tools, you need to
perform tasks within the source tool to ensure that the metadata transfers
successfully and displays appropriately in the target tool.
For detailed information on transfer considerations for metadata import and export,
refer to Appendix A, "OWB Bridges: Transfer Parameters and Considerations".

Importing Metadata into Oracle Warehouse Builder


After you have prepared your source tools to ensure a successful transfer, you can
use the OWB Transfer Wizard to import the metadata. For more information on
transfer considerations, refer to Appendix?
The OWB Transfer Wizard enables you to import metadata from the following types
of sources:
■ A flat file that conforms with the OMG standard

Administration 10-23
The OWB Transfer Wizard

■ Computer Associates ERwin


■ Powersoft PowerDesigner

Launching the OWB Transfer Wizard for Import


To launch the Transfer Wizard for an import bridge, follow these steps:
1. Open Oracle Warehouse Builder.
2. Select the Administration mode from the vertical tool bar at the left of the
Builder client window.
3. From the Administration menu, select MetaData Import > Bridge.

The Oracle Transfer Wizard Welcome window displays, identifying the steps
you perform while using the Transfer Wizard.

10-24 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

4. If you want to display version information about the Transfer Wizard, press the
About Oracle WB Transfer Tool... button.

For version information about the individual bridges, press the Bridge
Versions ... button.

5. Click Ok to close the version information window.


6. Click Next to use the Transfer Wizard to import metadata using the OWB
Transfer Wizard.

Note: Each of the Transfer Wizard pages allows you to click the
Help button or F1 to display help for the current window.

Importing Metadata using the OWB Transfer Wizard


This section contains instructions for using the OWB Transfer Wizard to import
metadata into OWB:
For more information on transfer considerations, refer to Appendix A, "OWB
Bridges: Transfer Parameters and Considerations".

Administration 10-25
The OWB Transfer Wizard

1. In the Administration mode, select Administration > MetaData Import >


Bridge as described in "Launching the OWB Transfer Wizard for Import" on
page 10-29.
The OWB Transfer Wizard Welcome window displays.
2. Click Next. The Data Source and Target Identification window, Figure 10–2,
displays.
3. In the From field, identify your metadata source (OMG, CA ERwin,
PowerDesigner). In the To field, accept the default (OWB import).
4. Optionally, enter a Description of the metadata to be transferred, as shown in
Figure 10–2. (This description displays in the progress bar during the transfer
process).

Note: This description is useful when you are performing several


transfers (each one starting after the preceding transfer completes); the
title on the transfer window identifies the current transfer (see Step 8
on page 10-33).

Figure 10–2 Data Source and Target Identification Window

10-26 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

5. Click Next. The Data Object/Filenames and Detailed Transfer Parameters


window displays.

Figure 10–3 Transfer Parameter Identification Window

The Transfer Parameters window displays a different list of parameters based


upon the metadata source you selected in the previous step. For detailed
information on the Transfer parameters, refer to Appendix A, "OWB Bridges:
Transfer Parameters and Considerations".
6. Click Next. The Confirmation of OWB Transfer window displays.

Administration 10-27
The OWB Transfer Wizard

Figure 10–4 Summary Window

7. Review your entries. If any are incorrect, click Back to return to the previous
screen and make the necessary changes.
8. Click Finish on the Confirmation window to begin the transfer process. The
transfer window displays with a status bar.

Figure 10–5 My Data Transfer Progress Panel

The title of the transfer window is the description you assigned to the transfer
on the Choose Data Source and Target Types window. If you did not provide a
description, a title does not display.

Note: The transfer can require several minutes or an hour or more


to complete, depending on the amount of metadata you transfer.

10-28 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

9. Do one of the following:


■ If the transfer completes successfully (100% displays), click Ok.
■ If a transfer failure message displays, click View Log File and review the
log. (You can also view the log of a successful transfer.)

Note: To save the log for reference, click Save As to open the Save dialog
box. Select the folder where you want to store the log and click Save.

■ If you determine the cause of the failure from the Information Log, note the
data requiring update. Close the log by clicking Ok. On the transfer
window, click Return to Wizard and update the erroneous data on the
Transfer Parameters window. Then transfer the data again.
■ If you cannot determine the cause of the failure from the Information log,
you can create a Trace log. Close the current log by clicking Ok. On the
transfer window, click the Return to Wizard button and change the Log
Level to Trace on the Transfer Parameters window. Then transfer the data
again.
During a successful transfer, the Transfer Wizard creates the output file and stores it
in the location you specified.

Exporting Metadata from Oracle Warehouse Builder


After you have prepared your target tools to ensure a successful transfer, you can
use the OWB Transfer Wizard to export the metadata. For more information on
transfer considerations, refer to Appendix A, "OWB Bridges: Transfer Parameters
and Considerations".
The OWB Transfer Wizard enables you to export metadata to the following types of
targets:
■ A file that conforms with the OMG standard
■ Oracle Discoverer 3.1
■ Oracle Express
■ Oracle Discoverer 4i

Launching the OWB Transfer Wizard for Export


To launch the Transfer Wizard for an export bridge, follow these steps:

Administration 10-29
The OWB Transfer Wizard

1. Open Oracle Warehouse Builder.


2. Select the Project mode from the vertical tool bar at the left of the Builder client
window.
3. From the Project menu, select MetaData Export > Bridge.

The Oracle Transfer Wizard Welcome window displays, identifying the steps
you perform while using the Transfer Wizard.

10-30 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

4. Click Next to use the Transfer Wizard to export metadata from OWB to a target.

Note: Each of the Transfer Wizard pages allows you to click the
Help button or F1 to display help for the current window.

Exporting Metadata from OWB to a Target


This section contains instructions for using the OWB Transfer Wizard to export
metadata from an OWB Project to a target. For more information on transfer
considerations, refer to Appendix A, "OWB Bridges: Transfer Parameters and
Considerations".
To transfer metadata from OWB:
1. In Project mode, select Project > MetaData Export > Bridge as described in
"Launching the OWB Transfer Wizard for Export" on page 10-29.
The Oracle Transfer Wizard Welcome window displays.
2. Click Next. The Data Source and Target Identification window, Figure 10–6,
displays.
3. In the From field, accept the default (OWB Export) and in the To field, select
your target (OMG, Discoverer 3.1, Express, or Discoverer 4i) to identify the
target for your export.
4. Optionally, enter a Description of the metadata to be transferred, as shown in
Figure 10–6. (This description displays in the progress bar during the transfer
process).

Note: This description is useful when you are performing several


transfers (each one starting after the preceding transfer completes),
because the title on the transfer window identifies the current transfer.

Administration 10-31
The OWB Transfer Wizard

Figure 10–6 Source and Target Information Window

5. Click Next. The Data Object/Filenames and Detailed Transfer Parameters


window displays.

Figure 10–7 Transfer Parameter Identification Window

10-32 Oracle Warehouse Builder 3i User’s Guide


The OWB Transfer Wizard

The Transfer Parameters window table lists parameters that you must enter or
select. This window displays a different set of parameters depending on the
target you selected in the previous step.
For detailed information on transfer parameters for each target type, refer to
Appendix A, "OWB Bridges: Transfer Parameters and Considerations".
6. Click Next. The Confirmation of OWB Transfer window displays.

Figure 10–8 Summary Window

7. Review your entries. If any are incorrect, click Back to return to the previous
screen and make the necessary changes.
8. Click Finish on the Confirmation window to begin the transfer process. The
transfer window displays with a status bar.

Administration 10-33
The OWB Transfer Wizard

Figure 10–9 Data Transfer Progress Panel

The title of the transfer window is the description you assigned to the transfer
on the Choose Data Source and Target Types window. If you did not provide a
description, a title does not display.

Note: The transfer can require several minutes or an hour or more


to complete, depending on the amount of metadata you transfer.

9. Do one of the following:


■ If the transfer completes successfully, click OK.

Figure 10–10 Data Transfer Complete Panel

■ If a transfer failure message displays, click View Log File and review the
log. You can also view the log of a successful transfer.

Note: To save the log for reference, click Save As to open the Save dialog
box. Select the folder where you want to store the log and click Save.

■ If you determine the cause of the failure from the Information Log, note the
data requiring update. Close the log by clicking OK. On the transfer

10-34 Oracle Warehouse Builder 3i User’s Guide


The Archive/Restore Utility

window, click Return to Wizard and update the erroneous data on the
Transfer Parameters window. Then transfer the data again.
■ If you cannot determine the cause of the failure from the Information log,
you can create a Trace log. Close the current log by clicking OK. On the
transfer window, click Return to Wizard and change the Log Level to Trace
on the Transfer Parameters window. Then transfer the data again.
During a successful transfer, the Transfer Wizard creates the output file and stores it
in the location you specified.

The Archive/Restore Utility


The Archive/Restore Utility allows you to save and load versions of your OWB
repository metadata. The Archive and Restore utilities initially write to a file
system. You can then move files from this file system into a third-party version
control tool such as Oracle Repository, ClearCase, or SourceSafe.

O racle Warehouse Builder M icrosoft SourceSafe


Clearcase
Oracle Repository

OW B
R epos itory
Versioned
R epos itory

Archive Check In
Check Out
R estore Add
Get
Undo C heck Out

File System

OW B Software 3rd Party

Use the following sections to assist you with your Archive/Restore:


■ Setting up Preferences
■ Archiving a Project
■ Restoring a Project

Administration 10-35
The Archive/Restore Utility

Note: You must set up your Archive/Restore settings in the


project’s Preferences page before you can archive or restore your
project. If you attempt to archive or restore without setting these
preferences, you will get an error.

There are two places in OWB where you can set up the version label used in the
archive/restore. The first is in the New Project Wizard. The New Project Wizard
contains a step that allows you to define Version Properties. The version label that
you set here is the version label that is used when that project is archived. After you
have created a project, you can edit the version label by opening the Properties
dialog for the Project. Click on the Version Properties tab to modify the project’s
version label.
It is important to note that Archive and Restore are different from Import and
Export. The following two tables describe the main differences between these
features.

Table 10–5 Differences Between Archive and Export


Feature Archive Export
Character Set UTF8 User Configured
Field Separator | (pipe character) User Configured
Read-only Detects and prompts you to re-try Detects and then fails
Detection
Dump Format MDL MDL
Log File Name Generated Generated and User configured

Table 10–6 Differences Between Restore and Import


Feature Restore Import
Character Set UTF8 User Configured
Complete Project Yes User must first delete project
Replacement
Dump Format MDL MDL

10-36 Oracle Warehouse Builder 3i User’s Guide


The Archive/Restore Utility

Table 10–6 Differences Between Restore and Import


Feature Restore Import
UniversalID Always User Configured
Preservation
Name Preservation Always User Configured
Log File Name Generated Generated and User configured

Setting up Preferences
You can set up most of the archive and restore specifications using the Preferences
dialog from the Administration or Project Windows. Use this dialog to specify
labeling options, archive/restore directory locations and log folders.
To set up Archive/Restore preferences:
1. Select Preferences from the Administration or Project menus depending on
what view you are in.
The Preferences dialog displays. This is a generic preferences dialog that is not
specific to the Archive/Restore. You must select the Archive/Restore tab if it is
not displayed on top.

2. Browse to or create a default root folder for archiving.


The archive service creates additional folders.

Administration 10-37
The Archive/Restore Utility

3. Specify how you want to handle the label. There are three options:

Label Option When to Use Generated Path Name


Do not include For Source Control Management The path is consistent and not
when the path name never dependent on the version label
changes. value.
Parent Folder For Source Control Management The generated path changes with
when the label value changes each new version label.
slowly. For example, labels like
Development, Alpha, Beta, and
Production. Also good for dumps
to a file system.
File name When dumping files to a file The generated path changes with
system. each new version label.
This appends the label name as
the base part of the terminal file
name. For example, if the label is
development, the file name will be
development.mdl. If there is no
label and this mode is selected, the
file name will be nolabel.mdl.

4. Browse to or create a location for your Archive Log Folder.


This folder contains the archive log files as they are created. The log files
contain detailed information about the archive including how the file was
created and the contents of what was archived. The name of each log file is
automatically derived from the logical project name which is being archived.
All archive log files start with "A" and incorporate the label, date, and time to
make them unique.
5. Browse to or create a location for your Restore Log Folder.
This folder contains the restore log files as they are created. The log files contain
detailed information about the restore including how the file was created and
the contents of what was restored. The name of each log file is automatically
derived from the logical project name contained in the archive. All restore log
files start with "R" and incorporate the label, date, and time to make them
unique.
6. Click OK.
The preferences have been set. You can now proceed to archiving and restoring
your project.

10-38 Oracle Warehouse Builder 3i User’s Guide


The Archive/Restore Utility

Archiving a Project
Archiving a project allows you to copy metadata stored within an OWB repository
to an external location for the purpose of securing that data at a fixed point in time.
OWB provides an Archive Wizard to assist you in this process.

Note: Before you archive your project, you can update the
project’s Version Label with its Project Properties dialog.

To archive a project:
1. Select Archive from the Project menu or from the Administration menu
depending on what view you are in. You can also select Archive from the
right-click menu when a Project is selected.
The Archive Wizard Welcome page displays. This page does not require any
settings, however, you can uncheck the Show this page the next time box to
have this page skipped during future archives

2. Click Next.
The Summary page displays. This page displays a summary of the archive
settings prior to running the archive process. If you want to see the details of

Administration 10-39
The Archive/Restore Utility

your archive after the archive process is complete, check the Show details
dialog following a successful archive box.

Note: No changes can be made from the wizard. If you notice an


error in the Archive Wizard Summary page, click CANCEL and
make the appropriate changes to your Archive/Restore Preferences
before continuing with the archive.

3. Click Finish.
This begins the archive process. A progress window appears. When the
progress bar reaches 100%, the archive process is complete.

10-40 Oracle Warehouse Builder 3i User’s Guide


The Archive/Restore Utility

If you checked the Show details dialog following a successful archive box, the
Archive Results dialog display. This dialog displays the name of each object
type and how many of each were archived.

For a more detailed look at the archive process, click View Log File. This
displays the entire log file.

Restoring a Project
Restoring a project allows you to recreate metadata within an OWB repository from
an external location.
To restore a project:
1. Select Restore from the Administration menu in the Administration View.

Administration 10-41
The Archive/Restore Utility

The Restore Wizard Welcome page displays. This page does not require any
settings, however, you can uncheck the Show this page the next time box to
have this page skipped during future restore processes.

2. Click Next.
The Select Archive page displays. Browse to or type in the Archive File you
want to restore.

3. Click Next.

10-42 Oracle Warehouse Builder 3i User’s Guide


The Archive/Restore Utility

The Summary page displays. This page displays a summary of the restore
settings prior to running the restore process. If you want to see the details of
your restore after the restore process is complete, check the Show details dialog
following a successful restore box.

4. Click Finish.
This begins the restore process. A progress window appears. When the progress
bar reaches 100%, the restore process is complete.
If you checked the Show details dialog following a successful restore box, the
Restore Results dialog display. This dialog displays the name of each object
type, how many of each were restored, and how many of each were skipped.

Administration 10-43
The Archive/Restore Utility

For a more detailed look at the archive process, click View Log File. This
displays the entire log file.

10-44 Oracle Warehouse Builder 3i User’s Guide


Using the Administration Pages

Reports Administration
Reports Administration covers information relating to setting up reporting on your
metadata. Since OWB relies on the OWB Browser as the main supported method of
reporting on your metadata, this section is devoted to administration tasks that you
do directly from the OWB Browser.
When you first install or upgrade OWB, you have the option of using the OWB
Browser Assistant to set up your OWB Browser. You can either run this wizard
during your installation or upgrade process, or defer it to a later time. Please refer
to the OWB Installation Guide for specific instructions on how to use this wizard.
Before you can set up the Administration features for the OWB Browser you must
have Oracle Portal running on your web browser.

Using the Administration Pages


From the Oracle Portal Home Page, select the Administer Warehouse Builder
Browser link from the Warehouse Builder Browser portlet to access the Warehouse
Builder Administration pages.

Administration 10-45
Using the Administration Pages

The Warehouse Builder Administration pages can only be accessed if the Oracle
Portal username you are logged in as has Full Administrator privileges.

Administration
Actions

OWB Browser
Resources

Administration Actions Across the top of the Administration page there are
administration actions to choose from:
■ Register an OWB Repository enables you to register a new Warehouse Builder
Repository for use with the OWB Browser. For more details, see Registering an
OWB Repository on page 10-48.
■ Register a Custom Report enables you to register a new Custom Report with
the browser system. Custom Reports are created as Application Components
using the Oracle Portal system. For more details, see Registering a Custom
Report on page 10-57.
■ Purge Stale User Information removes information relating to users which
have been deleted from the single sign-on repository. This information will
remain unused within the browser system repository until it is removed by
using this operation. For more details, see Purging Stale User Information on
page 10-57.

OWB Browser Resources At the bottom of the Administration Page is a table listing
all of the existing configurable resources within the browser system. Various

10-46 Oracle Warehouse Builder 3i User’s Guide


Using the Administration Pages

operations can be performed on these resources. The different types of resource are
listed in Table 10–7.
Table 10–7 Browser Resources
Resource
Type Description Available Actions
Portlet A portlet provided by the Access - allows you to grant or revoke
browser system. In this repository access privileges to the users.
release of the OWB
Browser, the portlet is
named Launcher Portlet.
The portlet provides access
to the repository navigation,
reporting, favorites, and
administration functionality.
Repository An OWB Repository that is Access - allows you to grant or revoke
browsable through the repository access privileges to the users.
browser system.
Edit - allows you to edit repository properties.
Unregister - allows you to unregister the
repository. After unregistration, the repository
can no longer be browsed using the browser
system. You must re-register the repository if
you want to browse it again.
Role A viewpoint of the data in a Access - allows you to assign users and
Warehouse Builder groups to roles. A user can have access to
Repository. You are able to multiple roles.
define