Skip Headers
Oracle® Warehouse Builder API and Scripting Reference
11g Release 2 (11.2)

Part Number E10584-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
PDF · Mobi · ePub

A Additional and Optional Usages

This chapter includes the following topics:

Using Control Files to Import and Export Metadata

Control files enable you to specify additional options while importing or exporting metadata using the OMB*Plus commands OMBIMPORT and OMBEXPORT.

Creating MDL Control Files

An MDL control file is a text file that contains a set of parameters that are used by the Metadata Loader. These parameters specify the options to be used while exporting or importing metadata.

You can use any text editor to create a control file. Oracle recommends that you use the extension .ctl for control files. This helps identify it as an MDL control file.

The format for an export or import parameter is:

Keyword=Value

You can also form a parameter file by replacing the value 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 the keyword TABLES followed by the names of the tables to import as follows:

TABLES=(Customers, Products, Days)

You can use the comment indicator (#) to place comments in the control file. Put the comment indicator in the first column of a record and follow it with text.

Control File Example

An example of a control file is shown in Example A-1. This control file contains a list of object types (keywords) and their object names (values) to import from the MDL file. This is useful since the OMBIMPORT command does not provide an option to select the objects that you want to import from an MDL file.

Example A-1 Control File Format

PROJECT=MY_PROJECT
ORACLE_MODULES=DW1
TABLES=TABLE1
ORACLE_MODULES=DW2
DIMENSIONS=DIM1,DIM2

Keywords Used to Import Metadata

You use keywords to form the parameters specified to selectively import objects using a control file. Table A-1 provides a list of keywords for object types that you use to select objects to import.

Table A-1 Object Types Keywords for Importing Objects

Object Type Keyword Description

ACTION

Used only for the Action Plan. The import mode must be MODE = ACTIONPLAN.

The options are:

  • CREATE

  • REPLACE

  • UPDATE

  • INCREMENTALUPDATE (Merge mode)

  • NONE (do not import the object)

If a MODE parameter is not included, then the default is CREATE.

ACTIVITY_TEMPLATE_FOLDERS

Use this keyword to specify the activity template folders to be imported.

ACTIVITY_TEMPLATES

Use this keyword to specify the activity templates to be imported.

Requires the ACTIVITY_TEMPLATE_FOLDERS to be specified.

ADVANCED_QUEUES

Use this keyword to specify the advanced queues to be imported.

Requires the ORACLE_MODULES option to be specified.

BUSINESS_AREAS

Use this keyword to specify the business areas to be imported.

Requires the BUSINESS_DEFINITION_MODULES option to be specified.

BUSINESS_DEFINITION_MODULES

Use this keyword to specify the business definition modules to be imported.

Requires the PROJECT option to be specified.

BUSINESS_PRESENTATION_MODULES

Use this keyword to specify the business presentation modules to be imported.

Requires the PROJECT option to be specified.

CALENDAR_MODULES

Use this keyword to specify the calendar modules to be imported.

CALENDARS

Use this keyword to specify the calendars to be imported.

Requires the CALENDAR_MODULES option to be specified.

COLLECTIONS

Use this keyword to specify the collections to be imported.

Requires the PROJECT option to be specified.

CONFIGURATIONS

Use this keyword to specify the configurations to be imported.

CONNECTORS

Use this keyword to specify the connectors to be imported.

Requires the LOCATIONS option to be specified.

CONTROL_CENTERS

Use this keyword to specify the control centers to be imported.

Requires the PROJECT option to be specified.

CUBES

Use this keyword to specify the cubes to be imported.

Requires the ORACLE_MODULES option to be specified.

DATA_AUDITORS

Use this keyword to specify the data auditors to be imported.

Requires the ORACLE_MODULES option to be specified.

DATA_RULE_MODULES

Use this keyword to specify the data rule modules to be imported.

Requires the PROJECT option to be specified.

DATA_RULES

Use this keyword to specify the data rules to be imported.

Requires the DATA_RULE_MODULES option to be specified.

DATA_PROFILES

Use this keyword to specify the data profiles to be imported.

Requires the PROJECT option to be specified.

DEPLOYMENTS

Use this keyword to specify the deployments to be imported.

DIMENSIONS

Use this keyword to specify the dimensions to be imported.

Requires the ORACLE_MODULES option to be specified.

DRILL_PATHS

Use this keyword to specify the drill paths to be imported.

Requires the BUSINESS_DEFINITION_MODULES option to be specified.

EXPERT_MODULES

Use this keyword to specify the expert modules to be imported.

Requires the PROJECT option to be specified.

EXPERTS

Use this keyword to specify the experts to be imported.

Requires the EXPERT_MODULES option to be specified.

EXTERNAL_TABLES

Use this keyword to specify the external tables to be imported.

Requires the ORACLE_MODULES option to be specified.

FLAT_FILE_MODULES

Use this keyword to specify the flat file modules to be imported.

Requires the PROJECT option to be specified.

FLAT_FILES

Use this keyword to specify the flat files to be imported.

Requires the FLAT_FILE_MODULES option to be specified.

FUNCTIONS

Use this keyword to specify the functions to be imported.

Requires the module (for example, ORACLE_MODULES, BUSINESS_DEFINITION_MODULES, and so on) option to be specified.

GATEWAY_MODULES

Use this keyword to specify the Gateway modules to be imported.

Requires the PROJECT option to be specified.

GENERIC_COMPONENTS

 

GENERIC_FOLDERS

 

GENERIC_MODULES

 

ICONSETS

Use this keyword to specify the icon sets to be imported.

Requires the ORACLE_MODULE option to be specified.

ITEM_CLASSES

Use this keyword to specify the item classes to be imported.

Requires the BUSINESS_DEFINITION_MODULES option to be specified.

ITEM_FOLDERS

Use this keyword to specify the item folders to be imported.

Requires the BUSINESS_DEFINITION_MODULES option to be specified.

LOCATIONS

Use this keyword to specify the locations to be imported.

Requires the PROJECT option to be specified.

MAPPINGS

Use this keyword to specify the mappings to be imported.

Requires the ORACLE_MODULES option to be specified.

MATERIALIZED_VIEWS

Use this keyword to specify the materialized views to be imported.

Requires the ORACLE_MODULES option to be specified.

ORACLE_MODULES

Use this keyword to specify the Oracle modules to be imported.

Requires the PROJECT option to be specified.

OBJECT_TYPES

Use this keyword to specify the object types to be imported.

Requires the ORACLE_MODULES option to be specified.

PACKAGES

Use this keyword to specify the packages to be imported.

Requires the ORACLE_MODULES option to be specified.

PLSSQL_RECORD_TYPES

Use this keyword to specify the PL/SQL record types to be imported.

PLSQL_REF_CURSOR_TYPES

Use this keyword to specify the PL/SQL REF cursor types to be imported.

PLSQL_TABLE_TYPES

Use this keyword to specify the PL/SQL types to be imported.

Requires the ORACLE_MODULES option to be specified.

PLUGGABLE_MAPPING_FOLDERS

Use this keyword to specify the pluggable mapping folders to be imported.

PLUGGABLE_MAPPINGS

Use this keyword to specify the pluggable mappings to be imported.

Requires the PLUGGABLE_MAPPINGS_FOLDERS option to be specified.

PRESENTATION_TEMPLATES

Use this keyword to specify the presentation templates to be imported.

Requires the BUSINESS_PRESENTATION_MODULES option to be specified.

PROCESS_FLOW_MODULES

Use this keyword to specify the process flow modules to be imported.

Requires the PROJECT option to be specified.

PROCESS_FLOW_PACKAGES

Use this keyword to specify the process flow packages to be imported.

Requires the PROCESS_FLOW_MODULES option to be specified.

PROCESS_FLOWS

Use this keyword to specify the process flows to be imported.

Requires the PROCESS_FLOW_PACKAGES option to be specified.

PROFILE_PREFERENCES

 

PROJECT

Wildcard format supported, but if used, no other object type keywords can follow.

To import shared transformations, use PROJECT=PUBLIC_PROJECT.

QUERYOBJECTS

 

QUEUE_TABLES

Use this keyword to specify the queue tables to be imported.

Requires the ADVANCED_QUEUES option to be specified.

ROLES

Use this keyword to import the roles to be imported.

Requires administrator privileges.

SAP_MODULES

Use this keyword to specify the SAP modules to be imported.

Requires the PROJECT option to be specified.

SEQUENCES

Use this keyword to specify the sequences to be imported.

Requires the module (for example, ORACLE_MODULES, SAP_MODULES, and so on) options to be specified.

SHARED_MODULES

Requires PROJECT=PUBLIC_PROJECT option to be specified.

SNAPSHOTS

Use this keyword to specify the snapshots to be imported.

If this option is used, the no other object type keyword options can precede it.

SQLCOLLECTIONS

 

TABLES

Use this keyword to specify the tables to be imported.

Requires the module (for example, ORACLE_MODULES, SAP_MODULES, and so on) options to be specified.

TRANSPORTABLE_MODULE_TABLESPACES

Use this keyword to specify the transportable module tablespace to be imported.

TRANSPORTABLE_MODULES

Use this keyword to specify the transportable modules to be imported.

USERS

Use this keyword to import the users to be imported.

Requires administrator privileges.

VIEWS

Use this keyword to specify the views to be imported.

Requires the module (for example, ORACLE_MODULES, SAP_MODULES, and so on) options to be specified.


Examples of Control Files Used to Import Metadata

You can direct the MDL import utility to import objects from a file by creating a control file with a set of parameters. Example A-2 shows a typical control file for importing objects from a MDL data file.

Example A-2 Control File format

PROJECT=WH_SALES
ORACLE_MODULES=SALES_SRC
EXTERNAL_TABLES=SALES_DATA_EXT

Control File Used to Create an Action Plan

You can specify an action plan in the control file that will allow you to specifically define what you want to do with each object in the imported file. First you need to indicate that the type of import is an action plan by specifying MODE = ACTION PLAN. Next, you need to specify the type of actions for objects that you want to import or skip. If you want to import the objects, you can set the Action to either CREATE, UPDATE, REPLACE, OR INCREMENTALUPDATE. Otherwise, if you want to skip the object, specify NONE as the Action. For the list of object type keywords that you can use to import objects using the Action Plan, refer Table A-1.

Example A-3 shows an example of an MDL control file that contains an action plan.

Example A-3 MDL Action Plan

MODE=ACTIONPLAN
#
# User-Specified Action Plan
#
ACTION=NONE
ORACLE_MODULES=(DATAWAREHOUSE)
#
ACTION=CREATE
TABLES=(TABLE_3)
FACTS=(FACT1, FACT2, FACT3)
SEQUENCES=(SEQ_A, SEQ_B, SEQ_C)
#
ACTION=REPLACE
TABLES=(TABLE_1, TABLE_2)
DIMENSIONS=(DIM1, DIM2, DIM3)
#
# Switching to a different module
ACTION=REPLACE
FLAT_FILE_MODULES=(FLAT_FILE)
FILES=(FILE_1, FILE_2)
#
ACTION=CREATE
FILES=(FILE_3)
#

Exporting Metadata Using OMB*Plus

You use the OMBEXPORT command to export metadata. To use control files in conjunction with the OMBEXPORT command, use the CONTROL_FILE clause. For more information on creating control files, see "Creating MDL Control Files".

Before you use the OMBEXPORT command, ensure that you are connected to the repository from which you want to export metadata. You use the OMBCONNECT command to connect to a repository. For more information on the OMBCONNECT and OMBEXPORT commands, refer to the OMBEXPORT command in the Oracle Warehouse Builder API and Scripting Reference.

Examples of Exporting Metadata Using Control Files

To use control files in conjunction with the OMBEXPORT command:

  1. Create an MDL control file.

    For more information on creating an MDL control file, see "Creating MDL Control Files".

  2. Open OMB*Plus by first selecting Start, then Programs, then <OWB Home>, then Warehouse Builder, and, finally, OMB Plus.

  3. Connect to the repository from which you want to export metadata.

  4. Execute the OMBEXPORT command with the CONTOL_FILE clause that specifies the control file created in Step 1.

For example, to use a control file called par.ctl use the following OMBEXPORT command:

OMBEXPORT TO MDL_FILE 'd:/mdl/exp1.mdl' FROM PROJECT 'MY_PROJECT'
CONTROL_FILE 'd:/mdl/par.ctl' OUTPUT LOG TO 'd:/mdl/exp1.log'

Importing Metadata Using OMB*Plus

You use the OMBIMPORT command to import metadata. You can also use control files in conjunction with the OMBIMPORT command. To do this, use the CONTROL_FILE clause of the OMBIMPORT command. For more information on creating control files, see "Creating MDL Control Files".

Before you use the OMBIMPORT command, ensure that you are connected to the repository into which you want to import metadata. You use the OMBCONNECT command to connect to a repository. For more information on the OMBCONNECT and OMBIMPORT commands, refer to Oracle Warehouse Builder API and Scripting Reference.

Examples of Importing Metadata Using Control Files

To use control files in conjunction with the OMBIMPORT command:

  1. Create an MDL control file.

    For more information on creating an MDL control file, see "Creating MDL Control Files".

  2. Open OMB*Plus by first selecting Start, then Programs, then <OWB Home>, then Warehouse Builder, and, finally, OMB Plus

  3. Connect to the repository from which you want to import metadata.

  4. Execute the OMBIMPORT command with the CONTOL_FILE clause that specifies the control file created in Step 1.

For example, to use a control file called par.ctl use the following OMBIMPORT command:

OMBIMPORT FROM MDL_FILE 'd:/mdl/exp1.mdl'

CONTROL_FILE 'd:/mdl/par.ctl' OUTPUT LOG TO 'd:/mdl/exp1.log'

Accessing Transformation Modules Using OMB*Plus

Transformation modules consist of a set of reusable transformations that you use to transform your source data. Transformations include functions, procedures, and packages.

There are two types of transformation modules:

Predefined Transformations

Predefined transformations consist of built-in and seeded functions and procedures that are part of the Oracle Library. You can directly use these transformations in any project in your repository.Predefined transformations are grouped into the following categories. Each category contains transformations that pertain to that category.

  • Administration

  • Character

  • Control Center

  • Conversion

  • Date

  • Numeric

  • OLAP

  • Other

  • Spatial

  • Streams

  • SYS

  • XML

Accessing Predefined Transformations Using OMB*Plus

All predefined transformations belong to a transformation module called WB_PREDEFINED_TRANS in the project PUBLIC_PROJECT. Also, every project in the repository contains the WB_PREDEFINED_TRANS. To access predefined transformations, you must change the current context to the WB_PREDEFINED_TRANS transformation module either in PUBLIC_PROJECT or in your project.Each category of predefined transformations is represented by a package in the WB_PREDEFINED_TRANS transformation module. The package contains the transformations, including functions and procedures, that are belong under it. For example, all the predefined numeric transformations belong to the package called NUMERIC under the WB_PREDEFINED_TRANS transformation module.

Examples 

Use the following commands to list the types of public transformation modules.

OMB+> OMBCC '/PUBLIC_PROJECT/'OMB+> OMBLIST TRANSFORMATION_MODULES

To view the types of predefined transformations, use the following command from the context of the WB_PREDEFINED_TRANS transformation module.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_PREDEFINED_TRANS'OMB+> OMBLIST PACKAGES

To view the procedures under the Date category of the predefined transformations, first change context to the DATE package.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_PREDEFINED_TRANS/PACKAGES/DATE'OMB+> OMBLIST PROCEDURES

Use the following command to use the Date transformation TRUNC in your mapping.

OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'TRUNC_OPER' \
    > BOUND TO FUNCTION '/MY_PROJECT/WB_PREDEFINED_TRANS/DATE/TRUNC'

Custom Transformations

Custom transformations are transformations that are defined by the user. Custom transformations include functions, procedures, and packages.Custom transformations are of two types:

  • Public custom transformations

    These are part of the global shared library that consists of predefined transformations.

  • Custom transformations within a particular project

    These are accessible only in the project in which they are defined.

Public Custom Transformations

Public custom transformations are accessible across all projects in your repository. They belong to the transformation module WB_CUSTOM_TRANS under the project PUBLIC_PROJECT. Also, every project in your repository contains a transformation module called WB_CUSTOM_TRANS. This transformation module contains the public custom transformations.

Examples 

To list the types of custom transformations, you need to be in the context of the custom transformations module.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_CUSTOM_TRANS'OMB+> OMBLIST FUNCTIONS

To view the custom public procedures, use the following command from the context of the WB_CUSTOM_TRANS module in the PUBLIC_PROJECT.

OMB+> OMBLIST PACKAGES

To use a public custom function in a mapping, navigate to the context of the WB_CUSTOM_TRANS transformation module under the project in which you are defining the mapping.

OMB+> OMBCC '/MY_PROJECT/MOD1'
OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'FUNC_OPER' \
    > BOUND TO FUNCTION '/PUBLIC_PROJECT/WB_CUSTOM_TRANS/FUNC1

Custom Transformations that Belong to a Particular Project

You can create custom transformations whose scope is limited to the project in which they are defined. These custom transformations are defined in the context of a particular project and are accessible to all the modules within that project.

For example, the project MY_PROJECT contains two modules MOD1 and MOD2. In MOD1, you define a function called LOCAL_FUNC. This function is accessible from the context of both MOD1 and MOD2.

Custom transformations that belong to a particular project are part of the transformations in that project.

To create a custom transformation in the module MOD1, use the following syntax.

OMB+> OMBCREATE FUNCTION 'LOCAL_FUNC'\
    > ADD PARAMETER PARAM_1\
    > SET PROPERTIES (IN_OUT,DATATYPE) VALUES('in','varchar2')

Use the following command to reference the function LOCAL_FUNC in a mapping that you defined in module MOD2.

OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'TRUNC_OPER' \
    > BOUND TO FUNCTION '/MY_PROJECT/MOD1/LOCAL_FUNC'

Working with Mappings and Operators

This section includes the following topics for using OMB*Plus to add operators to mappings:

Defining Expressions in Mappings

When using the OMBCREATE MAPPING and OMBALTER MAPPING commands, you can create and edit expressions such as filter, join, and group by expressions. If you define the attributes of the operator before defining the expression, OMB*Plus generates the expected code. However, if you define the expression incorrectly and without first defining the necessary attributes, OMB*Plus interprets your entry as a string literal and generates unexpected code.

To correctly define an expression in a mapping, prefix each attribute name with a colon. OMB*Plus recognizes the text following a colon as an attribute. For example, OMB*Plus interprets

:INOUTGRP1.ATTR1

as an attribute ATTR1 in a group named INOUTGRP1.

If you make it a practice when writing expressions to precede attribute names with a colon, OMB*Plus returns an error message in the event that you defined the expression without first defining the operator attributes.

Default Group Names and Attribute Names

When you use OMB*Plus to add an operator to a mapping, Warehouse Builder adds the operator and assigns default groups and parameters. Table A–2 lists the default groups and parameters for each operator.

Table A-2 Default Names for Groups and Attributes

Operator Type Default Operator Name Default Group Name Default Attribute Name

TABLE

VIEW

EXTERNAL TABLE

MATERIALIZED VIEW

CUBE

DIMENSION

Same as bound object name

INOUTGRP1

Same as column names

FLAT FILE

Object name

Same as file record name

Same as field names in each record

SEQUENCE

Same as sequence name

OUTGRP1

NEXTVAL

CURRVAL

DATAGENERATOR

DATAGENERATOR

OUTGRP1

RECNUM

SYS_DATE

SEQUENCE

CONSTANT

CONST

OUTGRP1

No defaults

KEY LOOKUP

Object name

INGRP1

OUTGRP1

In LOOKUP_OUT object column names

SET

SET

INGRP1

INGRP2

OUTGRP1

None

JOINER

JOIN

INGRP1

INGRP2

OUTGRP1

None

SPLITTER

SPLIT

INGRP1

OUTGRP1

OUTGRP2

REMAINING_ROWS

None

DEDUPLICATOR

DEDUP

INOUTGRP1

None

AGGREAGTOR

AGG

INGRP1

OUTGRP1

None

FILTER

FLTR

INOUTGRP1

None

SORTER

SORT

INOUTGRP1

None

NAME AND ADDRESS

NAMEADDR

INGRP1

OUTGRP1

Within Group INGRP1: Line 1, Line 2, Line 3

Within Group OUTGRP1: First Name, Last Name, Primary Address, Secondary Address, City, State, Postal Code, Is Good Group

PROCEDURES

Procedure name

If input parameter exists, an input group will be created with the name INGRP1.

If output parameter exists, an output group will be created with the name OUTGRP1.

If inout parameter exists, an input-output group will be created with the name INGRP1.

Same as parameter names

FUNCTIONS

Same as function name

INGRP1, RETURN

An attribute

TRIGGER

PREMAP

POSTMAP

Naming see PROCEDURES and FUNCTIONS

None

INPUT_PARAMETER

MAP_INPUTS

MAP_INPUTS

None

OUTPUT_PARAMETER

MAP_OUTPUTS

MAP_OUTPUTS

None

EXTERNAL_PROCESS

EXTERNALPROCESS

None

None

EXPRESSION

EXPR

INGRP1

OUTGRP1

None


Accessing Transformation Modules

Transformation modules consist of a set of reusable transformations that you use to transform your source data. Transformations include functions, procedures, and packages.

There are two types of transformation modules:

Predefined Transformations

Predefined transformations consist of built-in and seeded functions and procedures that are part of the Oracle Library. You can directly use these transformations in any project in your repository.Predefined transformations are grouped into the following categories. Each category contains transformations that pertain to that category.

  • Administration

  • Character

  • Control Center

  • Conversion

  • Date

  • Numeric

  • OLAP

  • Other

  • Spatial

  • Streams

  • SYS

  • XML

Accessing Predefined Transformations Using OMB*Plus

All predefined transformations belong to a transformation module called WB_PREDEFINED_TRANS in the project PUBLIC_PROJECT. Also, every project in the repository contains the WB_PREDEFINED_TRANS. To access predefined transformations, you must change the current context to the WB_PREDEFINED_TRANS transformation module either in PUBLIC_PROJECT or in your project.Each category of predefined transformations is represented by a package in the WB_PREDEFINED_TRANS transformation module. The package contains the transformations, including functions and procedures, that are belong under it. For example, all the predefined numeric transformations belong to the package called NUMERIC under the WB_PREDEFINED_TRANS transformation module.

Examples 

Use the following commands to list the types of public transformation modules.

OMB+> OMBCC '/PUBLIC_PROJECT/'OMB+> OMBLIST TRANSFORMATION_MODULES

To view the types of predefined transformations, use the following command from the context of the WB_PREDEFINED_TRANS transformation module.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_PREDEFINED_TRANS'OMB+> OMBLIST PACKAGES

To view the procedures under the Date category of the predefined transformations, first change context to the DATE package.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_PREDEFINED_TRANS/PACKAGES/DATE'OMB+> OMBLIST PROCEDURES

Use the following command to use the Date transformation TRUNC in your mapping.

OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'TRUNC_OPER' \
    > BOUND TO FUNCTION '/MY_PROJECT/WB_PREDEFINED_TRANS/DATE/TRUNC'

Custom Transformations

Custom transformations are transformations that are defined by the user. Custom transformations include functions, procedures, and packages.Custom transformations are of two types:

  • Public custom transformations

    These are part of the global shared library that consists of predefined transformations.

  • Custom transformations within a particular project

    These are accessible only in the project in which they are defined.

Public Custom Transformations

Public custom transformations are accessible across all projects in your repository. They belong to the transformation module WB_CUSTOM_TRANS under the project PUBLIC_PROJECT. Also, every project in your repository contains a transformation module called WB_CUSTOM_TRANS. This transformation module contains the public custom transformations.

Examples 

To list the types of custom transformations, you need to be in the context of the custom transformations module.

OMB+> OMBCC '/PUBLIC_PROJECT/WB_CUSTOM_TRANS'OMB+> OMBLIST FUNCTIONS

To view the custom public procedures, use the following command from the context of the WB_CUSTOM_TRANS module in the PUBLIC_PROJECT.

OMB+> OMBLIST PACKAGES

To use a public custom function in a mapping, navigate to the context of the WB_CUSTOM_TRANS transformation module under the project in which you are defining the mapping.

OMB+> OMBCC '/MY_PROJECT/MOD1'
OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'FUNC_OPER' \
    > BOUND TO FUNCTION '/PUBLIC_PROJECT/WB_CUSTOM_TRANS/FUNC1

Custom Transformations that Belong to a Particular Project

You can create custom transformations whose scope is limited to the project in which they are defined. These custom transformations are defined in the context of a particular project and are accessible to all the modules within that project.

For example, the project MY_PROJECT contains two modules MOD1 and MOD2. In MOD1, you define a function called LOCAL_FUNC. This function is accessible from the context of both MOD1 and MOD2.

Custom transformations that belong to a particular project are part of the transformations in that project.

To create a custom transformation in the module MOD1, use the following syntax.

OMB+> OMBCREATE FUNCTION 'LOCAL_FUNC'\
    > ADD PARAMETER PARAM_1\
    > SET PROPERTIES (IN_OUT,DATATYPE) VALUES('in','varchar2')

Use the following command to reference the function LOCAL_FUNC in a mapping that you defined in module MOD2.

OMB+> OMBCREATE MAPPING 'MAP1'\
    > ADD TRANSFORMATION OPERATOR 'TRUNC_OPER' \
    > BOUND TO FUNCTION '/MY_PROJECT/MOD1/LOCAL_FUNC'