Koha/Interoperability

Koha can import/export data and read data from other catalogs. This wiki page attempts to document the interoperability of Koha with other book cataloging systems.

Records

 * http://en.wikipedia.org/wiki/Bibliographic_index
 * http://en.wikipedia.org/wiki/Authority_control

MARC

 * http://www.loc.gov/marc/bibliographic
 * http://en.wikipedia.org/wiki/MARC_standards
 * http://manual.koha-community.org/3.12/en/catguides.html#itemcatguide
 * http://lib2.dss.go.th/elib/marc21/examples.html
 * http://hstalks.com/main/lib_marc.php
 * http://www.oclc.org/marc-records.en.html
 * http://www.loc.gov/marc/marctools.html

Migration Documentation

 * http://manual.koha-community.org/3.12/en/implementation.html#imp-migration
 * http://manual.koha-community.org/3.12/en/marceditexcel.html
 * http://opensource-ils.cci.utk.edu/content/koha-migration-process
 * http://opensource-ils.cci.utk.edu/content/publications

Sample MARC Data/Records

 * http://bywatersolutions.com/2013/06/20/ebook-marc-for-koha
 * http://bywatersolutions.com/2010/07/30/finding-free-authority-records

MARC records for purchase

 * http://www.loc.gov/cds/products/marcDist.php

How to import MARC bibliographic records
The following procedure describes how to import sample records from Springer E-Books, Project Gutenberg and the Open Library. Check the relevant sites for the most recent records.

Step 1
Install MARCEDIT. Then download the MARC files from here: http://web.lib.sun.ac.za/files/marc/ or get the latest from the links below. http://archive.org/details/marc_lendable_books

http://www.gutenberg.org/wiki/Gutenberg:Offline_Catalogs

http://www.springer.com/?referer=springer.com&SGWID=1-148802-3020-0-0

Step 2
Add the 952 tag and fields required by Koha to the exported file using MARCEDIT. See this tutorial. These are: 952$a | Owning Library | Branch code 952$b | Holding Library | Branch code 952$y | Koha item type | Coded value

Step 3

 * If importing a very large amount of records, it is a good idea to stop the automated zebra index update. See "/etc/cron.d/koha" if you used the packages installation method.

Import the .mrc file using the Koha admin interface. Or use the /usr/share/koha/bin/migration_tools/bulkmarcimport.pl tool. See below for help. BULKMARCIMPORT(1)    User Contributed Perl Documentation    BULKMARCIMPORT(1)

NAME bulkmarcimport.pl - Import bibliographic/authority records into Koha

USAGE $ export KOHA_CONF=/etc/koha.conf $ perl misc/migration_tools/bulkmarcimport.pl -d -commit 1000 \\ -file /home/jmf/koha.mrc -n 3000

WARNING Don't use this script before you've entered and checked your MARC parameters tables twice (or more!). Otherwise, the import won't work correctly and you will get invalid data.

DESCRIPTION -h This version/help screen

-b, -biblios Type of import: bibliographic records

-a, -authorities Type of import: authority records

-file=FILE The FILE to import

-v Verbose mode. 1 means "some infos", 2 means "MARC dumping"

-fk Turn off foreign key checks during import.

-n=NUMBER The NUMBER of records to import. If missing, all the file is          imported

-o, -offset=NUMBER File offset before importing, ie NUMBER of records to skip.

-commit=NUMBER The NUMBER of records to wait before performing a 'commit' operation

-l File logs actions done for each record and their status into file

-t, -test Test mode: parses the file, saying what he would do, but doing nothing.

-s Skip automatic conversion of MARC-8 to UTF-8. This option is          provided for debugging.

-c=CHARACTERISTIC The CHARACTERISTIC MARC flavour. At the moment, only MARC21 and UNIMARC are supported. MARC21 by default.

-d Delete EVERYTHING related to biblio in koha-DB before import. Tables: biblio, biblioitems, items

-m=FORMAT Input file FORMAT: MARCXML or ISO2709 (defaults to ISO2709)

-authtypes file yamlfile with authoritiesTypes and distinguishable record field in order to store the correct authtype

-yaml yaml file format a yaml file with ids

-filter list of fields that will not be imported. Can be any from 000 to          999 or field, subfield and subfield's matching value such as           200avalue

-insert if set, only insert when possible

-update if set, only updates (any biblio should have a matching record)

-all if set, do whatever is required

-k, -keepids= Field store ids in FIELD (usefull for authorities, where 001          contains the authid for Koha, that can contain a very valuable info           for authorities coming from LOC or BNF. useless for biblios           probably)

-match= FIELD matchindex,fieldtomatch matchpoint to use to deduplicate fieldtomatch can be either 001 to 999 or field and list of          subfields as such 100abcde

-i,-isbn If set, a search will be done on isbn, and, if the same isbn is          found, the biblio is not added. It's another method to deduplicate. -match & -isbn can be both set.

-cleanisbn Clean ISBN fields from entering biblio records, ie removes hyphens. By default, ISBN are cleaned. --nocleanisbn will keep ISBN unchanged.

-x=TAG Source bib TAG for reporting the source bib number

-y=SUBFIELD Source SUBFIELD for reporting the source bib number

-idmap=FILE FILE for the koha bib and source id

-keepids Store ids in 009 (usefull for authorities, where 001 contains the          authid for Koha, that can contain a very valuable info for           authorities coming from LOC or BNF. useless for biblios probably)

-dedupbarcode If set, whenever a duplicate barcode is detected, it is removed and the attempt to add the record is retried, thereby giving the record a blank barcode. This is useful when something has set barcodes to          be a biblio ID, or similar (usually other software.)

-framework This is the code for the framework that the requested records will have attached to them when they are created. If not specified, then the default framework will be used.

perl v5.14.2                     2013-07-29                 BULKMARCIMPORT(1)

Step 4
Run one of the following to fully re-index:
 * sudo /usr/sbin/koha-rebuild-zebra -a -b -f -v library (Re-indexes the "library" instance only)
 * sudo /usr/sbin/koha-rebuild-zebra -v –full `/usr/sbin/koha-list` (Re-indexes all the instances)
 * sudo /usr/share/koha/bin/migration_tools/rebuild_solr.pl (If using the SOLR server)


 * If importing a very large amount of records, it is a good idea to stop the automated zebra index update. See "/etc/cron.d/koha" if you used the packages installation method.

Step 5
Check the following if the OPAC search does not work. http://koha-community.org/faqs/zebra-indexing-wont-work-fix-it-aka-search-stuff-up-help

Return to Koha wiki page