[OPEN-ILS-GENERAL] Import issues

Dan Scott denials at gmail.com
Tue Aug 11 00:30:01 EDT 2009


2009/8/8 Dibyendra Hyoju <dibyendra at gmail.com>:
> Hello all,
> I imported the sample records again on the another machine having Evergreen
> 1.4, and after importing that record, I couldn't import any records from
> other MARC files. I have attached the record '8500.mrc' and '8400.mrc'
> herewith. I first executed the SQL generated from 8500.mrc' successfully.
> Then, I couldn't execute the SQL generated from '8400.mrc'. The error is
> same as before like 'ERROR:  duplicate key violates unique constraint
> "biblio_record_unique_tcn"'. I only used the option "--encoding UTF8" this
> time. I tried few other records, but I got the same error. Few of the tested
> records are attached herewith if somebody wants to volunteer the test. If
> anyone has faced this problem before and have found the solution, please
> help. Any help will be highly appreciated.

Sorry for the delayed reply, I'm on leave at the moment and not
connected very often.

marc2bre.pl doesn't really deal with automatically generated TCNs all
that well, so you're best off explicitly identifying a source for the
TCN. To avoid getting duplicate TCN values and record ID values if all
of your records follow the same pattern with the 852 $x field /
subfield accession number identifier, you should also use the
--tcn_field / --tcn_subfield options for marc2bre.pl:

perl marc2bre.pl --db_user postgres --db_host localhost --db_pw
evergreen --db_name evergreen --encoding UTF8 --idfield 852
--idsubfield x --tcn_field 852 --tcn_subfield x 8400.mrc > 8400.bre

I tried importing both your 8000.mrc and 8400.mrc files with the and
these options worked fine for me with no duplicate value warnings.
This is with Evergreen rel_1_6_0 on Ubuntu 8.04, but marc2bre.pl (the
most critical script for parsing out TCN and record number) shows no
significant differences between 1.4 and rel_1_6_0.

-- 
Dan Scott
Laurentian University


More information about the Open-ils-general mailing list