pulibrary / figgy

Valkyrie-based digital repository backend.
Other
36 stars 4 forks source link

Report of objects with ARKs where the ARK isn't in the MARC record #465

Closed escowles closed 6 years ago

escowles commented 6 years ago

Produce a CSV report listing the bibid and ARK for all objects that have an ARK, but the ARK is not present in the imported metadata.

tpendragon commented 6 years ago

Here's the query:

select id from orm_resources where internal_resource='ScannedResource' AND NOT metadata @> '{"imported_metadata":[{"identifier": []}]}' AND (metadata @> '{"identifier": []}');

It runs in 166ms on staging.

escowles commented 6 years ago

👍 I'm not sure what the best place for this is — it seems at home in the Hyrax/Sufia dashboard, but we don't really have any place like that in Figgy.

hackartisan commented 6 years ago

when you're logged in the front page is kind of a dashboard. Maybe a section there?

escowles commented 6 years ago

@tpendragon that query works for me in postgres, but when I try to make a query object in Figgy, I get the error "ActiveModel::MissingAttributeError: missing attribute: metadata"

tpendragon commented 6 years ago

@escowles Sorry, for the query object one change it to select * from....