Table of Contents

Using File Import

The File Import wizard is a simple and fast way for you to import data into IJC. You can import a structure file into an already opened project.


To use the File Import wizard:

You can open the File Import wizard using any of the following methods:

Step 1. Project and Connection Selection:

This step will only appear when you have started the import without a context being defined (e.g. from the Welcome Screen). You may not have yet opened any database connections so this screen will help you through the process of selecting and/or connecting to your database. When the connection or database table is specified by the way in which you open the import wizard, this step is automatically skipped.

Step 2. File and Table Details:

Specify the details of the file and the database table by working from the top to the bottom of this screen.

  1. Specify the file by clicking the button to the right of the File to Import field.
  2. Specify the options for how the file will be processed by selecting an item from the drop-down list in the File Type field.
  3. Specify the type of database table and options for it by selecting from the available table types and clicking on the ellipsis ('...') button in the Table Details field. Note: If importing into an existing database table these options are disabled.
  4. Click Next. The database table you specified will be created (if using a new table).

The wizard automatically reads the records from the file and show you the data fields that have been found. There may be a slight delay as this happens, depending on the speed of your computer and the amount of data contained in the file. The fields will be re-read if you change the file, the processing options or the table type.

As the file is read, the details for the new table will be updated accordingly For example, if empty structures are found, the setting for the JChem table will be updated to allow empty structures, and if the file is found to contain only reactions then the table type will be changed to be specific for reactions.

The 'Records Read' text field indicates the number of records that have been read so far, and the data fields found in those records are displayed. By default the file is read until no new records are found once 100 new records have been read. This process continues until no new fields are found. Whilst this usually gives a good indication of the contents of the file, it is possible that some new fields will be found later in the file, or that a reaction will be found as the last record of a file that otherwise contains only normal molecules. Use the 'Read more' button to read extra records if you think that this may be the case; you may need to read many, sometimes all, of the records. Set the Read More value to zero to read the whole file.


Step 2

Step 3. Field Details:

In this step you specify how the fields found in the file should be handled. This step is very powerful as it lets you specify the type of new fields being created, the mapping between fields in the file and those in the database, and whether some fields should be used as 'merge fields' (see Merging Data for details on how to do this).

However, although it is powerful, in the usual case of importing a file into a new database table, you typically only need to click Next to start the import.


Step 3

This screen is divided into 3 regions:

  1. A list of fields from the file that is displayed in the top left.
  2. A list of fields from the database table that is displayed in the top right.
  3. Options for the selected database field that is displayed at the bottom.

The key component is the one with the fields in the database table which is displayed in the top right corner. This lists the fields that are already present in the table (either were in the table before we started the import or were default fields created when the table was created). Below these are the new fields that will be added to the database as part of the import (indicated by the + symbol next to the field and the new field icon).

By default, all fields found in the file are specified as needing to be added to the table as new fields. If some of these are not needed, select them from the list on the right and click the 'Remove' button. The field will then become enabled in the list on the left side, signifying that it can be added to the list of database fields to create by clicking the 'Add' button.

The order of the added fields can be adjusted using the 'Move down' and 'Move up' buttons.

If instead of wanting to add the field as a new field you may want to use an existing field in the table (this only applies to existing tables that have had extra fields added). You can specify this by selecting the file field and the database field and using the 'Map' button. Similarly you can use the 'Merge' button to specify that you want to merge the data using this field. Merging is described in more detail in Merging Data. Mapped and merged fields are indicated by the single and double-headed arrow symbols.

When a field is selected from the database list, its options are displayed in the lower panel. For new fields, you can specify the options for the new field. For existing fields there may be the option to specify a default value to use if the field is not mapped or does not have a value in the file when mapped.

Step 4. Monitor import:

The import starts. The whole file is read and the fields specified in the previous step will be imported, along with the structures. If a new database table was created then a new Data Tree and Grid View will be created. You can specify that this should be displayed once the import finishes by clicking the Display Data When Finished checkbox.

The import can be terminated at its current position at any stage by clicking the Cancel button.



Copyright © 1998-2008 ChemAxon Ltd. All rights reserved.