automated new books list for primo

41
1

Upload: ryan-edwards

Post on 12-Apr-2017

162 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Automated New Books List for Primo

1

Page 2: Automated New Books List for Primo

2

Page 3: Automated New Books List for Primo

3

Page 4: Automated New Books List for Primo

4

Page 5: Automated New Books List for Primo

• List uses a custom Alma Analysis to retrieve a list of Alma MMSIDs for books received in the last 7 days

• Alma Analysis runs daily and emails list of Alma MMSIDS as a .txt attachment to our cloud based Box.com email address

• Custom shell scripts retrieve the list of Alma MMSIDs for new books via FTP from Box.com account, loop through the list of MMSIDs calling the Alma Bibs API to retrieve the bibliographic records, and format and output the bibliographic records to our harvesting pipe in Primo

5

Page 6: Automated New Books List for Primo

6

Page 7: Automated New Books List for Primo

https://api-na.hosted.exlibrisgroup.com/almaws/v1/analytics/reports?path=/shared/{your_institution}/Reports/booksReceived

Selected Column:"Bibliographic Details"."MMS Id"

Filters:"Physical Item Details"."Receiving Date" is greater than or equal to timestampadd(sql_tsi_day,-7, current_date)"Bibliographic Details"."Suppressed From Discovery" is equal to / is in No"Bibliographic Details"."Bibliographic Level" is equal to / is in a; mLocation Code is not equal to / is not in ORDERXREC

Notes: Our Receiving_Date filter is set to 7 days, but the filter could include any number of X days.You will need to replace {your_institution} with your institution.

7

Page 8: Automated New Books List for Primo

FTP is available to Business and Enterprise accounts for bulk migration of data: https://community.box.com/t5/Managing-Your-Content/Using-Box-with-FTP/ta-p/312 At the Getty, we use an Enterprise version of Box.com, but you can create a free Box.com account: https://app.box.com/signup/personal (Disregard this step if you use the Alma Analytics API to retrieve less than 1000 received books in the last 7 days.)

8

Page 9: Automated New Books List for Primo

Login to your Box.com account: https://app.box.com/login

9

Page 10: Automated New Books List for Primo

Create a new folder, change folder “Upload Options” to “Email files to this Folder”, and take note of folder upload email

10

Page 11: Automated New Books List for Primo

Change folder “Upload Options” to “Email files to this Folder” and take note of folder upload email

11

Page 12: Automated New Books List for Primo

12

Page 13: Automated New Books List for Primo

13

Page 14: Automated New Books List for Primo

14

Page 15: Automated New Books List for Primo

We commented out the code to remove booksReceived.xml because we’re not using the Alma Analytics API to retrieve the list of books received in the last 7 days.

15

Page 16: Automated New Books List for Primo

In analysis.sh, you will need to enter your Box.com username and password.

Initially, when we created analysis.sh and analysis2bibs.sh, we encountered a bug in the Alma Analytics API/Oracle BI which prevented us from retrieving the list of Alma MMSIDs when using the Alma Analytics API (reference case #00103091). So, we decided to retrieve the Alma MMSIDs from Box.com instead. However, we added commented out code in analysis.sh, thinking that ExLibris might fix this bug in the future. ExLibris did indeed fix the bug in the Alma February 2016 Release, but we decided to keep using Box.com because the maximum number of MMSIDs which can be retrieved per the Alma Analytics API call is 1000 and we didn't want to be involved with complicated multiple API calls, resumption tokens, loops, python scripts, etc…

#output mmsids in xml from Alma Analytic booksReceived#curl -v -G "https://api-na.hosted.exlibrisgroup.com/almaws/v1/analytics/reports?path=/shared/Getty+Research+Institute/Reports/booksReceived&limit=1000&apikey={your_api_key}" >>/exlibris/primo/newTitles/booksReceived.xml

16

Page 17: Automated New Books List for Primo

In analysis2bibs.sh, you will need to replace {your_api_key} with your Alma api key.

Initially, when we created analysis.sh and analysis2bibs.sh, we encountered a bug in the Alma Analytics API/Oracle BI which prevented us from retrieving the list of Alma MMSIDs when using the Alma Analytics API (reference case #00103091). So, we decided to retrieve the Alma MMSIDs from Box.com instead. However, we added commented out code in analysis2bibs.sh, thinking that ExLibris might fix this bug in the future. ExLibris did indeed fix the bug in the Alma February 2016 Release, but we decided to keep using Box.com because the maximum number of MMSIDs which can be retrieved per the Alma Analytics API call is 1000 and we didn't want to be involved with complicated multiple API calls, resumption tokens, loops, python scripts, etc...

#use booksReceived.xml and report_js.xsl to isolate mmsids# /exlibris/primo/p4_1/product/local/java/bin/java -jar /exlibris/primo/newTitles/saxon9he.jar -s:/exlibris/primo/newTitles/booksReceived.xml -xsl:/exlibris/primo/newTitles/report_js.xsl -o:/exlibris/primo/newTitles/mmsids.txt

#send mmsids.out to loop to create Alma Retrieve Bib record API lines to outputAlma

17

Page 18: Automated New Books List for Primo

bib records# cat /exlibris/primo/newTitles/mmsids.txt|# while read ids # do curl -G 'https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/${ids}?expand=p_avail&apikey={your_api_key}' -o /exlibris/primo/newTitles/records/bibrec_${ids}.xml done

17

Page 19: Automated New Books List for Primo

18

Page 20: Automated New Books List for Primo

19

Page 21: Automated New Books List for Primo

Your file pathing may be different than ours, but make sure that you have absolute, full paths in your scripts if you’re adding your scripts to the Primo crontab. We run the 4 scripts in the late morning. Of the 4 scripts, removeBibs.sh should run first, followed by the scheduled delete pipe. Then, analysis.sh, analysis2bibs.sh, and split.sh should be run. Then, finally, we run our load pipe.

20

Page 22: Automated New Books List for Primo

Since ExLibris performs Alma system maintenance on most Sunday, the load and delete pipes are scheduled to run every day, except Sundays.

21

Page 23: Automated New Books List for Primo

22

Page 24: Automated New Books List for Primo

23

Page 25: Automated New Books List for Primo

When creating your data source, remember that the Source Format should be MARC21 or the same format as the data source for your Alma instance.

24

Page 26: Automated New Books List for Primo

25

Page 27: Automated New Books List for Primo

Since the Alma Get It Template uses the almaid and the incoming Alma records are being merged with their existing Alma records, the Control Alma ID will need to be disabled in the normalization in order to get Primo requests to work. Disabling the Control Alma IDs allows requests to work in Primo as Primo uses the Alma IDs in the existing records for requesting purposes.

26

Page 28: Automated New Books List for Primo

In our case, we customized our display_source normalization rule to add a constant to differentiate our Alma API source from our Alma Catalog.

27

Page 29: Automated New Books List for Primo

We use lds38 with a condition to add our catalogers’ initials to MARC field 936, subfield c. Then, we write a transformation constant to the records to add the phrase, “All Books Received in the Last 7 Days”.

28

Page 30: Automated New Books List for Primo

Since new book titles will be added and deleted from the New Books list on a daily basis, the custom persistent link (in our case lds29) will need to be disabled, so the persistent link will default to the permanent existing Alma persistent link.

29

Page 31: Automated New Books List for Primo

Since new book titles will be added and deleted from the New Books list on a daily basis, the custom persistent link (in our case lln01) will need to be disabled, so the persistent link will default to the permanent existing Alma persistent link.

30

Page 32: Automated New Books List for Primo

We use lsr38 with a condition to add our catalogers’ initials to MARC field 936, subfield c. Then, we write a transformation constant to the records to add the phrase, “All Books Received in the Last 7 Days”.

31

Page 33: Automated New Books List for Primo

We use search_scope with a condition to add our catalogers’ initials to MARC field 936, subfield c. Then, we write a transformation constant to the records to add the phrase, “GETTY_NEWBOOKS”, so we can letter add the search scope value to our view.

32

Page 34: Automated New Books List for Primo

We use lfc38 with a condition to add our catalogers’ initials to MARC field 936, subfield c. Then, we write a transformation constant to the records to add the phrase, “All Books Received in the Last 7 Days”. After you have customized all of your Normalization Rules, you must deploy them.

33

Page 35: Automated New Books List for Primo

While Primo OTB may already be set up to DEDUP on the Alma MMSID in the 001 in the c5 and f20 normalization rules, make sure that this is the case; otherwise the new books won’t dedup correctly.

34

Page 36: Automated New Books List for Primo

The Source Directory in the load_pipe screenshot is a bit truncated and refers to this directory: /exlibris/primo/newTitles/newBooks

35

Page 37: Automated New Books List for Primo

36

Page 38: Automated New Books List for Primo

Since ExLibris performs Alma system maintenance on most Sundays, the load and delete pipes are scheduled to run every day, except Sundays.

37

Page 39: Automated New Books List for Primo

38

Page 40: Automated New Books List for Primo

39

Page 41: Automated New Books List for Primo

Special thanks go to:Joe Shubitowski, Head, Library Info. Systems, Getty Research InstituteRuth Cuadra, Bus Applications Administrator, Getty Research InstituteJoshua Gomez, Software Engineer Sr, Getty Research InstituteLawrence Olliffe, Software Engineer, Getty Research Institute

40