[OPEN-ILS-DEV] Bulk importing copies into Evergreen-newbie question

Don McMorris don.mcmorris at gmail.com
Tue Nov 20 19:20:54 EST 2007


I haven't attempted an import of items/volumes yet, so I don't have
the experience... However, I do notice that your items do not have $p
(price) subfields that are called for with the script.  I'm not sure
if this would cause a failure or not, but I think it may be worth a
try...

If you add <subfield code="p">0.00</subfield> (or similar) to your
examples and try it, let us know if it works.  If it does, we'll
likely develop a patch to the script to make this field optional (as
it should be IMHO).  If this doesn't do it, let us know and we'll try
to figure out something else ;).

Good luck!
--Don


On Nov 20, 2007 4:11 PM, Nella Lall <ndlall at ucalgary.ca> wrote:
> I am completely new to Evergreen and after successfully loading one
> lonely marc record into our evergreen database,
> I got stumped when I tried to load a marc record's two related copies.
>
> Here is what I have done based on the Evergreen admin documentation
> found at:
> http://open-ils.org/dokuwiki/doku.php?id=evergreen-admin:importing:bibrecords#adding_copies_to_bibliographic_records_in_evergreen
>
>
> I began the process of taking that ONE marc record (with the in tag 999)
> and converted it to MARC21XML with MarcEdit.  I transferred that
> converted file up to the evergreen server.  I called my file
> test1b.xml.  Here is a snippet from my
> MARC21XML file show the two 999 tags:
>
> <datafield tag="999" ind1=" " ind2=" ">
> <subfield code="a">WA590 .C365 1998</subfield>
> <subfield code="w">NLM</subfield>
> <subfield code="c">1</subfield>
> <subfield code="i">00009728368</subfield>
> <subfield code="d">11/14/2007</subfield>
> <subfield code="e">11/14/2007</subfield>
> <subfield code="k">CHECKEDOUT</subfield>
> <subfield code="l">RGH</subfield>
> <subfield code="m">BR1</subfield>
> <subfield code="n">1</subfield>
> <subfield code="r">M</subfield>
> <subfield code="s">Y</subfield>
> <subfield code="t">2WEEK</subfield>
> <subfield code="u">5/15/2007</subfield>
> <subfield code="x">UNKNOWN</subfield>
> <subfield code="z">RGH</subfield>
> </datafield>
>
> <datafield tag="999" ind1=" " ind2=" ">
> <subfield code="a">WA590 .C365 1998</subfield>
> <subfield code="w">NLM</subfield>
> <subfield code="c">2</subfield>
> <subfield code="i">00009714384</subfield>
> <subfield code="k">WHKC-REF</subfield>
> <subfield code="l">WHKC-REF</subfield>
> <subfield code="m">BR1</subfield>
> <subfield code="r">Y</subfield>
> <subfield code="s">Y</subfield>
> <subfield code="t">LIBONLY</subfield>
> <subfield code="u">8/14/2007</subfield>
> <subfield code="x">UNKNOWN</subfield>
> <subfield code="z">WHKC</subfield>
> </datafield>
>
> </record>
> </collection>
>
>
> I grabbed the import_holdings.pl file off of
> http://svn.open-ils.org/trac/ILS/browser/trunk/Evergreen/src/extras/import/import_holdings.pl
>
> and changed the settings in line 45 my
> ($db_driver,$db_host,$db_name,$db_user,$db_pw) =
> to what we have setup for our evergreen username, password etc etc.
>
> Then I ran:
>
> perl import_holdings.pl --marc_file test1b.xml
>
>
> There were no errors and it created the 2 expected files in my working
> directory:
> asset_volume.sql and asset_copy.sql
>
> But both are "blank inside" without the specific data from my input
> file's xml 999 subfields.
>
> eg. content of my asset_copy.sql is:
>
> SET CLIENT_ENCODING TO 'UNICODE';
> COPY asset.copy
> (id,circ_lib,editor,creator,barcode,call_number,copy_number,status,loan_duration,fine_level,circulate,deposit,deposi
>
> t_amount,price,ref,opac_visible) FROM STDIN;
> \.
> SELECT setval('asset.copy_id_seq'::TEXT, 1);
>
>
> I did continue onto the next step of doing:
> Import the volume and copy SQL files into your Evergreen database:
>
> psql evergreen
> # \i asset_volume.sql
> # \i asset_copy.sql
>
>
> Again with no error messages but neither copy has been attached to the
> bib.record in the evergreen database.
>
> So, can anyone out there see my error or give me clues on how to
> successfully import copies??  Thanks so much,
>
> Nella Lall
>
>


More information about the Open-ils-dev mailing list