[OPEN-ILS-GENERAL] Importing holdings data

John Morris jmorris at beau.org
Thu Jan 13 17:58:13 EST 2011


On Thu, 2011-01-13 at 15:39 -0500, Dan Wells wrote:
> Hello John,
> 
> I haven't kept up on the very newest tools, but we successfully migrated around a year ago using customized versions of (and/or ideas from) this:
> 
> http://svn.open-ils.org/trac/ILS-Contrib/wiki/ImportDemo 
> 
> and this:
> 
> http://www.open-ils.org/dokuwiki/doku.php?id=importing:holdings:import_via_staging_table
> 
> The basic process is:
> 
> 1) parse your records (using parse_holdings.pl or something similar) to generate SQL inserts
> 2) insert the parsed data into a temporary 'staging_items' table
> 3) run a query which uses the data in the staging table to populate asset.copy, asset.call_number, and probably config.circ_modifier (e.g. "item type" in certain legacy systems)
> 
> The trickiest part is probably getting the proper biblio.record_entry_id values for each item being imported.  We had the somewhat clever idea of hard-coding biblio.record_entry_id values to be identical to the internal ids of our old system (not to be confused with TCNs, in this case), and that made importing holdings and circ data much simpler.

Ok, that actually helps.  So asset.copy_transparency* can be ignored
during import?  I was hitting a brick wall trying to figure out what
those tables do.  And yes the problem of tying a holding back to a bib
record is why I am really trying hard to deal with both actions in one
pass.  It really should be possible to do it that way.

So how hard is it to manually populate the bib record?  It looks really
easy, one table most of it pretty simple.  Only problem is making the
MARC record into xml and I'm pretty sure I know how to do that with a
little trial and error.  Does this sound like a productive research
direction?

1.  Open up the evergreen db and the file full of marc records with
holdings.

2.  Read in a record.  Strip the holdings information and set them
aside.

3.  Make an XML copy of the record, populate in a bib holding and
extract the record id number back.

4.  Use the holdings fields and the id number to populate the holdings
tables.

5.  Rinse and repeat until EOF.

6.  Run the metarecord_map.sql script.

If it works I'd have a generic script that could take MARC records with
holdings in the Evergreen export format and directly ingest them into a
system in one easy step.  That would simplify future migrations to the
problem of rejiggering their holdings fields a bit.


-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20110113/94c09a8c/attachment.pgp 


More information about the Open-ils-general mailing list