Koha 16.05 - Change MARC framework globally on batch of records?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Koha 16.05 - Change MARC framework globally on batch of records?

Craig Butosi
Hi all,

Koha 16.05 on Ubuntu 14.04 LTS (package install)

Is there a way to globally change the MARC framework on a batch of bib records, rather than one-by-one (perhaps by way of an SQL command)? I noticed that when uploading records from within MARCEdit via the Koha API, the records are imported under the original Default framework, rather than our custom framework.

I know that you can using the Koha import tool. But I'm just wondering if there's another way without uploading a file.

Many thanks!

C

Craig Butosi, MA, MLIS, B Mus (Hons.)
LIBRARY SERVICES MANAGER
the royal conservatory
TELUS Centre for Performance and Learning
273 Bloor Street West
Toronto, ON M5S 1W2
416.408.2824 x338
www.rcmusic.ca<http://www.rcmusic.ca/>



Note: This email message and any attachments are intended only for the use of the individual to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the recipient of this email is not the intended recipient (or the employee or agent responsible for delivering the email to the intended recipient), you are hereby notified that any review, dissemination, distribution or copying or other use of this message is strictly prohibited. If you have received this communication in error, please notify the sender immediately by return email and delete this message and attachments from your system, thank you.
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Koha 16.05 - Change MARC framework globally on batch of records?

Katrin Fischer-2
Hi Craig,

it looks like the framework is stored in frameworkcode in the table
biblio. It should be possible to change it with SQL as I think it
doesn't get mapped to a MARC field at the moment.

Hope this helps,

Katrin


On 16.03.2017 20:46, Craig Butosi wrote:

> Hi all,
>
> Koha 16.05 on Ubuntu 14.04 LTS (package install)
>
> Is there a way to globally change the MARC framework on a batch of bib records, rather than one-by-one (perhaps by way of an SQL command)? I noticed that when uploading records from within MARCEdit via the Koha API, the records are imported under the original Default framework, rather than our custom framework.
>
> I know that you can using the Koha import tool. But I'm just wondering if there's another way without uploading a file.
>
> Many thanks!
>
> C
>
> Craig Butosi, MA, MLIS, B Mus (Hons.)
> LIBRARY SERVICES MANAGER
> the royal conservatory
> TELUS Centre for Performance and Learning
> 273 Bloor Street West
> Toronto, ON M5S 1W2
> 416.408.2824 x338
> www.rcmusic.ca<http://www.rcmusic.ca/>
>
>
>
> Note: This email message and any attachments are intended only for the use of the individual to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the recipient of this email is not the intended recipient (or the employee or agent responsible for delivering the email to the intended recipient), you are hereby notified that any review, dissemination, distribution or copying or other use of this message is strictly prohibited. If you have received this communication in error, please notify the sender immediately by return email and delete this message and attachments from your system, thank you.
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha

_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Koha 16.05 - Change MARC framework globally on batch of records?

Michael Kuhn
Hi Craig

Katrin wrote:

> it looks like the framework is stored in frameworkcode in the table
> biblio. It should be possible to change it with SQL as I think it
> doesn't get mapped to a MARC field at the moment.

Such an SQL statement would look like

UPDATE biblio SET frameworkcode="XX"

where XX is a frameworkcode that must exist in table "biblio_framework".
Since the above statement would change the framework of ALL records to
"XX" it may be necessary to use some WHERE clause like

UPDATE biblio SET frameworkcode="XX" WHERE biblionumber > 100000

or maybe

UPDATE biblio SET frameworkcode="XX" WHERE frameworkcode NOT IN ("XX", "FA")

Before applying such a change I would recommend to backup the database,
of course.

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E [hidden email] · W www.adminkuhn.ch
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Koha 16.05 - Change MARC framework globally on batch of records?

Joy Nelson-2
You can update the biblio table with the new framework, but any differences
between the old and new frameworks will not be represented in the
bibliographic record until you save that record in Koha (or use the
touch_all_biblios.pl script)

joy

On Tue, Mar 21, 2017 at 12:51 PM, Michael Kuhn <[hidden email]> wrote:

> Hi Craig
>
> Katrin wrote:
>
> it looks like the framework is stored in frameworkcode in the table
>> biblio. It should be possible to change it with SQL as I think it
>> doesn't get mapped to a MARC field at the moment.
>>
>
> Such an SQL statement would look like
>
> UPDATE biblio SET frameworkcode="XX"
>
> where XX is a frameworkcode that must exist in table "biblio_framework".
> Since the above statement would change the framework of ALL records to "XX"
> it may be necessary to use some WHERE clause like
>
> UPDATE biblio SET frameworkcode="XX" WHERE biblionumber > 100000
>
> or maybe
>
> UPDATE biblio SET frameworkcode="XX" WHERE frameworkcode NOT IN ("XX",
> "FA")
>
> Before applying such a change I would recommend to backup the database, of
> course.
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 · E [hidden email] · W www.adminkuhn.ch
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>



--
Joy Nelson
Director of Migrations

ByWater Solutions <http://bywatersolutions.com>
Support and Consulting for Open Source Software
Office: Fort Worth, TX
Phone/Fax (888)900-8944
What is Koha? <http://bywatersolutions.com/what-is-koha/>
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Koha 16.05 - Change MARC framework globally on batch of records?

Craig Butosi
Hi everyone,

Thanks to everyone who replied. This is exactly what I was looking for. I've tested <UPDATE biblio SET frameworkcode="XX" WHERE biblionumber = 'X'; > , opened the record, saw the framework had changed, then saved it, so the query seems to work fine on at least one record. Thanks Michael.

> or use the touch_all_biblios.pl script

Joy, are there any major risks involved in running this (very useful!) script? (There's always a risk, I know.) Looking at the output, the script reports:

Good: X, Bad: Y (of Z) in T seconds
Accuracy:  N%
Average time per record: T seconds

What would constitute a record going 'bad', say?

All best,

Craig Butosi, MA, MLIS, B Mus (Hons.)
LIBRARY SERVICES MANAGER
THE ROYAL CONSERVATORY
TELUS Centre for Performance and Learning
273 Bloor Street West
Toronto, ON M5S 1W2
416.408.2824 x338
www.rcmusic.ca

-----Original Message-----
From: Koha [mailto:[hidden email]] On Behalf Of Joy Nelson
Sent: March-21-17 8:18 AM
To: [hidden email]
Cc: Koha
Subject: Re: [Koha] Koha 16.05 - Change MARC framework globally on batch of records?

You can update the biblio table with the new framework, but any differences between the old and new frameworks will not be represented in the bibliographic record until you save that record in Koha (or use the touch_all_biblios.pl script)

joy

On Tue, Mar 21, 2017 at 12:51 PM, Michael Kuhn <[hidden email]> wrote:

> Hi Craig
>
> Katrin wrote:
>
> it looks like the framework is stored in frameworkcode in the table
>> biblio. It should be possible to change it with SQL as I think it
>> doesn't get mapped to a MARC field at the moment.
>>
>
> Such an SQL statement would look like
>
> UPDATE biblio SET frameworkcode="XX"
>
> where XX is a frameworkcode that must exist in table "biblio_framework".
> Since the above statement would change the framework of ALL records to "XX"
> it may be necessary to use some WHERE clause like
>
> UPDATE biblio SET frameworkcode="XX" WHERE biblionumber > 100000
>
> or maybe
>
> UPDATE biblio SET frameworkcode="XX" WHERE frameworkcode NOT IN ("XX",
> "FA")
>
> Before applying such a change I would recommend to backup the
> database, of course.
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg.
> Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil ·
> Schweiz T 0041 (0)61 261 55 61 · E [hidden email] · W
> www.adminkuhn.ch _______________________________________________
> Koha mailing list  http://koha-community.org [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>



--
Joy Nelson
Director of Migrations

ByWater Solutions <http://bywatersolutions.com> Support and Consulting for Open Source Software
Office: Fort Worth, TX
Phone/Fax (888)900-8944
What is Koha? <http://bywatersolutions.com/what-is-koha/>
_______________________________________________
Koha mailing list  http://koha-community.org [hidden email] https://lists.katipo.co.nz/mailman/listinfo/koha


Note: This email message and any attachments are intended only for the use of the individual to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the recipient of this email is not the intended recipient (or the employee or agent responsible for delivering the email to the intended recipient), you are hereby notified that any review, dissemination, distribution or copying or other use of this message is strictly prohibited. If you have received this communication in error, please notify the sender immediately by return email and delete this message and attachments from your system, thank you.
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Koha 16.05 - Change MARC framework globally on batch of records?

Joy Nelson-2
Craig-
The 'bad' records reported would indicate corrupted marc records.
ModBiblio will return 1 on success and 0 for no success.  The goodcount is
incremented when ModBiblio is successful with an update and the badcount is
updated when not successful.

Thanks
-Joy

On Tue, Mar 21, 2017 at 3:25 PM, Craig Butosi <[hidden email]>
wrote:

> Hi everyone,
>
> Thanks to everyone who replied. This is exactly what I was looking for.
> I've tested <UPDATE biblio SET frameworkcode="XX" WHERE biblionumber = 'X';
> > , opened the record, saw the framework had changed, then saved it, so the
> query seems to work fine on at least one record. Thanks Michael.
>
> > or use the touch_all_biblios.pl script
>
> Joy, are there any major risks involved in running this (very useful!)
> script? (There's always a risk, I know.) Looking at the output, the script
> reports:
>
> Good: X, Bad: Y (of Z) in T seconds
> Accuracy:  N%
> Average time per record: T seconds
>
> What would constitute a record going 'bad', say?
>
> All best,
>
> Craig Butosi, MA, MLIS, B Mus (Hons.)
> LIBRARY SERVICES MANAGER
> THE ROYAL CONSERVATORY
> TELUS Centre for Performance and Learning
> 273 Bloor Street West
> Toronto, ON M5S 1W2
> 416.408.2824 x338
> www.rcmusic.ca
>
> -----Original Message-----
> From: Koha [mailto:[hidden email]] On Behalf Of Joy
> Nelson
> Sent: March-21-17 8:18 AM
> To: [hidden email]
> Cc: Koha
> Subject: Re: [Koha] Koha 16.05 - Change MARC framework globally on batch
> of records?
>
> You can update the biblio table with the new framework, but any
> differences between the old and new frameworks will not be represented in
> the bibliographic record until you save that record in Koha (or use the
> touch_all_biblios.pl script)
>
> joy
>
> On Tue, Mar 21, 2017 at 12:51 PM, Michael Kuhn <[hidden email]> wrote:
>
> > Hi Craig
> >
> > Katrin wrote:
> >
> > it looks like the framework is stored in frameworkcode in the table
> >> biblio. It should be possible to change it with SQL as I think it
> >> doesn't get mapped to a MARC field at the moment.
> >>
> >
> > Such an SQL statement would look like
> >
> > UPDATE biblio SET frameworkcode="XX"
> >
> > where XX is a frameworkcode that must exist in table "biblio_framework".
> > Since the above statement would change the framework of ALL records to
> "XX"
> > it may be necessary to use some WHERE clause like
> >
> > UPDATE biblio SET frameworkcode="XX" WHERE biblionumber > 100000
> >
> > or maybe
> >
> > UPDATE biblio SET frameworkcode="XX" WHERE frameworkcode NOT IN ("XX",
> > "FA")
> >
> > Before applying such a change I would recommend to backup the
> > database, of course.
> >
> > Best wishes: Michael
> > --
> > Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg.
> > Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil ·
> > Schweiz T 0041 (0)61 261 55 61 · E [hidden email] · W
> > www.adminkuhn.ch _______________________________________________
> > Koha mailing list  http://koha-community.org [hidden email]
> > https://lists.katipo.co.nz/mailman/listinfo/koha
> >
>
>
>
> --
> Joy Nelson
> Director of Migrations
>
> ByWater Solutions <http://bywatersolutions.com> Support and Consulting
> for Open Source Software
> Office: Fort Worth, TX
> Phone/Fax (888)900-8944
> What is Koha? <http://bywatersolutions.com/what-is-koha/>
> _______________________________________________
> Koha mailing list  http://koha-community.org [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
> Note: This email message and any attachments are intended only for the use
> of the individual to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under
> applicable law. If the recipient of this email is not the intended
> recipient (or the employee or agent responsible for delivering the email to
> the intended recipient), you are hereby notified that any review,
> dissemination, distribution or copying or other use of this message is
> strictly prohibited. If you have received this communication in error,
> please notify the sender immediately by return email and delete this
> message and attachments from your system, thank you.
> _______________________________________________
> Koha mailing list  http://koha-community.org
> [hidden email]
> https://lists.katipo.co.nz/mailman/listinfo/koha
>



--
Joy Nelson
Director of Migrations

ByWater Solutions <http://bywatersolutions.com>
Support and Consulting for Open Source Software
Office: Fort Worth, TX
Phone/Fax (888)900-8944
What is Koha? <http://bywatersolutions.com/what-is-koha/>
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Loading...