[OPEN-ILS-GENERAL] Evergreen MARC record / holdings batch loader

Dan Wells dbw2 at calvin.edu
Thu Oct 23 18:29:38 EDT 2008


Hello David,

I've only given the code a once-over at this point, but I expect to try it out soon, so thanks so much for taking this on!  It looks very promising.  I am also quite curious how "Vandelay" is going to affect our need for the various load scripts, but that is for another day (Oct. 30, to be exact).

I did notice a few small things related to a recent update to marc2bre.pl.  I am going to guess, in the marc2bre.pl section of eg_batch_loader.pl, that you meant this line:

    if (defined $config->{source_record}->{record_id}->{subfield}) {

to say this:

    if (defined $config->{source_record}->{tcn}->{subfield}) {

since record_id currently doesn't exist in your config file.  It would be nice if it did, though, to support both internal ids and tcns, something like:
...
    push @args, "--tcnfield"; push @args, "'" . $config->{source_record}->{tcn}->{tag} . "'";
    if (defined $config->{source_record}->{tcn}->{subfield}) {
	push @args, " --tcnsubfield"; push @args, "'" . $config->{source_record}->{tcn}->{subfield} . "'";
    }
    if (defined $config->{source_record}->{record_id}->{tag}) {
	push @args, " --idfield"; push @args, "'" . $config->{source_record}->{record_id}->{tag} . "'";
                if (defined $config->{source_record}->{record_id}->{subfield}) {
                          push @args, " --idsubfield"; push @args, "'" . $config->{source_record}->{record_id}->{subfield} . "'";
                }
    }
...

with the config file changed to:
...
  <source_record>
    <tcn>
      <!-- Which field has the title control number?
	   Commonly used are 001 (leave 'subfield' blank)
	   or 035 subfield 'a'
	   Note that the Evergreen loader will create record IDs, which are
	   a different beast (see below).
	-->
      <tag>001</tag>
      <subfield></subfield>
    </tcn>
    <record_id>
      <!-- Optionally specify this field if you want your
              Evergreen internal record IDs to match your old
              system ids (for easier linking to other data)
	-->
      <tag>035</tag>
      <subfield>a</subfield>
    </record_id>
...

I may have made a typo or two, but you get the idea.  I was also uncomfortable with calling TCNs "system-unique ids", since they should by design be inherent to the record itself, not unique to any particular system, but I have no real intention of arguing semantics if things work :)

Hope this helps, and thanks again,
DW



More information about the Open-ils-general mailing list