The import data enables data to be imported into a specified table from a text or an xml document.
Shown below is an example of the import data dialog :
The user can either use File->Import File menu item, or click on the "..." button in the table on the left to open up the import file chooser dialog as shown below :
Once the user selects a valid xml or a text document, the software parses the first three lines of the imported file to determine the sample data to be imported and displays them in a table below the file import table. Then the user can simply drag a column from the File Table onto the Database Table column to create a import mapping from the file to column. This can allow users to customize how the data fits from the external file into an table in the database. To delete a mapping the user can simply click on the mapping to select it; then press the "Del" key on the keyboard.
A sample mapping is shown in the dialog below :
Once you click on the Import button, the import process will start, taking into account the mappings provided by the user and store the imported data into the given table. A information dialog will be displayed at the end of the process indicating the number of rows successfully imported into the target table.
The Import Dialog offers two convenient options to facilitate the import process. They are available via the File->Options menu.
The Import Dialog also allows users to import a schema file exported via the Export Dialog. You can click on File->Import Schema to import a schema into your database. It will bring up a dialog prompting the location of the schema file as follows :
Once you click on the Import button, the import process will start importing the schema into the current table. Optionally, the user can also click on the "Generate DDL" button which will generate a DDL (Data Definition Language) converting the schema into an SQL which will be used to create the database elements (Tables/Indexes/Foreign Keys etc). Please note that if the schema file contains not just the table schema, but also the table data - the "Generate DDL" button will ignore the table data.
When importing from a schema file, the system will honour the Import Mappings to create database tables. If no import mappings exist for the given database the default mapping will be used instead. Import Mappings are customizable - please look at the help on Import Mappings for more information on creating/updating database import mappings.