Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Scope: The Donor Names batch-job is a monthly task run on the 15th first week of each month, and it checks for purchases made from certain funds that have been donated by library benefactors.  The fund codes and donor names are mapped to 902 fields, which are added to the bibliographic records of the appropriate purchases.  Steps 1, 2 and 2 3 below, outline both the gathering of that fund/purchase data, and the bulk-loading of the data into the corresponding bibliographic records, respectively. 

Contact:   Pedro Arroyo  Peter DelaCuadra

Unit: Post Cataloging Services Automation & Metadata Management

New Procedure:  10/16/2020   04|01|2024 

Date of next review: October 2020 04|01|2025

This was a batch job run by LSTools for Voyager before the migration of Folio. This task had to be reformulated to accommodate the changes Folio had presented us with.

Step 1:

  • In a Web browserDBeaver, navigate to the LS-Tools page (lstools.library.cornell.edu).implement the SQL script donornames.sql
    • Note: MAY Require 2-step log- in
    • Under the heading “Voyager update utilities”, click on “Execute a Privileged Production Procedure
    • In the resulting list of procedures, click on Add donor names to 902 $athe sql script, under the first SELECT section, there will be two date strings: one for "payment_date_start_date" and the other for "payment_date_end_date"
    • Add beginning and ending dates, SETTING THE END-DATE 6 WEEKS PRIOR to current date, using the format “yyyymmdd”   “yyyy-mm-dd”   (see below examples), and click Submit Jobthen run sql script.
      • Examples:
        • If running the report on first week of 8/15/20202023: Enter 20200601 and 20200630  as the beginning and end dates (previous June) 2023-07-01 for start date, and 2023-07-31 for end date.
        • If running the report on 11/15/2020: Enter 20200901 and 20200930 as the beginning and end dates (previous September).
        • The LS Tools screen should confirm that the job has been run, and an E-mail will be generated which summarizes how many bibliographic records will be modified in the bulk-load (step 2).  The subject line is “Add Donor Names to 902 Summary RC=0”, and the number of bibs to be modified will be shown in the section titled “SUMMARY FOR PROJECT MANAGEMENT” (Example: Packaged for bulkimport using BIBUPD: 168 records ).

Step 2:

  • After receiving the e-mail confirming the Donor Names job (see above), Return to the LS Tools page in your browser.
  • Under the heading “General update”, click on Enact Bulk Import.
  • Select the appropriate file from the pop-down menu (referring to 902s to be added).
  • Click on Confirm this load.
  • In the next screen, click on Issue bulk import.
  • After the job has run, close LS-Tools.
  • An e-mail will arrive subject line ProdProc (PR326) Import SUMMARY RC=0, and it will show how many bibliographic records were modified with 902 fields, how many experienced errors, etc.
        • first week of 01/2024: Enter 2024-01-01 for start date, and 2024-01-31 for the end date.
  • Once you have your correct dates entered in the sql script, proceed to execute the sql script ... it may take awhile to run.
  • After sql script has completed its query, you will need to export data to some local location as a .csv spreadsheet.
  • Now that you have your .csv spreadsheet, dedupe any titles, and remove/delete any rows with inconsistent data.
  • Save your updated and edited .csv spreadsheet. Then copy the column of UUIDs, (without the header), and paste that data into a new .csv spreadsheet, giving it name to your liking.

Step 2:

  • Login to Folio, using the Export App, navigate to where you saved the .csv file with only the UUIDs, and select that file for exportation.
  • Once the exportation process is complete, you should see your file in the log, under the File name column, with a .mrc extension
  • Single click on your file name, and a copy of that MARC file will be downloaded into your Downloads folder.
  • Navigate to your Downloads folder and copy your new MARC file to ~"C:\Users\<your netid>\lts-automation\data\names\"
  • You will also need to copy your edited .csv file, (NOT the one with the UUIDs), to ~"C:\Users\<your netid>\lts-automation\data\names\"

Step 3:

  • Navigate to ~"C:\Users\<your netid>\lts-automation\scripts\donornames.py" – NOTE: You will have to have python installed on your machine for the script to run.
  • Now execute the python script donornames.py, (whether you use the Windows CLI, or VSCode, or some other means, is up to you).
  • You will be prompted for the appropriate CSV metadata file, then the corresponding MARC file, and then you will be asked to enter what you wish to name your output file.
  • Then the script will run. If you run into an error, please seek assistance from one of the Automation & Metadata Management members.
  • If no errors, the output file you named will be in ~"C:\Users\<your netid>\lts-automation\data\names\"
  • Lastly, import your output file into Folio using the Profile name: "Replace instance and bib"


*Also, see Also, Specification Document here: Cleanup: Add Donor Names

...