[OPEN-ILS-DEV] Authority Record Linking script

Duimovich, George George.Duimovich at NRCan-RNCan.gc.ca
Mon May 16 16:53:28 EDT 2011


I wasn't sure about the impact of touching authority.full_rec -- so that's very good and fast solution.

Confirmed to be working like a charm for us now.

George
 

-----Original Message-----
From: open-ils-dev-bounces at list.georgialibraries.org [mailto:open-ils-dev-bounces at list.georgialibraries.org] On Behalf Of Mike Rylander
Sent: May 16, 2011 16:32
To: Evergreen Development Discussion List
Subject: Re: [OPEN-ILS-DEV] Authority Record Linking script

On Mon, May 16, 2011 at 4:23 PM, Duimovich, George <George.Duimovich at nrcan-rncan.gc.ca> wrote:
> Hello,
>
> The authority_control_fields.pl script provides handy tool to create 
> authority record / bib record linkages.
>
> In earlier upgrade testing I removed duplicates from our production 
> "authority.record_entry" table  using a delete by id statement.  
> Duplicates were identified and then rows were deleted from entries 
> that had known lower quality sources, etc.
>
> Problem: my delete query against "authority.record_entry" didn't seem 
> to auto-update the related index entries in "authority.full_rec"   -- 
> we can still find rows in "authority.full_rec" that point to authority 
> records that had been deleted.  And since the 
> "authority_control_fields.pl" script uses those values from 
> "authority.full_rec" it runs into trouble when it finds a reference to 
> a value's id that is no longer in "authority.record_entry". So I've 
> removed duplicates from record_entry, but full_rec still has references to duplicate index values.
>
> Question: How can I completely refresh / rebuild the "authority.full_rec"
> table so that we have a clean table for "authority_control_fields.pl" 
> to use?
>

You could, but you could instead just:

DELETE FROM authority.full_rec WHERE NOT EXISTS (SELECT id FROM authority.record_entry WHERE NOT DELETED AND authority.record_entry.id = authority.full_rec.record);

or similar.

However, it would probably be better to teach authority_control_fields.pl to ignore deleted authorities instead.

--
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list