You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »


MARC _ _ t table issue: Multiple srs IDs associated with same instance ID

In the folio_source_record.marc _ _ t table, each instance_ID should have a unique srs_id associated with it in the Metadb reporting database. However, in early November 2025, the Reporting Team noticed that there were that there duplicates of the srs_id associated with each instance_HRID in the folio_source_record.marc _ _ t table. The marc _ _ t table should include only records where the state field is 'ACTUAL,' but it is including records where the state field is 'OLD.' So we are getting duplicate counts of the same record in cases where the record has been updated. This issue came up before with LDP software and was addressed. There is code to address this issue for the Metadb software, but it is not clear that it is working correctly. The Reporting Team is working with Index Data to address this problem. 

Using 'ACTUAL' for Accurate Record Counts

In the meantime, you can use the record state of 'ACTUAL' as a workaround to make sure you are getting accurate record counts when you are using the folio_source_record.marc_ _ t table.


Sample 1:
FROM folio_derived.instance_ext AS instext
LEFT JOIN folio_source_record.marc__t AS sm ON instext.instance_id = sm.instance_id
LEFT JOIN folio_source_record.records_lb AS rec ON sm.instance_id = rec.external_id
WHERE rec.state = 'ACTUAL' 


Sample 2: 

FROM folio_derived.instance_ext AS instext
LEFT JOIN folio_source_record.marc__t AS sm ON instext.instance_id = sm.instance_id
LEFT JOIN folio_source_record.records_lb AS rec ON sm.instance_hrid = rec.external_hrid
WHERE rec.state = 'ACTUAL' 


Here is an examples of a query that uses 'ACTUAL' :

https://github.com/cul-it/cul-folio-analytics/tree/main/metadb/canned_reports/MCR413



  • No labels