User's Guide and Reference

Importing data to an existing table

This section gives an overview of the steps to import data from a shape file or ESRI_SDE transfer file to an existing table. The overview is followed by details of how to complete each step.

To find out what authorization is required for importing shape data, see Authorization. To find out what authorization is required for importing ESRI_SDE data, see Authorization.

Overview of steps to import data to an existing table:

  1. Open the Import Spatial Data window.
  2. Specify the path and name of the file that contains the data to be imported.
  3. Specify how many records to import before each commit.
  4. Specify the column that is to contain the spatial data that you are importing.
  5. Specify which spatial reference system is to be associated with this data.
  6. Designate a file to collect records that fail the import.
  7. Tell DB2 Spatial Extender to import the data and, if you specified a column that has not been created yet, to create this column and to register it as a layer.

Details of steps to import data to an existing table:

  1. Open the Import Spatial Data window.
    1. From the Control Center window, expand the object tree until you find the Tables folder for the database that you want to import data to.
    2. Click the Tables folder. The tables are displayed in the contents pane on the right side of the window.
    3. Right-click the table to which you are importing data and click Spatial Extender --> Import Spatial Data in the pop-up menu. The Import Spatial Data window opens.
  2. In the File name box, specify the path and name of the file that contains the data to be imported.
  3. Use the Commit scope box to specify the number of records that you want imported before each commit. For example, to require DB2 to commit 100 records at a time, specify the number 100.
    Tip:If you want DB2 to issue a commit only after all records are processed, specify zero.
  4. Specify the column that is to contain the spatial data that you are importing.
  5. Use the Spatial reference name box to specify which spatial reference system is to be associated with the imported data.
  6. In the Exception file field, specify the path and name for a new file into which records that fail the import can be collected. Later, you can fix these records and import them from this file.

    DB2 Spatial Extender will create this file; do not specify one that already exists.

  7. Click OK to import the data. Also, if you specified a column that does not exist yet, this column will be created and registered as a layer. In addition, the exception file that you specified will be created.


[ Top of Page | Previous Page | Next Page ]