Discovery Import Profile record with deleted status failing in Primo with error
- Product: Primo
- Product Version: 2024 and newer
- Relevant for Installation Type: Primo VE
Description
Discovery Import Profile records with deleted status are failing in primo with error: "Parsing Error - Please check that the file is in the correct format and that the "Input record path" is correct”. Issue occurs when using generic xml only.
Cause:
When a record is deleted from an import profile, it is missing the metadata section, and it is reported by primo as failed record in the third phase mentioned below.
Example:
<record>
<header status="deleted">
<identifier>oai:periodicos.rc.biblioteca.unesp.br:article/12917</identifier>
<datestamp>2018-01-23T11:19:26Z</datestamp>
<setSpec>educacao:ENT</setSpec>
</header>
</record>
The import works in phases:
First phase: downloads the files from oai and split to bulks of 100 records.
Second phase: reads the files from the first phase and creates records for Primo based on the normalization rules
Third phase: validates the Primo records. If Primo finds a problematic record, such as missing key fields, it is flagged as an error, added to error report, and is ignored by further processing.
Fourth phase: is where the import identifies deleted records by the Xpath. At this point the record is not in the subset of valid records that are saved to the database.
Resolution
There is a workaround using a normalization rule, to add just enough metadata so that 'deleted' records will pass the validation in the third phase, and can then be successfully deleted in the fourth phase.
Add to XML normalization rules a generic rule which will be matching on 'deleted' header status, and which will create a dummy field, so the record is validated correctly.
Go to Alma > Configuration Menu > Discovery > Loading External Data Sources > Normalization Rules for External Data Sources
Select the Rules > Normalization Rules (Discovery) tab and select the rule you are using in your import profile. (if not sure which one your institution is using go to Discovery>Loading External Data Sources>Discovery import profiles>edit import profile > select Normalization tab)
rule "Header with deleted status"
when
exist "//*[local-name()='header' and @status='deleted']"
then
set "DELETEDRECORD" in "dc"."title"
end
Additional information about Normalization rules can be found in Privo VE guides here: https://knowledge.exlibrisgroup.com/...%20MD%20Editor
- Article last edited: 28-Jun-2024