Importing data

The import process is typically used to perform the following tasks:

The following steps describe how to import data from a file.

  1. Select the Open Import File function from the File menu. The Select Import File dialog appears.
  2. In the Select Import File dialog, specify the name of an existing import file. Typically Data Interchange Services client export files have a file extension of "eif". The import file can be in any directory. Click the Open button when the name of the import file has been selected. The Import File window appears. This window displays the contents of the selected import file. If you decide this is not the file you want to import, you may click the Open button on the toolbar or select Open from the File menu to select an alternate file to open in the window.
  3. Select one or more items to import from the Import File window, then click the Import button on the toolbar. Alternatively, you can select Import from the Actions menu once you have selected the files to import.
  4. If you have more than one database defined in Data Interchange Services client, the Select a Database dialog appears. Select the database to which the items are to be imported, and then click the OK button.
  5. The selected items begin importing. The Execution Status window appears showing the progress of the import. The Execution Status window can be closed at any time. You do not have to wait until the import is completed.
  6. Close the Import File window when you are done with the import file.

The file read by the import process and created by the export process is interchangeably called an import file or an export file. Though the two terms are commonly used, they refer to the same file.

During the import process, you may receive a message indicating that an item you are importing already exists in the database. The message asks if you want to replace the existing item with item being imported. Indicating you do not want to replace the existing item will cancel the import process. Indicating that you do want replace the existing item will result in the existing item being replaced in the database. If there are associated or referenced items being imported also, they will also be replaced.

When Data Interchange Services client is finished importing the selected items, a message appears in the Execution Status window indicating the import has completed. A check mark is placed next to the imported items in the tree view to indicate that these items have been imported. Parent nodes are marked as imported when all child nodes have been imported. Thus a check mark placed next to the root node indicates that all importable items in the file have been imported.

Importing XML schemas

The format of an XML document can be defined by an XML schema. Schemas can be obtained from various organizations or can be created by the user using an editor of some sort. Import any XML schema that you want to use in a data transformation map.

Schemas are stored in Data Interchange Services client within schema document definitions. Import an XML schema to create a new schema document definition when you plan to process an XML document defined by an XML schema.

Note:
Schema document definitions are assigned to an XML dictionary. The XML Dictionary must be created before importing the schema into Data Interchange Services client.

The following steps describe how to import an XML schema.

  1. Select Open Import File from the File menu. This opens the Select Import File dialog. This is similar to most common Windows dialogs used specify the name of the file.
  2. Select XML Schema File in the Files of Type drop-down list. The window changes so only files with a type of "xsd" will be displayed.
  3. Enter the name of the file or use the dialog to select a directory and file name of the schema to be imported. Click the Open button when you have selected your schema file. The Select a Database dialog appears if you have more than one database defined to Data Interchange Services client. If you only have one database defined, the Import XML Schema dialog appears.
  4. If the Select a Database dialog appears, select the Data Interchange Services client database you wish to import the schema into, then press the OK button. The Import XML Schema dialog appears.
  5. On the Import XML Schema dialog, enter the appropriate information and click the Import button.

At this point the schema is imported into a schema document definition which is created as part of the import.

Note:
The name of the schema document definition must be unique amongst schema document definitions and DTD document definitions within the same dictionary. An imported schema will replace any existing schema document definition or DTD document definition that has the same name.

Use the Schema Document Definition editor to view and update a schema document definition.

Data Interchange Services client scans the schema when it is imported looking for a targetNamespace attribute. If one is found, the Target Namespace field is filled with the corresponding value. The target namespace associated with the schema can be changed, but typically it should not be changed unless the import was not able to find it correctly. Setting the target namespace to a value that does not match the targetNamespace attribute can prevent Data Interchange Services client from parsing the schema correctly, which results in errors when trying to use the schema document definition in a map, and it can also prevent the map from opening.

If the schema contains an "xmlns" attribute to identify a namespace, and the namespace is not already represented as a Namespace object within Data Interchange Services client, a new Namespace object is added to represent the namespace at the time the schema is imported. The prefix and other information associated with Namespace objects may be changed later.

Importing XML DTDs

The format of an XML document can be defined by a document type definition (DTD). DTDs can be obtained from various organizations or can be created by a user. Import any XML DTD into Data Interchange Services client that you want to use in a data transformation map.

DTDs are stored in Data Interchange Services client within DTD document definitions. Import an XML DTD to create a new DTD document definition when you plan to process an XML document defined by an XML DTD.

Note:
DTD document definitions are assigned to an XML dictionary. The XML dictionary must be created before importing the DTD into Data Interchange Services client.

The following steps describe how to import an XML DTD.

  1. Select Open Import File from the File menu. This opens the Select Import File dialog. This is similar to most common Windows dialogs used specify the name of the file.
  2. Select XML DTD File in the Files of Type drop-down list. The window changes so only files with a type of "dtd" will be displayed.
  3. Enter the name of the file or use the dialog to select a directory and file name of the DTD to be imported. Click the Open button when you have selected your DTD file. The Select a Database dialog appears if you have more than one database defined to Data Interchange Services client. If you only have one database defined, the Import XML DTD dialog appears.
  4. If the Select a Database dialog appears, select the Data Interchange Services client database you want to import the DTD into and then click the OK button. The Import XML DTD dialog appears.
  5. On the Import XML DTD dialog, enter the appropriate information and click the Import button.

At this point the DTD is imported into a DTD document definition which is created as part of the import.

Note:
The name of the DTD document definition must be unique amongst DTD document definitions and Schema document definitions within the same dictionary. An imported DTD will replace any existing DTD document definition or schema document definition that has the same name.

Use the DTD Document Definition editor to view and update a DTD document definition.

Copyright IBM Corp. 2003, 2005