chrissharp123

Untitled

Oct 17th, 2025
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1.  
  2. Utility to stage and overlay bib records in an Evergreen database. This
  3. expects that the incoming records will have been previously exported
  4. from that Evergreen database and modified in some fashion (e.g., for
  5. authority record processing) and that the bib ID can be found in the
  6. 901$c subfield.
  7.  
  8. This program has several modes controlled by the --action switch:
  9.  
  10. --action stage_bibs - load MARC bib records into a staging table
  11. --action filter_bibs - mark previously staged bibs that should
  12. be excluded from a subsequent load, either
  13. because the target bib is deleted in Evergreen
  14. or the record was modified after a date
  15. specified by the --cutoff switch
  16. --action load_bibs - overlay bib records using a previously staged
  17. batch, one at a time. After each bib, it will
  18. wait the number of seconds specified by the
  19. --wait switch.
  20.  
  21. --action stage_auths - load MARC authorities into staging
  22. table
  23. --action match_auths - identify matches with authority
  24. records already present in the
  25. Evergreen database; matching is
  26. based on LCCN, cancelled LCCN, and
  27. main heading.
  28. --action load_new_auths - load new (unmatched) authorities
  29. --action overlay_auths_stage1 - overlay based on LCCN where
  30. heading has NOT changed; this step
  31. disables propagation to bib records
  32. --action overlay_auths_stage2 - overlay based on LCCN where heading
  33. HAS changed; propagates changes
  34. to bib records
  35. --action overlay_auths_stage3 - overlay for records where a cancelled
  36. LCCN is replaced with a new one
  37. --action link_auth_auth - run authority_authority_linker.pl for
  38. the authorities that were overlaid
  39. or added in this batch.
  40. --action link_auth_bib - run authority_control_fields.pl for
  41. the bibs that were overlaid in this
  42. batch. Add --link-skipped to specify
  43. that bibs that were matched but
  44. skipped due to having be edited after
  45. the cutoff should be linked (rather
  46. than linking the imported bibs)
  47. --action export_skipped_bibs - export to ISO2709 file whose name is
  48. specified by --output those bibs
  49. that had been edited after the cutoff.
  50. --action export_skipped_auths - export to ISO2709 file whose name is
  51. specified by --output those authorities
  52. that could not be definitively
  53. handled as updates or adds.
  54. --action report - output a summary of the processing of the
  55. batch.
  56.  
  57. Several switches are used regardless of the specified action:
  58.  
  59. --schema - Pg schema in which staging table will live; should be
  60. created beforehand
  61. --batch - name of bib batch; will also be used as the name
  62. of the staging tables
  63. --db - database name
  64. --dbuser - database user
  65. --dbpw - database password
  66. --dbhost - database host
  67. --osrf-config - path to OpenSRF core configuration file. Defaults
  68. to /openils/conf/opensrf.xml
  69. --eg-bindir - directory containing Evergreen's scripts. Defaults
  70. to /openils/bin
  71.  
  72. Examples:
  73.  
  74. ./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
  75. --dbuser evergreen --dbpw evergreen --dbhost localhost \
  76. --action stage_bibs -- file1.mrc file2.mrc [...]
  77.  
  78. ./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
  79. --dbuser evergreen --dbpw evergreen --dbhost localhost \
  80. --action filter_bibs --cutoff 2016-01-02
  81.  
  82. ./eg_staged_bib_overlay --schema bib_load --batch bibs_2016_01 --db evergreen \
  83. --dbuser evergreen --dbpw evergreen --dbhost localhost \
  84. --action load_bibs --wait 2
  85.  
Advertisement
Add Comment
Please, Sign In to add comment