handle related records in the ingest stream

Description

For MARC binary files, holdings may reside in a separate MARC record, linked to the bibliographic record via an identifier field (usually 004). When such records are discovered, they should be merged with the parent bibliographic record.

Blocks: https://jira.indexdata.com/browse/RIS-246

Implementation notes:

1. Extend the reservoir File upload to handle streams that contain MFHD records, by adding a new form field:

  • relatedId

but combining them into the following payload structure for ingest into reservoir:

2. Extend the JS transformer to consider "marcHoldings" array and merge it's contents into the output MARC record.

Environment

None

Potential Workaround

None

Attachments

1

is blocked by

Checklist

hide

TestRail: Results

Activity

Show:

Charles LedvinaOctober 25, 2022 at 12:39 PM

There is also a Python script that Kurt created that does kind of the same thing: https://github.com/openlibraryenvironment/reshare-library-configurations/blob/master/util/proc/merge_wms.py. It also moves holdings notes and statements to the main bib record. I wrote the perl script to create smaller bibs (not adding fields that we won't use) and to be faster.

Charles LedvinaOctober 25, 2022 at 12:33 PM

The above script also adds a link (the id of the MFHD record) to subfield 8 in the 852 and 876 fields. If there are multiple holdings records for a bib, then there is a link to the related holdings fields.

Charles LedvinaOctober 25, 2022 at 12:28 PM

Currently we move the 852 and 876 fields from the MFHD record to the main bib. I don't think there wouldn't be any reason to change this behavior. This is what the current Perl script does: https://github.com/openlibraryenvironment/reshare-library-configurations/blob/master/util/proc/merge_mfhd.pl

Jakub SkoczenOctober 25, 2022 at 10:55 AM

Do you have any preference in how we deal with the MFHD files? E.g do what has been proposed in the description and store them individually in the "marc" and "marcHoldings" keys in the payload or combine them in one MARC file during ingest?

Charles LedvinaSeptember 8, 2022 at 6:53 PM

OK.  I attached a small collection (7 titles, 7 holdings) called mfhd.mrc 

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Reservoir Dogs

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created August 30, 2022 at 8:48 AM
Updated November 16, 2022 at 8:22 PM
Resolved November 16, 2022 at 8:22 PM
TestRail: Cases
TestRail: Runs