Forum - Bulk update holdings
- This topic has 5 replies, 3 voices, and was last updated 4 months, 1 week ago by Ori Miller.
- October 10, 2019 at 12:57 am #63496Jay GattusoParticipant
I have to make some cleans to the “852” field of several thousand holding records. I have their ID, and the current 852 field via an Analytics ‘report’.
Whats the most efficient way of updating these records? Is there a bulk import, and if so, whats the form of the data needed to come back into ALMA?October 10, 2019 at 5:22 am #63499Tami FuchesModerator
You can use the update holdings record API – see https://developers.exlibrisgroup.com/alma/apis/docs/bibs/UFVUIC9hbG1hd3MvdjEvYmlicy97bW1zX2lkfS9ob2xkaW5ncy97aG9sZGluZ19pZH0=/
Please see this blog: https://developers.exlibrisgroup.com/blog/bulk-updating-items-by-api-on-a-file-of-item-pids/
It is about updating items, but a similar approach can be done for updating holdings.
TamarOctober 10, 2019 at 5:58 pm #63506Jay GattusoParticipant
I’ll look into this approach – but this looks like a one-by-one method. Updating just one of the many sets we have of 50k holdings will take days to complete.
Can I send more than one holding at a time?
Is there a more bulk suitable method like the import profiles approach for bibs records?
JOctober 10, 2019 at 8:55 pm #63507Ori MillerKeymaster
The Update-Holding API can only process one record at a time (and the same goes for all of Alma’s APIs).
If you update 50k Holdings sequentially it would take 15-20 hours.
You could however run a few processes of your script, each with a different input file. The API Gateway allows up to 25 requests at the same second, so it should be safe to run with up to 15-20 processes in parallel. If you do, check the script’s log file for error messages which might be returned if somehow the gateway did receive too many requests at once and blocked some of them.
You can also write a script which forks to multiple threads, as demonstrated in this blog for example: https://developers.exlibrisgroup.com/blog/calling-apis-in-parallel-with-java-code/
Hope this helps,
Alma API TeamOctober 13, 2019 at 6:26 pm #63549Jay GattusoParticipant
Thanks for you reply – thats really useful! I’ll take a look today.
The holdings calls seem particularly limited – is there a non API bulk method that doesn’t require all the extra threading/async overheads to deal with large sets?
JOctober 15, 2019 at 8:40 pm #63618Ori MillerKeymaster
See the section “Performing Global Changes on Holdings Records”
- You must be logged in to reply to this topic.