[OPEN-ILS-GENERAL] bibkey field issues when importing holdings into staging_items table

Mike Rylander mrylander at gmail.com
Fri Feb 13 09:04:13 EST 2009


On Fri, Feb 13, 2009 at 8:42 AM, Robert Soulliere
<robert.soulliere at mohawkcollege.ca> wrote:
> I ran into some snags when importing holdings into the staging_items
> table in regards to the "bibkey" field. I sort of devised a work around
> but am unsure if this is workable in the long run.
>
> Here was the snag: I could not find a viable option for our biibkey
> field in staging_items. I tried using marc fields 035, 001, 010 among
> others but none of these seemed to work. Either some records did not
> include some of these or the data was left non-unique after stripping
> out the non-numeric characters. The "Bibkey" field requires an integer
> data type.
>
> Here was my possibly not-so-great workaround: I changed the "bibkey"
> data type in the staging_items table to serial (auto-increment) and
> edited parse_holdings.pl so that it did not place data in "bibkey".
> Using this method, I was able to import the holdings and everything
> seems to work (at this time). I was just wondering if this method would
> cause disastrous results down the road when we add more records? If this
> was a bad move, what would be some good alternatives? Should I combine
> marc fields for the bibkey field or is there another option out there?

No, this is perfectly fine.  In fact, when all attempts by the system
fail to find a unique TCN value (aka bibkey, IIUC, in the staging
example) that's exactly what Evergreen will do -- there's a function
that pulls a value from a sequence, and then adds a prefix so that
it's obvious that the TCN was autogenerated.

>
> Also, I used records in the USMARC format. Is it strongly recommended to
> convert files to MARCXML for this process or are both formats reasonably
> good. Could someone recommend a good MARCXML converter or is there a
> script in Evergreen I could use for this?
>

Modern versions of yaz-marcdump from the yaz toolkit from IndexData
work very well.

> By the way. I love Evergreen 1.4.0.2. Thanks to everyone working on this
> project.
>

Thanks!

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-general mailing list