culibraries / library-reporting

Anything to do with library reporting, mostly but not limited to FOLIO.
0 stars 0 forks source link

EDS Holdings #94

Closed arthur-aguilera closed 1 year ago

arthur-aguilera commented 1 year ago

Full catalog load to EDS - similar to Goldrush Holdings report except we want Law holdings included

blocke1 commented 1 year ago

Query in Sierra:

Bibliographic BCODE3 not equal to “n” AND Bibliographic CAT LEVEL not equal to “t” AND Bibliographic LOCATION not equal to “ill”

Currently named “summon_all_quarterly.”

blocke1 commented 1 year ago

@arthur-aguilera I'm not getting this one to work!

SELECT inst.hrid as instance_hrid FROM instance__ext as inst LEFT JOIN holdings_ext as holdings LEFT JOIN folio_source_record.marc as marc WHERE staff_suppress != true WHERE permanent_location_name not like '%ILL%' WHERE marc.field = '998' and marc.sf = 'c' and marc."content" != 't'

arthur-aguilera commented 1 year ago

@blocke1 What's the 998 used for? Are we only supposed to send records that have a 998|c value that is not t?

This produces results, but there are NULL values in the 998|c which implies that the Instance does not have a 998 field. Looking at them, it looks like these are Law records. Should they be excluded? Should the exclusion be by a Law location, or should it be any record that does not have an in-scope 998|c value?

WITH in_scope AS ( SELECT * FROM folio_source_record.marc__t as marc WHERE marc.field = '998' AND marc.sf = 'c' AND marc."content" != 't') SELECT inst.instance_hrid, inst.staff_suppress, holdings.permanent_location_name, in_scope.instance_id FROM folio_derived.instance_ext as inst LEFT JOIN folio_derived.holdings_ext as holdings ON holdings.instance_id = inst.instance_id LEFT JOIN in_scope ON in_scope.instance_id = inst.instance_id WHERE staff_suppress != TRUE AND holdings.permanent_location_name not like '%ILL%'

blocke1 commented 1 year ago

@arthur-aguilera the 998|c is the cat level. And "t" is used for EBSCO records. We were excluding them because EBSCO automatically adds their bibs to EDS, so we don’t have to send them.

However, we just realized that the side-loading for VuFind means we are not loading EBSCO records into FOLIO. Which means we do not need to exclude them because they will not be loaded into FOLIO in the first place.

So the part of the query to exclude 998|c != t can be removed.

I tried to alter it, but it's not working. I'm failing:

WITH in_scope AS ( SELECT * FROM folio_derived.instance_ext as inst) SELECT inst.instance_hrid, inst.staff_suppress, holdings.permanent_location_name, in_scope.instance_id FROM folio_derived.instance_ext as inst LEFT JOIN folio_derived.holdings_ext as holdings ON holdings.instance_id = inst.instance_id LEFT JOIN in_scope ON in_scope.instance_id = inst.instance_id where staff_suppress != TRUE AND holdings.permanent_location_name not like '%ILL%';

(And I double checked with Emily and we do not need to exclude Law.)

arthur-aguilera commented 1 year ago

@blocke1 here you go! We just need to add the ")" before the second select!

WITH in_scope AS ( SELECT * FROM folio_source_record.marc__t as marc WHERE marc.field = '998' AND marc.sf = 'c') SELECT inst.instance_hrid, inst.staff_suppress, holdings.permanent_location_name, in_scope.instance_id FROM folio_derived.instance_ext as inst LEFT JOIN folio_derived.holdings_ext as holdings ON holdings.instance_id = inst.instance_id LEFT JOIN in_scope ON in_scope.instance_id = inst.instance_id WHERE staff_suppress != TRUE AND holdings.permanent_location_name not like '%ILL%'

arthur-aguilera commented 1 year ago

@blocke1 @nleboeuftrujillo I also wanted to make you aware of this:

Chris Long: I know that catalogers won't be adding 998s in FOLIO, but I don't know how/if administrative notes are exported out of FOLIO. Probably a better question for Nicole.

Will the catalog level in the administrative note be super important for this EDS report? Do you know what the value of the administrative note will be for each cat level?

blocke1 commented 1 year ago

Thanks, Arthur!!! 😊

From: Arthur Aguilera @.> Sent: Friday, June 2, 2023 4:09 PM To: culibraries/library-reporting @.> Cc: Erin Block @.>; Mention @.> Subject: Re: [culibraries/library-reporting] EDS Holdings (Issue #94)

@blocke1https://github.com/blocke1 here you go! We just need to add the ")" before the second select!

WITH in_scope AS ( SELECT * FROM folio_source_record.marc__t as marc WHERE marc.field = '998' AND marc.sf = 'c') SELECT inst.instance_hrid, inst.staff_suppress, holdings.permanent_location_name, in_scope.instance_id FROM folio_derived.instance_ext as inst LEFT JOIN folio_derived.holdings_ext as holdings ON holdings.instance_id = inst.instance_id LEFT JOIN in_scope ON in_scope.instance_id = inst.instance_id WHERE staff_suppress != TRUE AND holdings.permanent_location_name not like '%ILL%' AND holdings.permanent_location_name NOT LIKE '%Law%'

— Reply to this email directly, view it on GitHubhttps://github.com/culibraries/library-reporting/issues/94#issuecomment-1574369156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUKN22BXLM2WPHFYXA7YQQDXJJP57ANCNFSM6AAAAAAWRWIJHM. You are receiving this because you were mentioned.Message ID: @.**@.>>

arthur-aguilera commented 1 year ago

Per Erin, no longer needed.