| Oracle9i Warehouse Builder User's Guide Release 9.2 Part Number B10996-01 |
|
As you design mappings and process flows, you may want to use specialized transformations to transform data. This chapter describes how to import transformation definitions and how to create custom transformations.
This chapter includes the following topics:
Transformations are PL/SQL functions, procedures, and packages that enable you to transform data. Warehouse Builder provides you a set of pre-defined transformations from the Oracle Library. You can also use the New Transformation Wizard to create custom transformations that define a standalone function, procedure, or package. Use transformations when designing mappings and process flows that define ETL processes.
From the Warehouse Builder navigation tree, expand the Public Transformations node to display the following types of transformations available in Warehouse Builder, as shown in Figure 9-1.
The Custom library stores transformations that can be shared across different warehouse modules in a repository. It contains the following categories:
These transformation categories are also available within each warehouse module under the Transformations node. When you create functions and procedures within a warehouse module, you cannot share it across projects in the same repository.
Warehouse Builder also provides pre-defined categories of transformations that enable you to perform common transformations quickly and easily. These built-in functions and procedures include a set of standard transformations organized into the following categories:
For more information about pre-defined transformations, see the Oracle9i Warehouse Builder Transformation Guide.
You can create custom transformations using the New Transformation Wizard.
To define a custom transformation:
Warehouse Builder opens the New Transformation Wizard Welcome page.
Warehouse Builder displays the Name page.
Warehouse Builder displays the Parameters page, as shown in Figure 9-2.
Warehouse Builder displays the Implementation page, as shown in Figure 9-3.
Warehouse Builder displays the Finish page.
Warehouse Builder creates the function, procedure, or package and displays it under the corresponding folder under the Public Transformations and Custom nodes in the navigation tree.
Using the Import Wizard, you can import PL/SQL functions, procedures, and packages into a Warehouse Builder project.
The following steps describe how to import PL/SQL packages from other sources into Warehouse Builder.
To import a PL/SQL function, procedure, or package:
Warehouse Builder displays the Database Link Information dialog.
Warehouse Builder displays the Import Metadata Wizard Welcome page.
The Import Metadata Wizard displays the Object Selection page, as shown in Figure 9-5.
Check if function is deterministic:
This hint helps to avoid redundant function calls. If a stored function was called previously with the same arguments, the previous result can be used. The function result should not depend on the state of session variables or schema objects. Otherwise, results might vary across calls. Only DETERMINISTIC functions can be called from a function-based index or a materialized view that has query-rewrite enabled.
Check if function should be enabled for parallel execution:
This option declares that a stored function can be used safely in the child sessions of parallel DML evaluations. The state of a main (logon) session is never shared with child sessions. Each child session has its own state, which is initialized when the session begins. The function result should not depend on the state of session (static) variables. Otherwise, results might vary across sessions.
The Import Metadata Wizard displays the Summary and Import page, as shown in Figure 9-6.
The Import Results dialog displays, as shown in Figure 9-7.
The imported PL/SQL information appears under the Custom node in the navigation tree.
When you use imported PL/SQL:
You can edit a function, procedure, or package from the Transformation Properties Sheet. Make sure you edit properties consistently. For example, if you change the name of a parameter, then you must also change its name in the implementation code.
To edit a function, procedure, or package:
Warehouse Builder displays the Transformation Properties Sheet. For Packages, you can only edit the name and description of the package. For Functions and Procedures the Properties Sheet displays three tabs: Name, Parameters, and Implementation.
Name: You can edit the name and description of the function or procedure. For functions, you can also edit the return data type.
Parameters: You can edit, add, or delete new parameters for a function or procedure. You can also edit and define the attributes of the parameters.
Implementation: Review the PL/SQL code for the parameter. Click Code Editor to edit the code.
|
|
![]() Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
|