Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- --action stage_auths - load MARC authorities into staging
- table
- --action match_auths - identify matches with authority
- records already present in the
- Evergreen database; matching is
- based on LCCN, cancelled LCCN, and
- main heading.
- --action load_new_auths - load new (unmatched) authorities
- --action overlay_auths_stage1 - overlay based on LCCN where
- heading has NOT changed; this step
- disables propagation to bib records
- --action overlay_auths_stage2 - overlay based on LCCN where heading
- HAS changed; propagates changes
- to bib records
- --action overlay_auths_stage3 - overlay for records where a cancelled
- LCCN is replaced with a new one
- --action link_auth_auth - run authority_authority_linker.pl for
- the authorities that were overlaid
- or added in this batch.
- --action link_auth_bib - run authority_control_fields.pl for
- the bibs that were overlaid in this
- batch. Add --link-skipped to specify
- that bibs that were matched but
- skipped due to having be edited after
- the cutoff should be linked (rather
- than linking the imported bibs)
- --action export_skipped_bibs - export to ISO2709 file whose name is
- specified by --output those bibs
- that had been edited after the cutoff.
- --action export_skipped_auths - export to ISO2709 file whose name is
- specified by --output those authorities
- that could not be definitively
- handled as updates or adds.
- --action report - output a summary of the processing of the
- batch.
- 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 tables
- --db - database name
- --dbuser - database user
- --dbpw - database password
- --dbhost - database host
- --osrf-config - path to OpenSRF core configuration file. Defaults
- to /openils/conf/opensrf.xml
- --eg-bindir - directory containing Evergreen's scripts. Defaults
- to /openils/bin
- 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 --wait 2
Advertisement
Add Comment
Please, Sign In to add comment