Re: [Koha] Koha won't import items when importing MARC records
Hi Kevin, Can you have the $y in the same 952 as the rest of the info? Caroline On 2023-06-30 14:50, Furst, Kevin wrote:
Hi Caroline,
I removed the Story Collection records from b, PRBHS is a branchcode and I added the only item type I have "BOOKS" to the y subfield for every record. Reran the import. Same problem. The records look like this after changes.
=LDR 00496nam a2200157u 4500 =008 031201s1979\\\\||||||||||||||||||||eng|u =010 \\$awsc00002522 =100 10$aEdgar, Donald. =245 10$aBritain's royal family in the twentieth century :$bKing Edward VII to Queen Elizabeth II / =260 0\$bCrown Pub.,$c1979. =300 \\$a[ ] p. =035 \\$a(NL)278906 =005 20091111115742.0 =001 19119 =003 Generic =952 \\$p3333300007426Y$aPRBHS$bPRBHS$v20.00USD$x24543$eaRegular@c20050604$h920 Edg$x548305 =952 $yBOOKS
=LDR 00429nam a2200157u 4500 =008 031201s1980\\\\||||||||||||||||||||eng|u =010 \\$awsc00002524 =100 10$aHamer, Martyn. =245 10$aFamous names in invention / =260 0\$bWayland,$c1980. =300 \\$a[ ] p. =035 \\$a(NL)278908 =005 20091111115742.0 =001 19121 =003 Generic =952 \\$p3333300007437-$aPRBHS$bPRBHS$v7.95USD$x24545$eaRegular@c20050604$h920 Ham$x548307 =952 $yBOOKS
=LDR 00431nam a2200157u 4500 =008 031201s1980\\\\||||||||||||||||||||eng|u =010 \\$awsc00002527 =100 10$aMonham, Kathleen. =245 10$aFamous names in warfare / =260 0\$bWayland,$c1980. =300 \\$a[ ] p. =035 \\$a(NL)278910 =005 20091111115742.0 =001 19123 =003 Generic =952 \\$p3333300007440U$aPRBHS$bPRBHS$v20.00USD$x24547$eaRegular@c20050604$h920 Mon$x548308 =952 $yBOOKS
Note: Until I figure out what the problem is, I only process a small subset of 299 records each time so there's not a lot of data to parse.
*Kevin Furst* Technology Director Pine River-Backus Schools o | 218.587.8030 @ | kfurst@prbschools.org
Technology Office/Help Desk: 218-587-8510
/Confidentiality Notice: This E-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail and destroy all copies of the original message./
On Fri, Jun 30, 2023 at 1:03 PM Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> wrote:
Hi Kevin,
Whenever I have this problem, it's because the branchcode doesn't exist.
Is PRBHS a branchcode in your system?
I also noticed your first 952 has $bStory Collection. Is that a typo from when you copied, or is this the actual value? If so, then Story Collection needs to be a branchcode also.
I'm not sure if the system would block for a lack of item type, but I noticed your 952's don't have item types ($y) either. I don't *think* it would block if there are no item types, it would probably block if the item type code was wrong, but you might have problems later in circulation if your items don't have item types.
Good luck with your project!
Caroline
On 2023-06-30 13:20, Furst, Kevin wrote: > Hello, > > TL;DR = When importing MARC records, items don't import and fail. > > I am transitioning from Follett Destiny to Koha. After doing a MARC export > from Follett, I noticed that when staging records for import, Koha would > parse the biblio records fine but wouldn't find any item records. After > searching past messages in this list, I found that Follett has item records > as 852 instead of 952. I used MARCedit to change those to 952 and also > added a and b records to match the libraries listed in Koha. After doing > that and trying again, item records were then found during staging. > > However when I import the staged records, it just fails and gives me > nothing in the detailed messages in the UI. If I remove the 952 records, it > works fine and imports all the other records thus I know something is wrong > with my 952 entries. I have checked that there are p barcodes and a and b > home and current libraries. > > In the Koha logs on the server, this is the only error message I get when I > try to run an import and it fails. To me it seems like a FK is missing on > import but I don't know what. Looking at the schema example, I'm wondering > if I'm supposed to be importing things to 942 and 999 along with 952. I do > not know if, when importing MARC records, Koha creates its own enumerated > ids for biblio, item number, etc. if that stuff isn't in the import file... > or if it isn't there, will it fail? > > BIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st > execute failed: Cannot add or update a child row: a foreign key constraint > fails (`koha_library`.`items`, CONSTRAINT `items_ibfk_> > > Broken FK constraint at > /usr/share/koha/lib/Koha/BackgroundJob/MARCImportCommitBatch.pm line 91. > > Here are a couple of 952 records from the Follett export to Koha import > file to see if something simple is wrong. I'm hoping it's something simple > on these lines. > > > =952 \\$p34517100010472$aPRBHS$bPRBHS$bStory > Collection$v10.00USD$x14441$eaRegular@c20060929@fTransfer from PRB Elem.@j > @j@j@i@i@i$hSC Otf$x1127380 > > =952 \\$p3333300007200O$aPRBHS$bPRBHS$v20.00USD$x17292$eaRegular@c20050604 > @j@j@j@i@i@i$hR 639 Can pb$x527111 > > > (Beyond that, I haven't really tinkered with anything in the default MARC > framework settings in admin. > Here is my version : > *Koha version:22.11.05.000 Rosalie* > > I would really appreciate any help, I've been working on this for over a > week now. > > *Kevin Furst* > Technology Director > Pine River-Backus Schools > o | 218.587.8030 > @ | kfurst@prbschools.org > > Technology Office/Help Desk: 218-587-8510 > > *Confidentiality Notice: This E-mail message, including any attachments, is > for the sole use of the intended recipient(s) and may contain confidential > and privileged information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the intended recipient, please > contact the sender by reply E-mail and destroy all copies of the original > message.* > _______________________________________________ > > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Caroline Cyr-La-Rose, M.L.I.S. (she/her) Librarian | Product Manager
1-833-INLIBRO (465-4276), ext. 221 caroline.cyr-la-rose@inlibro.com https://www.inLibro.com <https://www.inLibro.com>
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Caroline Cyr-La-Rose, M.L.I.S. (she/her) Librarian | Product Manager 1-833-INLIBRO (465-4276), ext. 221 caroline.cyr-la-rose@inlibro.com https://www.inLibro.com
participants (1)
-
Caroline Cyr La Rose