Print

Print


Thanks for that Don, that confirmed that I was looking at the right tables
and queries.

Much appreciated,
Rosalyn


On Wed, Apr 18, 2012 at 11:26 AM, Mennerich, Donald <
[log in to unmask]> wrote:
>
> 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
> [log in to unmask]<mailto:[log in to unmask]>
>
>
> From: Rosalyn Metz <[log in to unmask]<mailto:[log in to unmask]>>
> Date: Wed, Apr 18, 2012 at 9:23 AM
> Subject: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
> To: [log in to unmask]<mailto:[log in to unmask]>
>
>
> 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