In addition to the existing support for tag language files, the Data Warehouse Center can now import and export metadata to and from XML files that conform to the Common Warehouse Metamodel (CWM) standard. Importing and exporting these CWM-compliant XML files is referred to as the Common Warehouse Metadata Interchange (CWMI).
You can import and export metadata from the following Data Warehouse Center objects:
The CWMI import and export utility does not currently support certain kinds of metadata, including: schedules, warehouse schemas, users, and groups.
The Data Warehouse Center creates a log file that contains the results of the import and export processes. Typically, the log file is created in the x:\program files\sqllib\logging directory (where x: is the drive where you installed DB2), or the directory that you specified as the VWS_LOGGING environment variable. The log file is plain text; you can view it with any text editor.
You can import metadata either from within Data Warehouse Center, or from the command line.
New objects that are created through the import process are assigned to the default Data Warehouse Center security group. For more information, see "Updating security after importing" in these Release Notes.
If you are importing metadata about a step, multiple files can be associated with the step. Metadata about the step is stored in an XML file, but sometimes a step has associated data stored as BLOBs. The BLOB metadata has the same file name as the XML file, but it is in separate files that have numbered extensions. All of the related step files must be in the same directory when you import.
Updating steps when they are in test or production mode
A step must be in development mode before the Data Warehouse Center can update the step's metadata. If the step is in test or production mode, demote the step to development mode before importing the metadata:
The step is now in development mode. Change the step back to either test or production mode after you import the metadata.
Importing data from the Data Warehouse Center
You can import metadata from within the Data Warehouse Center:
Using the command line to import metadata
You can also use the command line to import metadata. Here is the import command syntax:
CWMImport XML_file dwcControlDB
dwcUserId dwcPW [PREFIX = DWCtbschema]
XML_file | The fully qualified path and file name (including the drive and directory) of the XML file that you want to import. This parameter is required. |
dwcControlDB | The name of the warehouse control database into which you want to import your metadata. This parameter is required. |
dwcUserId | The user ID that you use to connect to the warehouse control database. This parameter is required. |
dwcPW | The user password that you use to connect to the warehouse control database. This parameter is required. |
[PREFIX=DWCtbschema] | The database schema name for the Data Warehouse Center system tables. If no value for PREFIX= is specified, the default schema name is IWH. This parameter is optional. |
Updating security after importing
As a security measure, the Data Warehouse Center does not import or export passwords. You need to update the passwords on new objects as needed. For more details on import considerations, see the Data Warehouse Center Administration Guide, Chapter 12, "Exporting and importing Data Warehouse Center metadata."
When you import metadata, all of the objects are assigned to the default security group. You can change the groups who have access to the object:
You can export metadata either from within Data Warehouse Center, or from the command line.
Some steps have metadata that is stored as a BLOB. The BLOB metadata is exported to a separate file that has the same file name as the step's XML file, but with a numbered extension (.1, .2 and so on).
Exporting data from the Data Warehouse Center
You can export metadata from within the Data Warehouse Center:
The Data Warehouse Center creates an input file, which contains information about the Data Warehouse Center objects that you selected to export, and then exports the metadata about those objects. The progress window is displayed while the Data Warehouse Center is exporting the metadata.
Using the command line to export metadata
Before you can export metadata from the command line, you must first create an input file. The input file is a text file with an .INP extension, and it lists all of the objects by object type that you want to export. When you export from within the Data Warehouse Center, the input file is created automatically, but to export from the command line you must first create the input file. You can create the input file with any text editor. Type all of the object names as they appear in the Data Warehouse Center. Make sure you create the file in a read/write directory. When you run the export utility, the Data Warehouse Center writes the XML files to the same directory where the input file is.
Here's a sample input file:
<PROC> Tutorial Fact Table Process <IR> Tutorial file source Tutorial target <UDP> New Program group
In the <PROC> (processes) section, list all of the processes that you want to export. In the <IR> (information resources) section, list all the warehouse sources and targets that you want to export. The Data Warehouse Center automatically includes the tables and columns that are associated with these sources and targets. In the <UDP> (user defined programs) section, list all the program groups that you want to export.
To export metadata, enter the following command at a DOS command prompt:
CWMExport INPcontrol_file dwcControlDB
dwcUserID dwcPW [PREFIX=DWCtbschema]
INPcontrol_file | The fully qualified path and file name (including the drive and directory) of the .INP file that contains the objects that you want to export. This parameter is required. |
dwcControlDB | The name of the warehouse control database that you want to export from. This parameter is required. |
dwcUserID | The user ID that you use to connect to the warehouse control database. This parameter is required. |
dwcPW | The password that you use to connect to the warehouse control database. This parameter is required. |
[PREFIX=DWCtbschema] | The database schema name for the Data Warehouse Center system tables. If no value for PREFIX= is specified, the default value is IWH. This parameter is optional. |