Script to update tenant mapping rules to include new LDR rule

Script to update tenant mapping rules to include new LDR rule

MODDATAIMP-1179: Create script to update mapping rules for marc bibs with new LDR ruleClosed

Overview

The CLI tool is designed to add new LDR rule for the following fields:

  • modeOfIssuanceId (being moved from 001 rule)

  • deleted

  • staffSuppress

  • discoverySuppress

The script does not overwrite existing mapping rules; it only extends them

Script execution

CLI tool executable artifact for Sunflower:

CLI tool/script requirements:

  • Java 21

To run the CLI tool, you need the following:

  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 CLI tool executable artifact is located

  4. Run the CLI tool/script with the configuration file path parameter (just file name if the script is located in the same folder

java -jar folio-update-bib-mapping-rules.jar configuration.json
image-20250312-105407.png

Configuration file

  • okapiUrl - your library okapi url. (Can be seen in the app settings → software versions → okapi services → okapi)

  • tenant - target tenant

  • username - admin user name

  • password - admin user password

Configuration file example

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

For consortia tenants, add centralTenant field in configuration.json:

{ "okapiUrl": "https://folio-snapshot-okapi.dev.folio.org", "tenant": "diku", "centralTenant":"consortia_admin" "username": "consortia_admin", "password": "consortia_secret" }

 

Related content