new utility to overlay bib records in an Evergreen database
Utility to stage and overlay bib records in an Evergreen database. This
expects that the incoming records will have been previously exported
from that Evergreen database and modified in some fashion (e.g., for
authority record processing) and that the bib ID can be found in the
901$c subfield.
This program has several modes controlled by the --action switch:
--action stage_bibs - load MARC bib records into a staging table
--action filter_bibs - mark previously staged bibs that should
be excluded from a subsequent load, either
because the target bib is deleted in Evergreen
or the record was modified after a date
specified by the --cutoff switch
--action load_bibs - overlay bib records using a previously staged
batch, one at a time. After each bib, it will
wait the number of seconds specified by the
--wait switch.
Several switches are used regardless of the specified action:
--schema - Pg schema in which staging table will live; should be
created beforehand
--batch - name of bib batch; will also be used as the name
of the staging table
--db - database name
--dbuser - database user
--dbpw - database password
--dbhost - database host
Examples:
./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
--dbuser evergreen --dbpw evergreen --dbhost localhost \
--action stage_bibs -- file1.mrc file2.mrc [...]
./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
--dbuser evergreen --dbpw evergreen --dbhost localhost \
--action filter_bibs --cutoff 2016-01-02
./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
--dbuser evergreen --dbpw evergreen --dbhost localhost \
--action load_bibs
Signed-off-by: Galen Charlton <gmc@esilibrary.com>