[OPEN-ILS-GENERAL] bib and copy batches, WAS Is there a resource for initial setup

Dan Scott dan at coffeecode.net
Fri Sep 10 20:46:11 EDT 2010


On 10 September 2010 16:29, Metcalf, Steve <MetcalfS at evergreen.edu> wrote:
> I'm using the 1.6.0.6 client and Evergreen 1.6.0.7.  I've got a file of
> MARC records, with item-level data for each record in 945 tags.
>
> On the MARC file upload screen under Cataloging/MARC Batch
> Import/Export, I see the check box for Import Attached Holdings. This
> refers to copy or item level data, rather than serials holdings
> statements?
>
> If I check the box, the Holdings Import Profile dropdown is active, but
> empty.  Assuming the Holdings Import Profile does something like map
> incoming data elements to Evergreen copy record elements, how do I
> create one?
>

In Evergreen 2.0, there is an "Edit import item attributes" option in
the MARC Batch Import/Export menu on the far right. This comes
prepopulated with two holdings profiles: the "Evergreen 852 export
format" and the "Unicorn import format - 999".

"Okay, Dan", you say to yourself, "but how does that help me with this
1.6 system?"

Well, first I would tell you that the holding profiles are defined in
the vandelay.import_item_attr_definition table in the database. Then I
would point out that the 1.6 system that you're working with comes
with exactly the same table; it just hasn't been prepopulated with
those sample holding profiles. Then I would say "But - we can grab the
same INSERT statement from the Evergreen 2.0 seed data and use it in
your 1.6 system!"

Looking at Open-ILS/src/sql/Pg/950.data-seed-values.sql, that turns out to be:

INSERT INTO vandelay.import_item_attr_definition (
    owner, name, tag, owning_lib, circ_lib, location,
    call_number, circ_modifier, barcode, price, copy_number,
    circulate, ref, holdable, opac_visible, status
) VALUES (
    1,
    'Evergreen 852 export format',
    '852',
    '[@code = "b"][1]',
    '[@code = "b"][2]',
    'c',
    'j',
    'g',
    'p',
    'y',
    't',
    '[@code = "x" and text() = "circulating"]',
    '[@code = "x" and text() = "reference"]',
    '[@code = "x" and text() = "holdable"]',
    '[@code = "x" and text() = "visible"]',
    'z'
);

INSERT INTO vandelay.import_item_attr_definition (
    owner,
    name,
    tag,
    owning_lib,
    location,
    call_number,
    circ_modifier,
    barcode,
    price,
    status
) VALUES (
    1,
    'Unicorn Import format -- 999',
    '999',
    'm',
    'l',
    'a',
    't',
    'i',
    'p',
    'k'
);

If you're connected to your Evergreen database via psql or pgadmin,
you can go ahead and run that INSERT statement to populate those
holdings profiles. You'll probably need to clear your staff client
cache or log out of your staff client and back in to see the holdings
profiles pop up in the drop-down widget.

Now, it's likely that the sample profiles won't match your needs.
Luckily, we can look at this and figure some things out quickly. The
holdings import profile needs:
  *  an owner (the ID of the owning library, found in actor.org_unit;
1 is fine for our purposes);
  * a name (let's say "Steve's 852 format")
  * a tag (which MARC tag holds the item information, let's say '852')
  * one or more other attributes, each of which can either be a simple
single character representing the subfield (e.g. barcode = 'p' means
that the barcode will be pulled from 852 $p) or a more complex XPath
expression (for example, owning_lib = '[@code = "b"][1]' means that
the first subfield b will be used for the owning library shortname).

So while you're running Evergreen 1.6, you'll have to manipulate these
right at the database level. Hopefully these examples and this little
bit of explanation make that feasible. But when you make the jump to
Evergreen 2.0, you'll have a nice editor built right into the staff
client to make your life easier.

Note that I haven't actually imported holdings via the MARC batch
importer in 1.6 myself; I ran our migration from the command line, and
any bulk additions to our library system since then have all been sets
of electronic records which don't need dummy call numbers / copies in
Evergreen - if you don't know about the 856 $9 subfield, just put the
shortname of your library into the $9 subfield and Evergreen will make
your electronic resources visible in any scope that includes that
library.


More information about the Open-ils-general mailing list