EMS logo

Products Navigation

Data Import for MySQL

Our Partnership Status

Microsoft Certified Partner
Oracle Certified Partner
Embarcadero Technology Partner

EMS Data Import for MySQL

On-line Documentation

Step 6 - Specifying import mode


This step of the wizard allows you to define the records processing mode as Insert All, Insert New, Update, Update or Insert, Delete, Delete or Insert mode:

  • Insert all: all records from the source file are inserted into the tables irrespective of whether any records exist in the destination table or not
  • Insert new: already existing records are skipped, and new records are inserted into the destination table
  • Update: all existing records are updated from the source file
  • Update or insert: already existing records are updated and new records are inserted into the destination table
  • Delete: already existing records are deleted
  • Delete or insert: existing records are deleted and new records are inserted into the destination table

 

Here is an example of some import modes offered by Data Import utility:

 

 

 

DB Table

Source file

Step 6 - tab1

Step 6 - tab2

 

All import modes (except for the Insert All mode) are based on primary key values information. In order to perform import operations with these modes used you need to have matches between the source file primary key column(s) and the destination table primary key column(s).

 

Insert mode

Insert all

Insert new

Update

Result

Step 6 - tab3

Step 6 - tab4

Step 6 - tab5

 

Insert mode

Update or insert

Delete

Delete or insert

Result

Step 6 - tab6

Step 6 - tab7

Step 6 - tab8

 

 

It is applied to all other import modes, except for the Insert all mode. For all these modes (except for the Insert all mode) it is obligatory to select the primary key fields. This field (or fields) is used as key field to identify specific data in the target database.

 

The key columns for these operations are defined at the Selecting key columns step of the wizard.

 

Step 6

 

 

If the Update value is selected for Import Mode, then you need to specify the Primary Key field(s) that will serve for data identification of your source file with the data of the target table. The source file must contain the column(s) that will correspond to the Primary Key field of the target table. If the target table contains a record in which the value of the primary key field coincides with the value of the corresponding column of the source table, the data stored in this table record will be updated. You can specify the field(s) which will be used for identification at Step 7 of the wizard. This field(s) will only serve for identification and will not be imported.

 

 

Native / Universal mode

The Native mode of uses the Single Commands method that serves to generate and execute single SQL commands on the server. With the help of the Native mode your data can be imported dozen (!) times faster as compared to the Universal mode which is used for backward compatibility. In the CSV Insert mode data are inserted as a set of comma-separated values.

 

The Duplicate solution group defines handling of imported rows that duplicate existing rows by Unique key values:

RadioButton Replace

Imported rows replace existing rows. In other words, the rows that have the same value for a Primary key or Unique index as existing rows are replaced.

RadioButton Ignore

Imported rows that duplicate existing rows by a Unique key value are skipped.

 

Temporary File Charset

Use the drop-down list to specify the character set to be used to interpret data in the file.

 

Temporary File Name

Type in or use the btnSaveAs button to specify the name and path to the temporary file which stores data to be inserted in the CSV Insert mode.

 

CheckBox Delete Temporary File After Import

Specify whether the temporary file should be deleted or not after the import operation is completed.

 

If you have chosen Universal mode and the import mode is set to Insert new, Update or insert, Delete or insert then the CheckBox Allow duplicates option can be set. If it is chosen then on inserting a record in a table it will be inserted even if it coincides with an existing one but the key fields differ.

 

CheckBox Truncate Long Strings

If this option is enabled the long strings are truncated. This option is available only in the Universal mode.

 

CheckBox Skip this step

Check this option to skip the current step in the future. To edit the list of skipped steps, use the Skipped Steps group available in the General section of the Preferences dialog.

 

 

When you are done, press the Next button to proceed to the next step.