Marc Authorities update instructions

NOTE!!! This Authority update script may affect performance of other imports, so it needs to be used during non-working hours or during off-peak hours!!!


Overview

For any library storing MARC Authority records in Source Record Storage (SRS), FOLIO contains a default MARC-to-Authority map. FOLIO uses that map when creating or updating Inventory Authority with Source = MARC.
The map identifies the Authority fields that are controlled by the underlying MARC Authority record, and which fields and subfields of MARC data populate into which Authority fields.
Occasionally libraries may adjust their default map, either because of
1) updated default mappings delivered in a new FOLIO release
or
2) local fields or mapping decisions that differ from the default map.

When a library's default map is updated, those updated mappings will affect any Authorities created or updated after the map change.
However, some libraries would like to update all of their existing Authorities to reflect the updated mappings. This script allows for that to happen. 


Script execution

Script executable: folio-update-authorities.jar

java -jar folio-update-authorities.jar configuration.json


In order to run the script, you need:

  1. Create json file with configuration (see: configuration file)
  2. Open terminal (Mac OS or UNIX Systems) or Power shell (Windows) 
  3. Go to the folder where the script is located.
  4. Run Script with configuration file path parameter (just file name if the script located in the same folder)
     • example of execuded script - java -jar folio-update-authorities.jar configuration.json

Configuration File

  • okapiUrl          - your library okapi url. (Can be seen in the app settings → software versions → okapi services → okapi)
  • tenant             - admin tenant
  • username        - admin user name
  • password        - admin user name password
  • importLimit     - number of authorities to update for one data-import job
  • inventoryLimit - (default: importLimit) number of authorities ids to retrieve from mod-inventory-storage by one request
  • offset               - (default: 0) the position in the dataset to start from. Script starts with the offset value from file

Example:

Json
{
  "okapiUrl": "https://folio-snapshot-okapi.dev.folio.org",
  "tenant": "diku",
  "username": "diku_admin",
  "password": "admin",     
  "importLimit" : 5000
}


Questions & Answers

What import limit should be used?
From this documentation recommended maximum is 50,000 records Recommended Maximum File Sizes and Configuration
But It is more stable and safe to use 5,000 records per one import job, so as not to load environment resources. 


What happens when an entire import job fails?
If script execution was failed, script can be restarted from saved offset value.
If data-import job was failed you should contact to Spitfire team to investigate the failure.


What happens if some records were updated before this was one?
Records will be updated again by relevant mapping rules. 
After FOLIO-3681 (point 3), script will check created/updated date and will not include new records

Does this only work for authority records?
Yes, but it can be extended to support bibliographic records in future.

FOLIO-3681 - Getting issue details... STATUS


Public Git repository: Folio Update Authorities