ETL: Update ETL to insert records into "instance_metadata" table

Description

Overview

FOLIO’s linked-data DB has an additional table “instance_metadata”, that is not present in the corresponding Bibliograph DB. The ETL has to be enhanced to populate values in this new table.

instance_metadata table stores the following information

  1. ID of the instance in FOLIO’s inventory DB

  2. ID of the instance in FOLIO’s SRS DB

  3. Source of the record (MARC or LINKED_DATA)

Inventory ID and SRS ID will be present in fields 999$i and 999$s of the MARC fields received from FOLIO.

Purpose of this ticket is to enhance the “export to FOLIO” & “import into FOLIO” steps of ETL so that “instance_metadata” table will be populated with correct values.

Scope:

Enhance the “Export to FOLIO” step to do the following:

  1. Fetch “instanceId” and “srsId” values from the “@instanceId” and “@srsId” properties of resource’s JSON document. (Note, these two properties will be included int the JSON document by the changes made for )

  2. Create a binary dump for “instance_metadata” table by including the resourceId, inventoryId, srsId and Source (hardcoded as “MARC”) columns.

  3. Remove the @instanceId and @srsId properties from the document.

Enhance the “Import into FOLIO” step to do the following:

  1. Import instance_metadata binary dump to the instance_metadata table.

Environment

None

Potential Workaround

None

Checklist

hide

Activity

Show:

Details

Assignee

Reporter

Priority

Development Team

Release

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created July 31, 2024 at 9:17 PM
Updated January 17, 2025 at 12:48 AM
TestRail: Cases
TestRail: Runs