Skip Headers
Oracle® Warehouse Builder User's Guide
10g Release 1 (10.1)

Part Number B12146-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

12 Validating Objects

Validation verifies the definitions of both data objects and ETL objects and identifies any problems or possible errors that could occur during deployment. If objects are invalid, generation and deployment is not possible. You can validate objects and generate scripts for objects at any point in the design process. These functions are also available from within the deployment process; however, you can run them as standalone functions as you define your objects to ensure that the definitions you are providing are complete and valid. In addition, you can generate and view scripts prior to deployment to ensure that there are no problems or issues.

This chapter includes the following topics:

About Validation

Validation is the process of verifying metadata definitions and configuration parameters. These definitions must be valid before you proceed to generation and deployment of scripts. Warehouse Builder runs a series of validation tests to ensure that data object definitions are complete and that scripts can be generated and deployed. When these tests are complete, the results display. Warehouse Builder enables you to open object editors and make corrections to any invalid objects before continuing. In addition to being a standalone operation, validation also takes place implicitly when you generate or deploy objects.

To detect possible problems and deal with them as they arise, you can validate in two stages: after creating data object definitions, and after configuring objects for deployment. In this case, validating objects after configuration is more extensive than validating object definitions.

Tip:

Validate objects as you create and configure them to resolve problems as they arise. The same error-checking processes are run whether you are validating the design or configuration.

When you validate an object after it has been defined, the metadata definitions for the objects you have designed are checked for errors. For example, if you create a Table, Warehouse Builder requires that columns be defined. When this object is validated, Warehouse Builder verifies that all components of the Table have been defined. If these components are missing, validation messages display in the Validation Results window.

If you validate an object after it has been configured, metadata definitions are re-checked for errors and configuration parameters are checked to ensure that the object will be generated and deployed without any problems. You can then make edits to invalid objects.

Validating Objects

You can manually select objects for validation at anytime. Select the Validate operation from the Object menu or from the right-click menu for an object.

To validate an object or set of objects:

  1. Select an object or set of objects from the project navigation tree.

    Use the Control key to select multiple objects. You can also select objects that contain objects, such as modules and projects.

  2. From the Object menu, select Validate or right-click the object and select Validate from the pop-up menu.

    Warehouse Builder validates the selected object definitions and displays the results in the Validation Results dialog, as shown in Figure 12-1.

    Figure 12-1 Validation Results Dialog

    Surrounding text describes Figure 12-1 .

Viewing the Validation Results

The Validation Results window enables you to view validation results and correct any invalid definitions. When the Validation Results window is opened, a navigation tree displays on the left and the validation messages display on the right. You can use these areas to find and view validation messages for specific objects. A summary of the number of objects selected and validated, and the number of warnings and errors display in the title bar of the window.

Note:

A Validation Results window displays when you validate a definition. To view these results at a later time, select Validation Messages from the View menu.

The Validation Results Navigation Tree

The object or set of objects that were validated display in a navigation tree on the left side, as shown in Figure 12-2. The navigation tree is useful for locating specific objects when validating a large set of objects.

Figure 12-2 Validation Navigation Tree

Surrounding text describes Figure 12-2 .

Using this tree, you can select an object or type of object and view the specific validation messages on the right. To search for a specific object, type in the name of the object in the Search for field and click Go. If the object you are searching for is included in the current Validation Results window, the results display on the right side.

The Validation Messages

The validation messages display on the right side of the Validation Results window. If the object you selected contains other objects, all objects are included in the results. For example, if you select a module for validation, the module definition and the definitions of all the objects within that module are validated. Validation messages display the type of the object, the object name, the validation code, and the validation message, as shown in Figure 12-3.

Note:

There can be more than one validation message for a given object. If multiple errors or warnings occur, they display separately.

Figure 12-3 Validation Messages

Surrounding text describes Figure 12-3 .

There are three types of message codes:

  • Success: Indicates that the validation tests for this object were successfully passed. You can continue.

  • Warning: Indicates that there may be problems during deployment. This is not a critical error. Warnings are shown to make you aware of potential issues.

  • Error: Indicates that the object definition is invalid. The object definition cannot be generated.

From the Validation Results window, you can use the following buttons:

Message Editor Button

Click the Message Editor button to open all of the validation messages in a text editor, as shown in Figure 12-4. From here, you can type in notes about how you resolved each validation error or warning. You can then save this file and use it at a later time as a record of how you resolved different invalid objects. When you open this editor, all objects included in the current Validation Results window display in the editor.

Figure 12-4 Validation Message Editor

Surrounding text describes Figure 12-4 .

Object Editor Button

Click the Object Editor button to open an object editor for the selected object. For example, if you have a table selected in the Validation Results window and you click Object Editor, the Table Editor opens with the selected table. You can edit the object to correct any problems with the object properties or definition.You must have a specific object from the validation messages grid selected in order for this button to be enabled.

Note:

When you edit objects using the Object Editor button from the Validation Results window, the objects are not automatically re-validated. You must re-validate any previously invalid objects.

View Details Button

Click the View Details button to view more comprehensive details on a message, as shown in Figure 12-5. This is helpful because some of the detail messages contain tips and advice on how to resolve certain issues and problems. You must have a specific object from the validation messages grid selected in order for this button to be enabled.

Figure 12-5 Validation Details Dialog

Surrounding text describes Figure 12-5 .

Editing Invalid Objects

When you validate objects, the Validation Results window displays. From here you can view the invalid objects and access the editors for these objects directly.

To edit invalid definitions:

  1. From the Validation Results window, select an invalid object from the tree or from the validation messages grid and click Object Editor.

    An editor for the selected object opens.

  2. Edit the object to correct problems.

  3. Close the editor when you are finished and re-validate.

Viewing Generated Scripts

In addition to validating object definitions prior to deployment, you can also generate and view the scripts. During this process, Warehouse Builder validates the object definitions and generates the scripts required to create and populate the objects. You can then view the generation results and the code generated for each script. You can also save these scripts to a file system.

Note:

The scripts generated using the method described in this section may not be deployable. This is for viewing and verification purposes only. If you choose, you may also save these scripts to a file system.

Generating Scripts

To generate scripts for an object or set of objects:

  1. From the project navigation tree, select an object or set of objects.

    Select multiple objects using the Control key. You can also select modules, however, it may take a long time to generate scripts if it contains a large number of objects.

  2. From the Object menu, select Generate. You can also right-click the object and select Generate.

    Warehouse Builder generates the scripts for the selected objects. The Generation Results window, as shown in Figure 12-6, displays when the operation is complete.

    Figure 12-6 Generation Results Window

    Surrounding text describes Figure 12-6 .

Viewing the Generation Results

The Generation Results window is divided into two main areas. The top area, organized into a navigation tree, enables you to locate objects of interest. There is a drop-down filter that enables you to limit the objects that display. You can also expand or collapse object types.

Note:

The Generation Results window displays when you generate a script to create an object. To view these results at a later time select Generated Scripts from the View menu.

After you have selected an object, specific generation and validation results display in the bottom area. Select the Validation tab to view validation messages that exist for the selected object, as shown in Figure 12-7. This is for viewing purposes only.

Figure 12-7 Validation Tab

Surrounding text describes Figure 12-7 .

Select the Script tab to view a list of the scripts that will be generated in order to create the object you have selected, as shown in Figure 12-8. The list contains the name of the object, the name of the scripts, and the type of object that each script will generate.

Figure 12-8 Script Tab

Surrounding text describes Figure 12-8 .

Viewing the Scripts

After you have generated scripts for your target objects, you can open the scripts and view the code. Warehouse Builder generates the following types of scripts:

  • DDL scripts: Creates or drops database objects.

  • SQL*Loader control files: Extracts and transports data from file sources.

  • ABAP scripts: Extracts and loads data from SAP systems.

To view the generated scripts:

  1. From the Generation Results window, select an object from the top section of the window.

  2. Select the Scripts tab from the bottom section of the window.

    The Scripts tab contains a list of the generated scripts for the object you selected.

  3. Select a specific script and click the View Code button.

    The selected script displays in a code viewer, as shown in Figure 12-9. This is read-only.

    Figure 12-9 Generated Script

    Surrounding text describes Figure 12-9 .

Saving the Scripts

When you view the generated scripts, you also have to option of saving them to a file system.

To save generated scripts:

  1. From the Generation Results window, select an object from the top section of the window.

  2. Select the Scripts tab from the bottom section of the window.

    The Scripts tab contains a list of the generated scripts for the object you selected.

  3. Select a specific script and click the Save As button.

    The Save dialog opens, as shown in Figure 12-10, and you can select a location where you want to save the script file.

    Figure 12-10 Save Option

    Surrounding text describes Figure 12-10 .