Re: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
Hi. Is there a reason not to attempt this instead through the CLI? Al Matthews, Software Dev, Atlanta University Center From: Code for Libraries [CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Rosalyn Metz [rosalynm...@gmail.com] Sent: Wednesday, April 18, 2012 9:23 AM To: CODE4LIB@LISTSERV.ND.EDU Subject: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL Hi Everyone, I posted this over on the Archivists' Toolkit listserv and got no response (yet), so I thought I might try here as well. I have a large quantity (around 300+) of digital objects that I need to add to Archivists' Toolkit. I think I've figured out what queries I need to run in order to do this in MySQL (rather than the interface) but I wanted to get opinions from the peanut gallery before trying it out on my test instance. It seems that there are actually two update queries that need to be used when creating a Digital Object. They are: insert into ArchDescriptionInstances (instanceType, resourceComponentId, resourceId, parentResourceId, instanceDescriminator, archDescriptionInstancesId) values ('Digital object', 336673, null, 543, 'digital', 22567003) and... insert into DigitalObjects (version, lastUpdated, created, lastUpdatedBy, createdBy, title, dateExpression, dateBegin, dateEnd, languageCode, restrictionsApply, eadDaoActuate, eadDaoShow, metsIdentifier, objectType, label, objectOrder, componentId, parentDigitalObjectId, archDescriptionInstancesId, repositoryId) values (0, '2012-04-17 12:05:15', '2012-04-17 12:05:15', 'username', 'username', 'title', '1938-1959', null, null, '', 0, 'onRequest', 'new', '678.1829', 'text', '', 0, '', null, 22567003, 1) There also appears to be some update queries as well, but I'm guessing that they are less important (please correct me if I'm wrong). Has anyone tried to do this in the past? If so do you have scripts that will create Digital Objects for you that you wouldn't mind sharing? Is there anything you think I should know before testing this out in my test instance of AT? Any caveats for me? Any help anyone can provide would be greatly appreciated. Thanks, Rosalyn - ** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** IronMail scanned this email for viruses, vandals and malicious content. ** **
Re: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
Al, Looking at the CLI quickly it looks like its related to batch exporting. I'm trying to quickly create +1500 new digital object records in AT (ie. go into a resource, click new instance, choose digital object, add the title, add the mets identifier, click save). If I misread what the CLI does, then I'm all ears on how I could use it to help. Thanks! Rosalyn On Wed, Apr 18, 2012 at 11:13 AM, Al Matthews amatth...@auctr.edu wrote: Hi. Is there a reason not to attempt this instead through the CLI? Al Matthews, Software Dev, Atlanta University Center From: Code for Libraries [CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Rosalyn Metz [rosalynm...@gmail.com] Sent: Wednesday, April 18, 2012 9:23 AM To: CODE4LIB@LISTSERV.ND.EDU Subject: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL Hi Everyone, I posted this over on the Archivists' Toolkit listserv and got no response (yet), so I thought I might try here as well. I have a large quantity (around 300+) of digital objects that I need to add to Archivists' Toolkit. I think I've figured out what queries I need to run in order to do this in MySQL (rather than the interface) but I wanted to get opinions from the peanut gallery before trying it out on my test instance. It seems that there are actually two update queries that need to be used when creating a Digital Object. They are: insert into ArchDescriptionInstances (instanceType, resourceComponentId, resourceId, parentResourceId, instanceDescriminator, archDescriptionInstancesId) values ('Digital object', 336673, null, 543, 'digital', 22567003) and... insert into DigitalObjects (version, lastUpdated, created, lastUpdatedBy, createdBy, title, dateExpression, dateBegin, dateEnd, languageCode, restrictionsApply, eadDaoActuate, eadDaoShow, metsIdentifier, objectType, label, objectOrder, componentId, parentDigitalObjectId, archDescriptionInstancesId, repositoryId) values (0, '2012-04-17 12:05:15', '2012-04-17 12:05:15', 'username', 'username', 'title', '1938-1959', null, null, '', 0, 'onRequest', 'new', '678.1829', 'text', '', 0, '', null, 22567003, 1) There also appears to be some update queries as well, but I'm guessing that they are less important (please correct me if I'm wrong). Has anyone tried to do this in the past? If so do you have scripts that will create Digital Objects for you that you wouldn't mind sharing? Is there anything you think I should know before testing this out in my test instance of AT? Any caveats for me? Any help anyone can provide would be greatly appreciated. Thanks, Rosalyn - ** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** IronMail scanned this email for viruses, vandals and malicious content. ** **
[CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
Hi Everyone, I posted this over on the Archivists' Toolkit listserv and got no response (yet), so I thought I might try here as well. I have a large quantity (around 300+) of digital objects that I need to add to Archivists' Toolkit. I think I've figured out what queries I need to run in order to do this in MySQL (rather than the interface) but I wanted to get opinions from the peanut gallery before trying it out on my test instance. It seems that there are actually two update queries that need to be used when creating a Digital Object. They are: insert into ArchDescriptionInstances (instanceType, resourceComponentId, resourceId, parentResourceId, instanceDescriminator, archDescriptionInstancesId) values ('Digital object', 336673, null, 543, 'digital', 22567003) and... insert into DigitalObjects (version, lastUpdated, created, lastUpdatedBy, createdBy, title, dateExpression, dateBegin, dateEnd, languageCode, restrictionsApply, eadDaoActuate, eadDaoShow, metsIdentifier, objectType, label, objectOrder, componentId, parentDigitalObjectId, archDescriptionInstancesId, repositoryId) values (0, '2012-04-17 12:05:15', '2012-04-17 12:05:15', 'username', 'username', 'title', '1938-1959', null, null, '', 0, 'onRequest', 'new', '678.1829', 'text', '', 0, '', null, 22567003, 1) There also appears to be some update queries as well, but I'm guessing that they are less important (please correct me if I'm wrong). Has anyone tried to do this in the past? If so do you have scripts that will create Digital Objects for you that you wouldn't mind sharing? Is there anything you think I should know before testing this out in my test instance of AT? Any caveats for me? Any help anyone can provide would be greatly appreciated. Thanks, Rosalyn
Re: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
Rosalyn, I've written a number of scripts of this nature. Here's a quick one I wrote recently to add DAOs to our AT for an audio digitization project (note it does not include file versions, just Components, Instances and DAOs). It starts at the ResourceComponent identified by the long at the top of the script. The resourceId is also hard-coded in a number of places. I've got some tidier Java that runs as part of a automated process for a large digitization project, but all the basic Inserts are in this: https://github.com/yalemssa/ATK_DAO_Scripts/blob/master/components_atk.groovy Don Mennerich donald.menner...@yale.edumailto:donald.menner...@yale.edu From: Rosalyn Metz rosalynm...@gmail.commailto:rosalynm...@gmail.com Date: Wed, Apr 18, 2012 at 9:23 AM Subject: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL To: CODE4LIB@listserv.nd.edumailto:CODE4LIB@listserv.nd.edu Hi Everyone, I posted this over on the Archivists' Toolkit listserv and got no response (yet), so I thought I might try here as well. I have a large quantity (around 300+) of digital objects that I need to add to Archivists' Toolkit. I think I've figured out what queries I need to run in order to do this in MySQL (rather than the interface) but I wanted to get opinions from the peanut gallery before trying it out on my test instance. It seems that there are actually two update queries that need to be used when creating a Digital Object. They are: insert into ArchDescriptionInstances (instanceType, resourceComponentId, resourceId, parentResourceId, instanceDescriminator, archDescriptionInstancesId) values ('Digital object', 336673, null, 543, 'digital', 22567003) and... insert into DigitalObjects (version, lastUpdated, created, lastUpdatedBy, createdBy, title, dateExpression, dateBegin, dateEnd, languageCode, restrictionsApply, eadDaoActuate, eadDaoShow, metsIdentifier, objectType, label, objectOrder, componentId, parentDigitalObjectId, archDescriptionInstancesId, repositoryId) values (0, '2012-04-17 12:05:15', '2012-04-17 12:05:15', 'username', 'username', 'title', '1938-1959', null, null, '', 0, 'onRequest', 'new', '678.1829', 'text', '', 0, '', null, 22567003, 1) There also appears to be some update queries as well, but I'm guessing that they are less important (please correct me if I'm wrong). Has anyone tried to do this in the past? If so do you have scripts that will create Digital Objects for you that you wouldn't mind sharing? Is there anything you think I should know before testing this out in my test instance of AT? Any caveats for me? Any help anyone can provide would be greatly appreciated. Thanks, Rosalyn