[OPEN-ILS-DEV] [OPEN-ILS-GENERAL] bibkey field issues when importing holdings into staging_items table
Jason Etheridge
jason at esilibrary.com
Fri Feb 13 09:46:43 EST 2009
> 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.
I'd be tempted to make one. Use Perl and MARC::Record and run through
each record and add a custom tag, say 901, and put an incrementing
number in subfield a. Make sure you start the sequence above the
max(id) of the biblio.record_entry (BRE) table in your database. When
you load the bibs, modify the loading process to use that value as the
BRE id. After loading the bibs, reset the sequence in the database to
make sure its "nextval" will start above the new max(id) of BRE.
Then when you parse out the holdings, you know the exact BRE id used
and can link them up.
> 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".
If I'm understanding correctly (just looking at the holdings import
demo bundle), the bibkey is supposed to point to the BRE id for the
bib record. If you're just using a sequence there, then you may not
be linking them to bib records at all, much less the right ones.
Am I misunderstanding?
--
Jason Etheridge
| VP, Community Support and Advocacy
| Equinox Software, Inc. / The Evergreen Experts
| phone: 1-877-OPEN-ILS (673-6457)
| email: jason at esilibrary.com
| web: http://www.esilibrary.com
More information about the Open-ils-dev
mailing list