[Koha] How to clean Koha imported records?

Layale Bassil lb26 at aub.edu.lb
Wed Apr 9 02:30:34 NZST 2014


Hello All,

Hope all is good. I followed the suggestion below: " Before re-importing your data, organize your holdings into tag 952, using the 'items' mapping at Administration/Koha to MARC Mapping."

When I import now, I get that 20 records were successfully imported and 900 items too (as an example).
But when I open the table "items", it is still empty! And the holdings of each record are empty too while they should show the imported items. But if I open the "import_items" table, I can find the imported items. Can you please advise? Do I have to commit the import of the items or what? When does Koha store the imported items into the "items" table? Or he keeps them in the "import_items"?

Thanks.

-----Original Message-----
From: Koha [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Bob Birchall
Sent: Monday, April 07, 2014 2:08 PM
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] How to clean Koha imported records?

I had guessed that was the case from your last post, but I went to dinner instead of answering you.  Sorry.

I have not reviewed this whole thread, but I think your situation is this:
- you have a Koha instance that you want to use for production;
- you have imported bibliographic data into that instance, that you now wish to delete;
- you did not import any items, as you had the holdings information in a field other than 952;
- you have 'cleaned' the import batch, so it cannot now be reversed.

Is that right?  Then:
- did you test any circulation transactions?  If so, truncate the 'accountlines', 'issues', 'reserves', 'oldissues' and 'oldreserves' tables;
- did you import any authorities?  If so, truncate the auth_header table;
- truncate the biblio and biblioitems tables;
- truncate the zebraqueue table.

That will pretty much get you back to your configured Koha with no bibliographic data.  Before re-importing your data, organise your holdings into tag 952, using the 'items' mapping at Administration/Koha to MARC Mapping.

And before using any more features like 'clean', read the manual. :)

That should do it.  Best wishes,
Bob Birchall
Calyx




On 07/04/14 20:27, Layale Bassil wrote:
> Hello again dear Jerwyn,
>
> I realized that the items were not imported into Koha. In fact I was checking the mappings under: Administration > Koha to MARC mapping, I realized that the items use the Tag = 952 while we are exporting them under Tag = 945. Do you think this is the reason? What should be done to fix this issue and be able to import the items when importing the records?
>
> Thanks in advance,
> Regards.
>
> From: Jerwyn Fernandez [mailto:jerwyn_fernandez at southville.edu.ph]
> Sent: Saturday, April 05, 2014 2:47 AM
> To: Layale Bassil
> Cc: Fischer, Katrin; koha at lists.katipo.co.nz
> Subject: Re: [Koha] How to clean Koha imported records?
>
> Hi Layale,
>
> There are a lot of ways you can delete your records in KOHA, what Fischer just told you is one option.
>
> You may also delete your records manually by generating this SQL script to be run in "Create report from SQL"
>
> SELECT  
> items.itemnumber,items.barcode,biblio.title,items.itemcallnumber FROM 
> items LEFT JOIN biblioitems on 
> (items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio 
> on (biblioitems.biblionumber=biblio.biblionumber)  ORDER BY 
> items.itemnumber asc
>
> When you were able to generate the report, go to Batch Item Deletion and paste the "barcode" of your item or from a blank sheet with the itemnumber of your record you can delete it as well.
>
> Regards,
>
> - Jerwyn
>
> On Fri, Apr 4, 2014 at 9:19 PM, Layale Bassil <lb26 at aub.edu.lb<mailto:lb26 at aub.edu.lb>> wrote:
> Hello Katrin,
>
> Thanks a lot for the quick response. It is very helpful for me to know how to import later on in case an error occurred during the import.
>
> Can you please tell me what are the tables that need to be cleaned? I don't want to delete the frameworks or the initial data that comes when installing koha.
>
> Many thanks,
> Regards.
>
> Layale Bassil
> Software Engineer - Business Analyst
> IT Solutions Delivery Department
>
>
> American University of Beirut
> Office of Information Technology
> P.O.Box 11-0236
> Riad El-Solh, Beirut 1107 2020, Lebanon
> T: +961 (1) 350000 x 3649<tel:%2B961%20%281%29%20350000%20x%203649> | 
> M: +961 (03) 929876<tel:%2B961%20%2803%29%20929876>
> E: lb26 at aub.edu.lb<mailto:lb26 at aub.edu.lb>
>
> W . Fb . Fl . T . Y . L . IT
>
> Think Green... Keep it on the Screen... Save a Tree...
>
>
>
> -----Original Message-----
> From: Fischer, Katrin 
> [mailto:Katrin.Fischer at bsz-bw.de<mailto:Katrin.Fischer at bsz-bw.de>]
> Sent: Friday, April 04, 2014 4:18 PM
> To: Layale Bassil; 
> koha at lists.katipo.co.nz<mailto:koha at lists.katipo.co.nz>
> Subject: RE: [Koha] How to clean Koha imported records?
>
> Hi Layale,
>
> 'clean' has a bit different meaning here. It will clean the information about your import, but not the records from the catalog. To do that, you can go to the batch detail page and there is a button to undo the import into the catalog. But once you have cleaned the batch, that is no longer possible.
> Probably easiest now would be to delete the records from the database using SQL.
>
> Hope this helps,
>
> Katrin
>
>
>
>> -----Original Message-----
>> From: Koha 
>> [mailto:koha-bounces at lists.katipo.co.nz<mailto:koha-bounces at lists.kat
>> ipo.co.nz>] On Behalf Of Layale Bassil
>> Sent: Friday, April 04, 2014 2:45 PM
>> To: koha at lists.katipo.co.nz<mailto:koha at lists.katipo.co.nz>
>> Subject: [Koha] How to clean Koha imported records?
>> Importance: High
>>
>> Hello,
>>
>> I am running Koha 3.14. I imported several batches for testing 
>> purposes, but I need to delete those records so I go to "Manage 
>> staged MARC records" and press on "Clean". When I search the OPAC, I 
>> can still see those records as if they were not deleted! I rebuilt 
>> zebra as well as restarted the zebra index but still in vain.
>>
>> I need to delete all the previously imported records and start a 
>> fresh clean catalogue. Any suggestions would be greatly appreciated.
>>
>> Regards.
>> _______________________________________________
>> Koha mailing list  http://koha-community.org 
>> Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
>> http://lists.katipo.co.nz/mailman/listinfo/koha
>>
> _______________________________________________
> Koha mailing list  http://koha-community.org 
> Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
> http://lists.katipo.co.nz/mailman/listinfo/koha
>
>
>
> --
> Jerwyn G. Fernadez
> Basic Education Librarian
> Southville International School and Colleges
>
> _______________________________________________
> Koha mailing list  http://koha-community.org Koha at lists.katipo.co.nz 
> http://lists.katipo.co.nz/mailman/listinfo/koha

_______________________________________________
Koha mailing list  http://koha-community.org Koha at lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha


More information about the Koha mailing list