Extending OWB with its Scripting Language

Extending OWB through Scripting

Oracle MetaBase (OMB) scripting language provides access to all Oracle Warehouse Builder (OWB) functions without accessing the Warehouse Builder graphical user interface. You can access Warehouse Builder metadata and functionality by using Warehouse Builder's scripting utility, OMB Plus. Developers can now use Warehouse Builder programmatically.

Topics

This lesson will discuss the following:

Overview
Prerequisites
Examples of OMB Plus commands
Summary

This lesson will take approximately 20 minutes to complete.

Move your mouse over this icon to show all screenshots. You can also move your mouse over each individual icon to see only the screenshot associated with it.


Overview

In this lesson you will learn how to launch and work with OMB Plus. The typical access path to the Warehouse Builder metadata is through the graphical user interface, which shields the complexity of granular activities from the user. This makes the user interface of Warehouse Builder ideal for nonrepetitive and complex tasks.

Scripting is used to automate repetitive tasks and increases productivity. You can also use scripting to perform mass updates. In the following screenshots are examples where you will be able to appreciate scripting.

Back to Topic List

Back to Topic List

In order for this lesson to work successfully, you will need to have performed the following:

1.

Have knowledge of basic TCL constructs and concepts.

 

Examples of OMB Plus Commands

Back to Topic List

In this topic you will learn how to log in and connect to OMB Plus. Also, you will learn how to perform actions that can be performed from the Warehouse Builder client using Scripting.

1.

To start Warehouse Builder's scripting utility, OMB Plus, select

Start > Programs > Oracle- <ORACLE_HOME> Warehouse Builder > OWB OMB Plus.

 

2.

To connect to the repository use: OMBCONNECT <user>/<password>@<host>:<port>:<service_name> USE REPOSITORY <name of repository> (Specify the name of the repository to work on. If this option is not provided the default repository is used)

OMBCONNECT design_client/design_client@localhost:1521:obeowb

Move your mouse over this icon to see the image

Make note: All OMB commands are case sensitive and must be specified in uppercase and Tcl commands in lowercase.

To work as a single user with the repository, use the following command:

OMBCONNECT design_client/design_client@localhost:1521:obeowb USE SINGLE_USER_MODE

 

3.

You want to add three columns CREATED_BY, DATE_CREATED, and DATE_MODIFIED to all tables in the STG module. Is there any way to avoid the tedious task of keying in these three columns repetitively in many tables?

To solve this problem, you can go to the OWB client and process all the tables, or you can do this by writing the following simple script, which saves you a lot of time. Use the example code to automate metadata changes.

Move your mouse over this icon to see the image

 

4.

You can automate certain generic tasks within Warehouse Builder. These tasks can then be scheduled.

Move your mouse over this icon to see the image

 

5.

To disconnect from the Repository use OMBDISCONNECT.

Move your mouse over this icon to see the image

Some OMB commands can be abbreviated, for example, OMBDISCONNECT to OMBDISC. The general rule is, after OMB you must enter the first four characters for the abbreviated version.

 

The purpose of the Warehouse Builder scripting language is to define a scripting environment for users to interact with the OWB back end. The scripting component of Warehouse Builder is a complete language and user interface that allows you to manipulate the Warehouse Builder metadata and perform all Warehouse builder functions.

Oracle University Class on Oracle Warehouse Builder: Scripting

 

Move your mouse over this icon to hide all screenshots

 

 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy