merge sdf with csv

User f52820d97e

05-02-2008 09:44:20

I am a bit confused about the merge and map commands. And I have unexpected results when I try to combine a sdf file with a csv file containing biological data

Here is the procedure I use and the pbs I have

1. create a new table with structures and a reference column

2. import a csv file containing the reference number along with biological results (result1, result2, result3...)

a) I merge the reference column

b) all the resultX are imported

Everything seems to work fine, except that if result2 is empty in the csv for a record, result2 is filled with result3!!

Am I doing something wrong?

I should maybe choose the map command (what is exactly the difference between map and merge?) with already pre-defined columns for resultX, the pb is I have 73 results...

Thanks for your input and suggestions


ChemAxon fa971619eb

05-02-2008 12:22:04

Mapping refers to specifying that data from a field in the imported file should be "mapped" to an exisiting field in the entity into which you are importing.

Merging refers to specifying that a field in the imported file and a field in the entity into which you are importing have common IDs so that that row in the database is updated with the data from the file. When merging is specified no new rows will be created, just existing ones updated.

When merging for each field in the file you can specify one off the following:

- use as a merge field

- map to an existing field

- import as new field

- do not import

In your case I think you need to specify that ResultX is to be handled as a new field and that Reference is used for the Mapping.

If this is all specified correctly and you still see the problem then it is possible that there is s a bug caused by empty values. We know of one such issue with TAB separated format data this is now fixed and will be in the next update. If you think this is the case then please let us know and we will try to fix it.

User f52820d97e

05-02-2008 13:03:25

I did use a TAB separated text file, would it work better with a comma-separated text?

ChemAxon fa971619eb

05-02-2008 13:17:18

Yes, CSV format does not have the bug.

Also, if you turn off the 'Strip quotes' option for TAB separated format you should not see the problem, but that assumes your data is not contain quoted values.


User f52820d97e

05-02-2008 15:23:29

Yep, it works!

Thanks a lot...