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

33 Importing and Exporting with the Metadata Loader (MDL)

The Metadata Loader (MDL) enables you to populate a new repository as well as transfer, update, or restore a backup of existing repository metadata. You can also take snapshots of your metadata and use them for backup, compare, and restore purposes.

This section contains the following topics:

Overview of Import and Export Using Metadata Loader

Warehouse Builder provides several features that enable you to copy and move metadata for the purposes of backup, history management and version management. You can import and export metadata for any type of object on the Project Explorer, Global Explorer, and Connection Explorer using the Metadata Loader (MDL) utility. You can then move exported files into a third-party version control tool such as Oracle Repository, ClearCase, or SourceSafe. You can enter annotations for your MDL export file to keep track of the information contained in the file. The MDL enables you to copy or move metadata objects between repositories, even if those repositories reside on platforms with different operating systems.

You can also perform metadata change management by taking snapshots of your metadata using Warehouse Builder Design Center or OMB Plus scripting. Snapshots enable you to capture definitions of metadata objects using Warehouse Builder scripts. Use snapshots for metadata backup and version management. For more information about metadata change management, see Chapter 32, "Managing Metadata Changes".

This section contains the following topics:

Metadata Loader Utilities

The Metadata Loader consists of the following two utilities:

  • Metadata Export Utility

    Use the Metadata Export Utility to export metadata from a Warehouse Builder repository.

  • Metadata Import Utility

    Use the Metadata Import Utility to import metadata into a Warehouse Builder repository.

MDL uses its own format, and the Metadata Import Utility only reads files of MDL format (files created by the Metadata Export utility). The Metadata Loader file is a formatted ZIP file.

Metadata Export Utility

The Metadata Export Utility extracts metadata objects from a repository and writes the information into a ZIP format file. This ZIP file has a .mdl extension and contains the following files:

  • Metadata Loader XML file

    This file contains the objects extracted from the repository and formatted in XML. It has the same name as the of the ZIP file, but with the extension .mdx.

  • Catalog

    The catalog file is called mdlcatalog.xml and it contains internal information about the Metadata Loader XML file.

The Metadata Export Utility enables you to specify a file name and a path for the exported MDL file. For example, you export the repository metadata into a file called sales.mdl. When you unzip this MDL ZIP file, you obtain two files. The file sales.mdx contains the repository objects. The file mdlcatalog.xml contains internal information about the MDL XML file.

You can export an entire project, collections, public objects, locations, or any subset of objects. If you export a subset of objects, the MDL exports definitions for each object that you have selected and the parent objects to which the subset belongs. This enables the MDL to maintain the tree relationships for those objects during metadata import.

For example, if you export a single dimension, the export file contains definitions for:

  • The dimension

  • The module to which the dimension belongs

  • The project to which the module belongs

If you are exporting a subset of objects, make sure you export all referenced objects and import them as well. You can export the objects referenced by a set of objects by selecting the Export All Dependencies option on the Metadata Export dialog. For example, if you export a table DEPT and it contains a foreign key reference to the table EMP, you can choose to export EMP along with DEPT.

Metadata Import Utility

The Metadata Import Utility reads the metadata information from an exported MDL file and creates, replaces, or merges the metadata objects into a repository. It imports information belonging to exported metadata objects such as table columns and their constraints, data loading configuration parameters, and named attribute sets. The Metadata Import Utility enables you to import repository objects even if the references for those objects cannot be satisfied.

You can use the Metadata Import Utility to import objects into a project or a collection. The Metadata Import Utility only reads files created by the metadata export utility.

If the MDL file being imported was created using an earlier version of Warehouse Builder, the Metadata Import Utility automatically upgrades it to the current version of Warehouse Builder. For more information on the automatic upgrade of MDL files, see "Upgrading Metadata from Previous Versions".

Uses of Metadata Loader

Use the metadata loader to perform any of the following tasks:

  • Backup metadata: The MDL is an important part of your disaster recovery strategy. You can export a file with your existing repository metadata as a backup and use that exported file to restore a repository if necessary.

  • Seed a new repository: You can export data from an existing repository and use it as the basis for a new repository.

  • Migrate a repository: You can export the metadata from a previous Warehouse Builder version to a file and then import the file into a newer version of Warehouse Builder. You need to do this when you upgrade to a newer version of Warehouse Builder.

  • Automatically upgrade from a previous version of MDL data file: When you import metadata from an MDL data file that has been created using a previous version of Warehouse Builder, the MDL automatically upgrades the data file to the current version.

  • Copy metadata: A multiple user development environment can result in multiple copies of the same metadata. The MDL makes it easy to load single set metadata into more than one repository.

Accessing the Metadata Loader

You can access the Metadata Loader using one of the following:

  • Design Center

    When you use the menu in the Design Center, a graphical interface guides you through the export or import process as described in"Using Metadata Loader with Warehouse Builder Design Center".

  • OMB Plus or Scripting

    OMB Plus provides the following commands to export and import metadata: OMBEXPORT, OMBIMPORT, OMUEXPORT, and OMUIMPORT. Use the OMBUIMPORT and the OMPUEXPORT commands to display the Metadata Loader user interface from OMB Plus. For more information on importing metadata using the OMBIMPORT and OMBEXPORT commands, see "Using Metadata Loader with OMB Plus".

Multiple Session Concurrency and MDL

The Warehouse Builder repository allows multiple clients to access the same repository schema concurrently. Warehouse Builder uses locks to allow only one client to change repository objects. While an object is locked, other clients can only view it as it existed after the last transaction instigated by any user is saved.

When replacing or merging objects, the MDL acquires locks on the primary objects that exist both in the repository and in the MDL file. Primary objects include, but are not limited to, projects, modules, tables, dimensions, cubes, mappings, views, and flat files. Secondary objects, such as columns and mapping attributes, are not locked. If locks cannot be obtained because other users are locking the primary objects, then the import fails. Therefore, you must be able to hold locks for primary objects that you are importing.

If the target repository is not an Oracle 10g database and the MDL import affects too many objects in the repository, the MDL automatically switches to single user mode. This means that no other users can log on to the repository until after the MDL import completes. Single-user mode allows the MDL to avoid the performance degradation that results from using a large number of locks. In single-user mode, the MDL is less likely to deplete the repository enqueue resources. If other users are logged into this repository when MDL attempts to switch to single-user mode, MDL cannot switch to single-user mode and subsequently fails.

Tip:

To ensure a successful metadata import, you may need to be the sole client accessing the repository.

The MDL saves changes made to the repository after a successful metadata import (any import with no error messages, including imports with only information or warning messages). The MDL also executes a rollback after an unsuccessful import.

Metadata Loader Log File

Whenever you export or import repository metadata, the MDL writes diagnostic and statistical information to a log file. You can specify the location of the log file when you invoke the MDL.

The log file enables you to monitor and troubleshoot export and import activities in detail and contains the following information:

  • Name of the data file

  • Start time and end time of the export or import

  • Time taken for the export or import in hours, minutes, and seconds (in hh:mi:ss format) or milliseconds

  • Object types exported or imported

  • Number of objects of each object type exported or imported

    The import log file also displays the total number of objects that have been added, replaced, skipped, and deleted.

  • Status messages

    Status messages provide information about the import or export process. They are of the following types:

    • Informational: Provides information about the import or export, such as missing metadata objects, whether or not objects were imported, and any reasons why objects were not imported or exported.

    • Warning: Cautions you about the import or export of an object but does not indicate a failed or aborted export or import. A warning notifies you of the possibility of unexpected results that could occur as a result of the export or import.

    • Error: Indicates that the MDL export or import was aborted and did not complete successfully. The error message provides a brief description of the reason for the failure.

About Metadata Loader Results

When you use the Metadata Loader Export or Import utilities, you can view the results of a successful export or import task. You can use the Metadata Export Results dialog or the Metadata Import Results dialog to ensure that all of the objects were exported or imported. To view the results dialog, click Show Statistics on the Metadata Export Progress dialog or the Metadata Import Progress dialog.

The results dialog contains the following information:

  • The name of the project exported or imported (if applicable).

  • The number of objects of each type exported or imported.

  • The number of objects of each object type skipped.

    Details about the number of skipped objects is displayed only when you import metadata.

Using Metadata Loader with Warehouse Builder Design Center

You can use the Design Center to run the Metadata Loader utilities. The Design Center provides a graphical interface that guides you through the process of exporting and importing metadata.

This section contains the following topics:

Exporting Metadata Using Warehouse Builder Design Center

You can use Design Center to export objects from a Warehouse Builder repository into an MDL file. This includes objects that are part of the Project Explorer, Connection Explorer, and Global Explorer. The information related to the exported objects, such as table columns and their constraints, data loading configuration parameters, and named attribute sets, are also exported.

Note that all the objects you select for export should belong to the same explorer. For example, you cannot export a table from the Project Explorer and a public transformation from the Global Explorer at the same time. You can export them in two separate steps.

Before Exporting Metadata

Before you attempt to export metadata, ensure you have the following:

  • Required access privileges: The user preforming the export must have READ privileges on any object that you want to export. You also need to have READ privileges on folder objects. If you do not have READ privileges on a folder object, such as projects or modules, the folder object and all objects that it contains will not be exported. During an export, the Metadata Export Utility skips objects for which you do not have READ privileges. It logs information about the list of objects that have not been exported due to lack of security privileges in the Metadata Loader Log File.

    By default, Warehouse Builder provides READ privileges on all the repository objects to all registered users. If you want to export security information such as users, roles, role assignments, and object privileges, see "Export Advanced Options Dialog".

    To ensure that you are exporting the most up-to-date metadata, verify that you are the sole client accessing the repository. For more details, see "Multiple Session Concurrency and MDL".

  • Sufficient disk storage: If you lack sufficient disk space on the machine to which you export the metadata, the export fails. Your destination machine must be able to contain the entire metadata file. The export utility cannot save portions of the metadata file.

To export metadata from a repository using the Design Center:

  1. From the Design Center, select the object or objects you want to export. You can select multiple objects by holding down the Ctrl key and selecting the objects.

    You can export individual objects such as tables or groups of objects. When you export projects nodes, or modules, you also export the objects they contain. When you export collections, you also export the objects they reference.

  2. From the Design menu, select Export and then Warehouse Builder Metadata.

    If you made changes to the repository metadata prior to running the export utility, the Warehouse Builder Warning dialog is displayed. Click Save to save changes or Revert to revert to the previously saved version.

    If you have not made any changes to the repository metadata after last saving the design, Warehouse Builder displays the Metadata Export Dialog.

Metadata Export Dialog

The Metadata Export dialog displays the names and the types of objects being exported. It also contains the following:

  • Annotations: Use this field to enter any comments about the file that contains the exported objects.

  • File Name: Warehouse Builder displays a default path and file name for the export file. You can retain this default or specify a directory and file name. Type the name of the export file to create or click Browse to locate a directory or file. The file name extension commonly used is .mdl.

  • Log File: Use this field to specify the file name and path for the log file that stores diagnostic and statistical information about the export. For more information about log files, see "Metadata Loader Log File".

  • Export all object dependencies: Select this option to export all the dependencies of the objects being exported. For example, when you export a table, the location to which the table is deployed is also exported.

    Note:

    Public objects such as locations, public transformations, public experts, public icon sets, or public data rules belong to a project called PUBLIC_PROJECT. You can export the PUBLIC_PROJECT and its objects if the selected exported objects have a dependency on the public objects and if you select the Export all object dependencies option.
  • Advanced: Use the Advanced button to export additional metadata such as user-defined properties, security information, and additional languages. For more information on the advanced options, see "Export Advanced Options Dialog".

Click Export to export the metadata for the selected objects. The Metadata Export Progress dialog is displayed. For more information on the contents of this dialog, see "Metadata Progress Dialog".

Metadata Progress Dialog

The Metadata Progress dialog displays a progress bar that indicates the progress of the metadata export, import, or upgrade activity. If the export or import is successful, a message indicating this is displayed just above the progress bar. An error in the process is displayed too.

To view detailed information about the metadata export or import, click Show Details. The message log is displayed. The message log contains the following information:

  • Start time of the export or import

  • Names and types of objects exported or imported

  • Warning or error messages

  • End time of the export or import

  • Location of the export or import log file

  • Total export or import time in hh:mi:ss or milliseconds

You can hide the message log by clicking Hide Details.

To view details about the exported or imported objects, click Show Statistics. The Metadata Export Results dialog is displayed. For more information about this dialog, refer "About Metadata Loader Results".

Once the export or import completes, the Close button is enabled. To exit the Metadata Export or Metadata Import Utility, click Close.

Export Advanced Options Dialog

Use the Export Advanced Options dialog to export any of the following:

  • Additional language metadata

  • User-defined definitions

  • Security information

This dialog contains two sections: Languages and Administration.

Languages

The Base Language field displays the base language of the Warehouse Builder repository. Warehouse Builder exports data in the base language.

You can specify additional languages to export for the objects that contain translations for their business names and descriptions. The Available Languages list displays the list of languages that are installed in the Warehouse Builder repository. To export additional languages, select the language and click the arrows to move the language from the Available Languages list to the Selected Languages list. You can choose multiple languages at the same time by holding down the Ctrl or Shift key while making your selection.

Note:

The Available Languages list will contain language entries only if you installed additional languages in the repository.

For example, the Warehouse Builder repository has the base language as American English and additional languages Spanish and French. While exporting metadata from the repository, you can select French as the additional language. The Metadata Export Utility then exports the base language of the object, American English, and the additional language French for objects that contain a French translation. Note that additional languages will be exported for an object only if they contains translations for the business names and descriptions.

Administration

You can export additional metadata if you have administrator privileges. The options you can choose to export additional metadata are as follows:

  • Export user-defined definition: Select this option to export the user-defined definitions for objects that contain any user-defined properties. This option is enabled only if you have created any user-defined properties for the objects being exported.

  • Export security information: Select this option to include security information such as object privileges or role assignments made to users. For more information about Warehouse Builder security, refer to the Oracle Warehouse Builder Installation and Administration Guide.

After you specify the options on the Export Advanced Options dialog, click OK to close this dialog and return to the Metadata Export dialog.

Importing Metadata Using Warehouse Builder Design Center

You can use the Design Center to import metadata. The Metadata Import Utility also automatically upgrades metadata that was created using an earlier version of Warehouse Builder to the current version. For more information on upgrading metadata, see "Upgrading Metadata from Previous Versions".

Before Importing Metadata

Before you attempt to import metadata, ensure you have the following:

  • Required access privileges: To import metadata, the user performing the import must have the following privileges:

    • EDIT privilege on existing objects that are being replaced by the import.

    • CREATE privilege on existing folder objects under which new objects will be created by the import.

    By default, Warehouse Builder assigns the FULL_CONTROL privilege on all repository objects to registered users. The Metadata Import Utility skips objects for which the user importing metadata does not have the required privileges. The list of objects that have not been imported due to security privileges are logged to the Metadata Loader Log File.

    You can import security information such as users and roles as described in "Import Advanced Options Dialog". When importing Warehouse Builder user metadata, if a corresponding database user does not exist for a Warehouse Builder user, the import will fail and an error message is written to the Metadata Loader Log File.

    Because the Metadata Import Utility is altering the repository, the metadata objects must be locked prior to importing. For more details, see "Multiple Session Concurrency and MDL".

  • A backup of your current repository: Consider taking a backup of your existing repository (either in the form of an export or a metadata snapshot) before attempting a large or complex import. For more information on metadata snapshots, see Chapter 32, "Managing Metadata Changes".

  • Multiple Language Support base language compatibility: The base language is the default language used in the repository and is set using the Repository Assistant during installation. You cannot alter this setting after installing the repository. For more information on setting the base language in a repository, refer to the Oracle Warehouse Builder Installation and Administration Guide.

To import objects from an export file using the Warehouse Builder Design Center:

  1. From the Warehouse Builder Design Center, select Design, Import, and then Warehouse Builder Metadata.

    If you had made changes to the repository metadata prior to running the import utility, the Warehouse Builder Warning dialog is displayed. Click Save to save changes or Revert to revert to the previously saved version.

    If you have not made any changes to the repository metadata after last saving the design, Warehouse Builder displays the Metadata Import dialog.

Metadata Import Dialog

Use the Metadata Import dialog to specify the information required to import Warehouse Builder metadata contained in an export file. Specify the following information on this dialog:

Click Advanced to import metadata for additional languages, security information, or user-defined properties. For more information on advanced options, see "Import Advanced Options Dialog".

Click Show Summary to view a summary of the export file contents. For more information on the export file contents, see "File Summary Dialog".

After specifying the options on the Metadata Import dialog, click Import to import the metadata from the MDL file. The Metadata Import Progress dialog that indicates the progress of the import is displayed. For more information about this dialog, see "Metadata Progress Dialog".

Note:

If the MDL file that you selected for import was created using an earlier version of Warehouse Builder, clicking Show Summary, Advanced, or Import displays the Metadata Upgrade dialog. This dialog enables you to automatically upgrade the selected MDL file to the current version of Warehouse Builder. For more information about this dialog, see "Metadata Upgrade Dialog".

File Name Type the name of the MDL file or click Browse to locate the MDL file you want to import.

Log File Type the name of the log file, along with the path, that will store diagnostic and statistical information about the import. You can also click Browse to locate the log file. For more information on log files, see "Metadata Loader Log File".

Object Selection The Metadata Import Utility enables you to select the objects that you want to import from the MDL file. The Object Selection section contains the following options:

  • Import all objects from file

    Select this option to import all objects contained in the export file.

  • Import selected objects from file

    Select this option to import only some of the objects contained in the MDL file. Click Select Objects to choose the objects that you want to import. The Import Object Selection dialog is displayed. This dialog contains two sections: Available and Selected. The Available section contains the primary objects such as projects, modules, tables, views, connections that are specified in the MDL file. Expand the nodes in this section to view the objects they contain. When you select a node, all the objects that it contains are included in the import. For example, if you select a module node, all the objects contained in the module are imported. Use the shuttle buttons to move the selected objects from the Available section to the Selected section.

    The MDL file being imported can also contain administrative objects. To import these administrative objects, the user performing the import must have administrative privileges. If the user performing the import does not have the required privileges:

    • If the MDL file contains some administrative objects, the Available section of the Import Object Selection Page dialog does not displays these objects.

    • If the MDL file contains only administrative objects, the Import Utility displays an alert informing that the user does not have the required administrative privileges to perform the import.

Import Option Use the Import Option section to select the import mode. You can select one of the following options for the import mode:

  • Create new metadata only

    This option adds new objects to a repository. It is referred to as the create mode.

  • Update metadata (replace existing objects and create new metadata)

    This option is referred to as the update mode. Selecting this option adds new objects to a repository and replaces existing objects with those in the MDL file being imported.

  • Merge metadata (merge existing objects and create new metadata)

    When you select this option, the MDL adds new objects and overwrites existing objects in the repository only if they differ from those in the MDL file. This option is referred to as the merge mode. The merge mode does not delete existing objects.

    Note:

    You cannot import metadata using the Merge mode for mappings, pluggable mappings, and data auditors.
  • Replace existing objects only

    Selecting this option replaces existing objects in your repository but does not add new objects. When importing metadata objects, the Metadata Import Utility overwrites any existing metadata when you use this mode. This mode is called the replace mode.

When you import metadata using the Update or the Replace modes, the import completely replaces the child objects of existing objects so that the final object is exactly the same as the source object. Any existing children of a repository object that are not replaced or added are deleted. This occurs regardless of whether a child object occurs in a mapping or is a foreign, primary, or unique key column in a table or view.

For example, in the MDL export file, the CUST table contains three columns with the physical names: last_name, first_name, and middle_init. In the repository, the same table already exists, and contains four columns with the physical names: last_name, first_name, status, and license_ID. During a replace operation, the columns last_name and first_name are replaced, column middle_init is added, and column status and license_ID are deleted. The final result is that the CUST table in the Warehouse Builder repository contains the same metadata from the CUST table in the export file.

Tip:

Using the replace and update modes can result in lost data constraints, metadata physical property settings, data loading properties, and mapping attribute connections. If you choose to use replace or update modes, ensure that you can restore your repository, from a backup, to that state it was in prior to importing metadata in replace or update mode.

Match By

When you use the metadata import utility, it first searches the repository for metadata objects that exist in the repository and compares them to those in the file you are importing. To compare metadata in the import file with the existing repository metadata, it uses the matching criteria. How the comparison is made is determined by the import mode and by the search method you choose.

The Match By section provides the following options for matching criteria:

  • Universal Identifier: Searches your repository using the Universal Object Identifiers (UOIDs) of the objects you are importing. The Metadata Import Utility uses these UOIDs to determine whether an object needs to be created, replaced, or merged during the import operation. Use this method if you want to maintain UOIDs across different repositories even when object names in the target repository have changed.

  • Names: Searches your repository using the names of the objects that you are importing. Physical names are exported to the export file. The physical name determines whether an object needs to be created, replaced, or merged during an import operation. Use this method when object names in the target repository change, and you want to create new UOIDs for those objects.

    By default, the import utility searches by UOIDs.

Note:

MDL import does not support merging existing mappings.

Import Advanced Options Dialog

Use the Import Advanced Options dialog to import any of the following:

  • Additional language metadata

  • User-defined properties

  • Security information such as object privileges and role assignments to users

The Import Advanced Options dialog contains the following sections: Languages and Administration.

Languages

The Base Language displays the base language of the repository. By default, Warehouse Builder imports data in the base language.

You can specify additional languages to import. The Metadata Import Utility imports the translations of the object for business name and description. The Available Languages list displays the list of languages that are specified in the MDL file. For example, the MDL file contains the additional languages French, German, and Spanish. But your repository contains only Spanish and German as the additional languages. Then the Available Languages list displays only Spanish and German. Select the language you want to import and click the arrow to move the language to the Selected Languages list. You can choose multiple languages at the same time by holding down the Ctrl or Shift key while making your selection. For more information on importing metadata in additional languages, see "Import Different Base Languages".

Administration

This option is available only if you have administrator privileges and the metadata exists in the MDL file being imported. This section enables you to import the following additional metadata:

  • User-defined definitions: To import the user-defined definitions for the objects that contain any user-defined properties, select the Import User-defined Definitions option.

  • Security Grants: Select Import security information to import security information such as object privileges and role assignments made to users.

If the MDL file contains any of these objects, then you can import this additional metadata.

When you import and MDL file into a new repository, if you want to inherit the security information from the old repository, you must import the security information before you import other objects. To do this you need to be connected to the repository as a user with Warehouse Builder administrator privileges.

After you make your selections on the Import Advanced Options dialog, click OK to save your selections and return to the Metadata Import dialog.

Name Conflicts

Name conflicts can occur in one of the following cases:

  • A different object with the same name already exists in the target repository.

  • A different object with the same business name already exists in the target repository.

  • A different object with the same UOID already exists in the repository

When a name conflict occurs, the MDL reports an error and aborts the import.

File Summary Dialog

The File Summary dialog contains a brief summary of the contents of the export file. The information on this page is divided into the following sections: File, Administration, and Statistics.

File

The File section contains the name of the data file, the creation timestamp, the name of the export user, the repository connection information, the version of the Warehouse Builder Design Center used for the export, and annotations.

Administration

The Administration section contains information about the users and roles. It also lists the following details:

  • Base language of the export file

  • Additional languages in the export file

  • Whether security information were included in the export file

  • Whether user-defined definitions were included in the export file

Statistics

The Statistics section contains details about the types of objects contained in the export file and the number of objects of each type.

Combining Import Modes and Matching Criteria

Each search method used as matching criteria can be combined with an import mode in several different combinations. Each combination can offer different results in the import process. The mode that you select determines how the metadata import utility will search for metadata objects in the repository prior to importing.

For example, if the search is by the name of a repository object in the export file, the Metadata Import Utility searches the repository for the object's name. If an object with the corresponding name is not found, the resulting actions are based on the import mode you select.

Table 33-1 describes what happens in the available import modes for repository objects that do not match the object names.

Table 33-1 Import Mode without Matching Names

Import Mode Result

Create Mode

A new object is created.

Replace Mode

A warning message is written to the log file that the object cannot be replaced because it does not exist in the repository. The object is skipped.

Update Mode

A new object is created.

Merge Mode

A new object is created.


Table 33-2 describes what happens in the available import modes for repository objects that match the object names.

Table 33-2 Import Mode with Matching Names

Import Mode Result

Create Mode

A message is written to the log file that the object already exists and the object is skipped.

Replace Mode

The object is replaced.

Update Mode

The object is replaced.

Merge Mode

The object is merged.


The MDL reads and processes the imported metadata and writes status and diagnostic information in the log file.

Import Different Base Languages

When you import metadata in multiple languages, the language settings in the target repository can be different from the language settings in the export file. For example, the target repository can have the base language as English and additional language as French and German. But the export file can have the base language as French and additional language as English and German. This section describes how the MDL handles these conditions.

Base Language of the MDL Import File Different From the Base Language of the Target Repository

When you import metadata, MDL compares the ISO identification of the base language in the import file with the ISO identification of the base language of the target repository. The ISO identification consists of the language ID followed by the locale, in the format language_locale. For example, en_US is American English and fr_FR is French.

If the base ISO identification languages are different, MDL displays a warning dialog informing you that the base languages are different and warns you that Oracle recommends that you import metadata with the same character set and base language. You have the option to continue with the import. Click Yes to continue with the import. Click No to cancel the import.

WARNING:

Under certain circumstances, continuing to import metadata when the base languages are different could mean corruption of the metadata being imported.

It is recommended that you move metadata between repositories with the same character set and base languages.

If the base ISO identification languages are the same, but the locales are different, the Metadata Import Utility displays a warning dialog asking if you want to continue with the import. For example, the export file contains English and the base language of the repository is American English. Click Yes to import metadata. Click No to cancel the import.

Importing Supported Languages

During an import, MDL checks if the additional languages in the import file exist in the target repository. If the import file contains additional languages that do not exist in the target repository, and you specify that these additional languages are to be imported, the Metadata Import utility writes a warning message in the MDL log file stating that the additional languages are not installed in the repository.

Validation Rules Governing Import

When you import a set of definitions from exported metadata, the import utility can update existing definitions in a Warehouse Builder project. However, certain metadata definitions require attention to ensure that they are updated. The following are examples of some of the errors you can see:

  • Mapping Definitions. The Metadata Import Utility will bind imported mapping operators to their physical objects if the associated objects exist in the repository. However, if the associated physical objects do not exist in the repository, the imported mapping operators are unbound. The Metadata Import Utility writes a warning message in the log file stating that the mapping operators are not bound. You must then synchronize the new mapping operators with the physical objects they represent.

  • Foreign Key Definitions. It is possible that a source MDL file can contain foreign key references to unique or primary keys that are not in the target repository. If the referenced unique or primary keys for any foreign key appearing in the MDL file does not exist in the target repository, the MDL Import Utility writes a warning message in the log file. This message will state that the repository does not contain a referenced key for the foreign key.

Upgrading Metadata from Previous Versions

While importing metadata, the Metadata Import Utility automatically upgrades metadata created using previous versions of Warehouse Builder to Oracle Warehouse Builder 10g Release 2. You do not need to manually upgrade your metadata from a previous version of Warehouse Builder.

When you import an MDL file into Oracle Warehouse Builder 10g Release 2, Warehouse Builder detects the version used to create the file. If the MDL file was created using a version earlier than Oracle Warehouse Builder 10g Release 2, the Metadata Upgrade dialog is displayed. This dialog enables you to upgrade the MDL file to the current version. For more information on the contents of this dialog, see "Metadata Upgrade Dialog".

If you import an .mdl file containing metadata for gateway Modules, such as DB2 or Informix, from an older version of Warehouse Builder, the file may not import the metadata into the corresponding source module folders in a project. The imported files are stored under the Others node in the Project Explorer. You need to manually copy the metadata for the gateway modules into the correct source module folders.

The production versions of Warehouse Builder from which metadata is automatically upgraded to Oracle Warehouse Builder 10g Release 2 are as follows:

  • Oracle Warehouse Builder 2.0.4 and 2.0.5

  • Oracle Warehouse Builder 2.1.1

  • Oracle Warehouse Builder 3.0 and 3.1

  • Oracle Warehouse Builder 9.0.2, 9.0.3, and 9.0.4

  • Oracle Warehouse Builder 9.2

  • Oracle Warehouse Builder 10g Release 1

  • Oracle Warehouse Builder 10g Release 2

Metadata Upgrade Dialog

This dialog is displayed automatically when Warehouse Builder detects that an MDL file being imported was created using a version prior to Oracle Warehouse Builder 10g Release 2. Use the File Name field to specify the name of the file that stores the upgraded MDL file. You can also click Browse to locate a directory or MDL file.

Click Upgrade to upgrade the MDL file to the current version of Warehouse Builder. After the Upgrade completes, the Metadata Upgrade dialog is closed. Click Cancel if you do not want to upgrade the MDL file.

Changes to Repository Objects After Upgrading to Oracle Warehouse Builder 10g Release 2

When you upgrade from previous versions of Warehouse Builder to the current version of Warehouse Builder, the upgrade utility makes the following changes to objects in the repository:

  • My Project: The sample project that is prepackaged in Warehouse Builder is renamed from My Project to MY_PROJECT to comply with physical name requirements.

  • External Processes: External processes are upgraded to external process activities in a process flow. If you defined an external process in a mapping in a previous release, MDL Upgrade Utility redefines the object as an external process in a process flow.

  • Business Areas: Business areas are upgraded to Collections. If you defined a business area in a previous release, the MDL File Upgrade Utility prefixes the module name to the business area name and redefines it as a collection. For example, a business area named ORDERS in a module named REGION1 is upgraded to a collection named REGION1_ORDERS.

  • External process mappings: External process mappings will be migrated to process flows.

  • Dimension and Cube Mapping Operators: The mapping operators for dimensions and cubes are converted to table operators. These table operators use the physical tables created by the MDL Upgrade Utility for dimensions and cubes.

  • Dimensions: An associated dimension table is created with the same name as the dimension. The table contains the columns, constraints, and attribute sets defined in the Dimension Editor Table Properties of the dimension in the previous release.

  • Mapping Display Sets for Dimension Hierarchies: Any mapping sets originally created based on the named attribute set for a dimension hierarchy are removed. This is because Warehouse Builder no longer automatically creates and maintains display sets for dimension hierarchies.

  • Dimension Attributes: For each level attribute upgraded, a dimension attribute with the same name is created, if it does not already exist in the dimension.

  • Cubes: An associated cube table is created with the same name as the cube. The cube table contains columns, constraints, and attribute sets defined in the Cube Editor Table Properties of the cube in the previous release.

  • Cube Dimension Reference: If a foreign key in the cube does not reference a unique key in the lowest level of a dimension, the dimension reference is not imported. A warning is written to the import log file.

  • Intelligence Objects and Reports: In the previous release, intelligence objects and reports were available only using OMBPlus scripting. These objects are not upgraded.

  • Locations and Runtime Repository Connections: Locations and runtime repository connections are moved out of the projects that own them so that they can be shared across the entire repository. Thus the statistics in the import log file will display an additional project for these objects.

  • Control Centers and Locations: After an upgrade, there is no association between the locations and the control centers that they reference. You must review the control center details using the Edit Control Center dialog and select the locations associated with this control center.

  • Advanced Queues: An associated queue table is created based on the property AQ queue table name. The queue table created by the MDL File Upgrade Utility contains a column whose data type is the object type for that advanced queue.

  • Advanced Queue Operator in a Mapping: Mapping Advanced Queue operators are changed to contain only one attribute called PAYLOAD. For Mapping Advanced Queue operators that are used as a source, a new Expand operator is added after the Mapping Advanced Queue operator. For Mapping Advanced Queue operators that are used as a target, a new Construct operator is added before the Mapping Advanced Queue operator.

  • Mapping Operator Names: The MDL Upgrade Utility ensures that the physical names and business names of all mapping operators are unique.

  • MIV Objects: MIV objects are not upgraded.

The following warnings may appear as a result of standalone transformations from previous releases no longer being an independent function category, but a part of the Warehouse module:

  • Transformation name renamed from "old name" to "new name".

  • Transformation business name renamed from "old name" to "new name".

Upgrading from Oracle Warehouse Builder 2.1.1 Be aware of the following if you are upgrading from Oracle Warehouse Builder 2.1.1:

  • SQL*Loader mappings with variables and parameters are converted to group attributes of the Data Generator stage component.

  • Control characters in descriptions are replaced with spaces.

  • Configuration names in free format in Warehouse Builder 2.1 (for example, indexes) are changed to conform to the database naming standards.

  • All Warehouse Builder 2.1.1 file and data warehouse objects are upper-cased. All Oracle modules remain unchanged, except for modules whose names are upper-cased.

  • Index columns must reference an actual entity, otherwise the upgrade generates a list of columns that do not satisfy this requirement. If you do not fix this error before upgrading, the upgraded file will fail on import into Warehouse Builder.

  • All local variables are converted to global variables.

  • DDL mappings are not upgraded because they are not supported in Warehouse Builder.

    Granular exported mappings have upgrade limitations. For example, if a mapping is used as a source by Fact 1 and Fact 2, then the order of the upgrade is as follows:

    1. Fact 1

    2. Fact 2

    3. Mapping

Checking for Warnings and Error Messages

After upgrading the metadata, check the log file for warnings and errors.

  • If you receive warnings during the upgrade, the upgrade utility completes and logs the warnings. If you receive errors, the upgrade utility terminates and logs the errors.

  • If warnings and errors are shown after an upgrade, search for the words Warning and Error in the log file to determine the problem.

  • If an unexpected error occurs and the upgrade terminates, the log file contains the details. Check your log file or contact Oracle Support.

Using Metadata Loader with OMB Plus

Warehouse Builder provides a scripting language called OMB Plus that enables you to create, modify, delete, and retrieve object metadata from the repository. For more information on using OMB Plus and its commands, refer to the Oracle Warehouse Builder API and Scripting Reference.

You can import and export repository metadata using OMB Plus commands. The control file and its parameters are the same as were used when exporting or importing metadata using the previously available command-line interface.

Note that the MDL command-line interface is no longer supported in Oracle Warehouse Builder 10g Release 2 (10.2.0.2).