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
ID of the instance in FOLIO’s inventory DB
ID of the instance in FOLIO’s SRS DB
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:
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 )
Create a binary dump for “instance_metadata” table by including the resourceId, inventoryId, srsId and Source (hardcoded as “MARC”) columns.
Remove the @instanceId and @srsId properties from the document.
Enhance the “Import into FOLIO” step to do the following:
Import instance_metadata binary dump to the instance_metadata table.
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
ID of the instance in FOLIO’s inventory DB
ID of the instance in FOLIO’s SRS DB
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:
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 )
Create a binary dump for “instance_metadata” table by including the resourceId, inventoryId, srsId and Source (hardcoded as “MARC”) columns.
Remove the @instanceId and @srsId properties from the document.
Enhance the “Import into FOLIO” step to do the following:
Import instance_metadata binary dump to the instance_metadata table.