Importing Authority Records

The following procedure explains how to export Evergreen bibliographic records into MARC files using the marc_export support script. All steps should be performed by the opensrf user from your Evergreen server.

Importing Authority Records from Command Line

The major advantages of the command line approach are its speed and its convenience for system administrators who can perform bulk loads of authority records in a controlled environment.

  1. Run marc2are.pl against the authority records, specifying the user name, password, MARC type (USMARC or XML). Use STDOUT redirection to either pipe the output directly into the next command or into an output file for inspection. For example, to process a file with authority records in MARCXML format named auth_small.xml using the default user name and password, and directing the output into a file named auth.are:

    cd Open-ILS/src/extras/import/
    perl marc2are.pl --user admin --pass open-ils --marctype XML auth_small.xml > auth.are
    

    Note

    The MARC type will default to USMARC if the --marctype option is not specified.

  2. Run pg_loader.pl to generate the SQL necessary for importing the authority records into your system. To save time for very large batches of records, you could simply pipe the output of marc2are.pl directly into pg_loader.pl.

    cd Open-ILS/src/extras/import/
     perl pg_loader.pl --auto are --order are auth.are > auth_load.sql
    
  3. Load the authority records from the SQL file that you generated in the last step into your Evergreen database using the psql tool. Assuming the default user name, host name, and database name for an Evergreen instance, that command looks like:

    psql -U evergreen -h localhost -d evergreen -f auth_load.sql
    

Importing authority records using the MARC Batch Import/Export interface from the Staff Client

Good for loading batches of up to 5,000 records (roughly) at a time, the major advantages to importing authority records using the MARC Batch Import/Export interface are that it does not require command-line or direct database access – good for both security in that it minimizes the number of people who need this access and for spreading the effort around to others in the library – and it does most of the work (for example, figuring out whether the batch of records is in XML or USMARC format) for you.

To import a set of MARC authority records from the MARC Batch Import/Export interface:

  1. From the Evergreen staff client, select CatalogingMARC Batch Import/Export. The Evergreen MARC File Upload screen opens, with Import Records as the highlighted tab.

  2. From the Bibliographic records drop-down menu, select Authority records.

  3. Enter a name for the queue (batch import job) in the Create a new upload queue field.

  4. Select the Auto-Import Non-Colliding Records checkbox.

  5. Click the Browse… button to select the file of MARC authorities to import.

  6. Click the Upload button to begin importing the records. The screen displays Uploading… Processing… to show that the records are being transferred to the server, then displays a progress bar to show the actual import progress. When the staff client displays the progress bar, you can disconnect your staff client safely. Very large batches of records might time out at this stage.

  7. Once the import is finished, the staff client displays the results of the import process. You can manually display the import progress by selecting the Inspect Queue tab of the MARC Batch Import/Export interface and selecting the queue name. By default, the staff client does not display records that were imported successfully; it only shows records that conflicted with existing entries in the database. The screen shows the overall status of the import process in the top right-hand corner, with the Total and Imported number of records for the queue.