Data Load (DB2 LUW)

From DBArtisan
Jump to: navigation, search

Go Up to Data Load

DBArtisan offers a simple, six-panel wizard that lets you load data via DBArtisan’s import utility. After defining the data import operation, you have the opportunity to save the job definition for future reuse.

Starting the Import Wizard

  1. Connect to the datasource to which data is to be imported and ensure that it is the selected datasource. For details, see Connected/Selected Datasource options.
  2. Select Utilities > Data Load. The Data Import Wizard opens.
  3. Use the following table as a guide to providing details as you proceed through the wizard.
Step.Panel Options/Description

1

Do you wish to initiate a new import operation or ‘play back’ a previously saved operation? New Data Load Operation - Select to define a new data load operation. Previous Data Load Operation - Select to open a previously defined schema extraction operation. In the Data Load Definition File Name box, type the location and name of the job file or click the browse button.

2

What file has the data you wish to import? - Lets you type the location and name of the file or click the browse button. Specify the format of the file to be imported - Lets you click the list and click the file format. Options Button - Click if you want to set the ASCII file type options for a delimited option. What mode would you like to use for this import operation? - Choose a mode: INSERT - The target table must exist and imported rows are inserted into the table without affecting existing rows in the table. INSERT_UPDATE - The target table must exist and have primary key constraint defined on it. Imported rows that match the existing row of data on which the primary key is defined are updated. New rows that do not match the primary key are inserted into the table. REPLACE - The target table must exist and all data is replaced with the contents of the import data file. CREATE - The table defined in the import data file is created and rows of data are inserted into the newly created table. You must use a *.IXF file to use this mode. REPLACE_CREATE - If the target table exists, the data will be replaced with the data contained in the import data file and the table definition remains unchanged. If the target table does not exist, the table defined in the import data file is created and rows of data are inserted into the newly created table. You must use a *.IXF file to use this mode. What is the target object into which the data will be imported? - Use one of the following: DATABASE- Lets you select the database. SCHEMA - Lets you select the schema. OBJECT - Lets you select the table or view.

3

What method should be used for selecting columns for the export file? - lets you specify a method: Default, Position, Location, or Names. Indicate the columns into which data should be imported, specifying the relevant column selection attributes - Lets you select the columns. Click Edit to open the Column Position Attributes dialog. Include - Select to include the column. Position - Lets you type the position.

4

Would you like to retrieve large objects (LOB's) from separate files? - specify LOB options: Add Button - Click to open the Browse for Folder dialog. Click the LOB path. Edit Button - Click to open the Browse for Folder dialog. Remove - Click to remove the LOB path. Specify a path and name for the message file - Type the directory location of the message file or click the Browse button to find the file.

5

How many of the file’s records should be skipped before the import begins? - RESTART lets you type the value of the number of rows that should be skipped before the import operation begins. How many records should be imported before committing them to the database? - COMMENT RECORDS lets you type the value of the number of records that should be imported before they are committed to the database. Use of Compound SQL may improve performance. - STATEMENTS lets you type the value of the number, which cannot exceed 100, of the number of SQL statements per compound block.

6

Do you wish to re-use this data unload operation? - To re-use the operation, type the location and name of the data load definition file or click the Browse button. DBArtisan gives the operation a default extension of *.LOAD.

7

Review the data load operation description to verify its accuracy. To make any changes, click Back to scroll back to the appropriate panels of the wizard to make your corrections.

4. When ready, click Execute.