Skip Headers
Oracle® Warehouse Builder User's Guide
10g Release 2 (10.2.0.2)

Part Number B28223-05
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

19 Validating Data 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:

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 Explorer.

    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 19-1.

    Figure 19-1 Validation Results Dialog

    Description of Figure 19-1 follows
    Description of "Figure 19-1 Validation Results Dialog"

Viewing the Validation Results

The Validation Results dialog enables you to view validation results and correct any invalid definitions. When the Validation Results dialog 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.

The View drop-down list at the top of the Validation Results dialog enables you to filter the type of validation messages displayed. The options you can select are as follows:

The Validation Results dialog consists of the following:

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.

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 19-2. The navigation tree is useful for locating specific objects when validating a large set of objects.

Figure 19-2 Validation Navigation Tree

Description of Figure 19-2 follows
Description of "Figure 19-2 Validation Navigation Tree"

Using this tree, you can select an object or type of object and view the specific validation messages on the right.

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 object name, the validation status, and the validation message.

Note:

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

There are three types of validation status:

  • 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.

You can launch the editor that enables you to edit invalid objects by double-clicking the object name in the Validation Messages section or in the navigation tree. For example, if you double-click the object name, PRODUCTS_DIM, either in the navigation tree or the Validation tab shown in Figure 19-1, the Data Object Editor for this dimension is launched. Use this to edit the dimension definition.

Note:

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

Double-click a message in the Validation tab open the validation messages in a text editor. You can save this message as a file using the File menu of the text editor.

Editing Invalid Objects

When you validate objects, the Validation Results window is displayed. 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, double-click an invalid object from the tree or from the validation messages grid

    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 Explorer, 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 19-3, displays when the operation is complete.

    Figure 19-3 Generation Results Window

    Description of Figure 19-3 follows
    Description of "Figure 19-3 Generation Results Window"

Viewing the Generation Results

The Generation Results dialog is similar to the validation results. You view the results of generating scripts for data objects in this dialog. The left side of this dialog displays a navigation tree. The generation messages display on the right.

You can expand or collapse object types displayed.

The View drop-down list at the top of the Generation Results dialog enables you to limit the generation messages displayed. The options you can select are as follows:

  • All Objects

    Displays all types of validation messages for all the objects that were validated.

  • Warnings

    Displays only the warnings. Warnings are not critical errors, but indicate potential problems during deployment.

  • Errors

    Displays only the errors generated as a result of the validation. Errors indicate that the object definition is invalid.

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.

The Generation Results dialog displays two tabs on the right: Validation and Script. The Validation tab displays the validation messages for the selected objects This is for viewing purposes only. For details on validation, see "Validating Objects".

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

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 in the navigation tree on the left of the Generation Results dialog.

  2. Select the Scripts tab on the right of this dialog.

    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 19-5. This is read-only.

    Figure 19-5 Generated Script

    Description of Figure 19-5 follows
    Description of "Figure 19-5 Generated Script"

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 navigation tree on the left.

  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 and you can select a location where you want to save the script file.