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 from001
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:
Create JSON file with configuration (see: configuration file)
Open terminal (Mac OS or UNIX Systems) or Power shell (Windows)
Go to the folder where the CLI tool executable artifact is located
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
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"
}