talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Maintaining the CSID of vocabularies

CH
Chris Hoffman
Thu, May 10, 2012 8:26 PM

Hi,

As many of you know, when we import records into vocabularies, we have to provide a field called inAuth, which is the CSID for the vocabulary where the vocabulary item is going.  What is the best way to keep the same CSID in place for these vocabularies, so that we don't have to adjust our migration scripts every time we start up another round of testing and migration?  I know we can do a simple global replace each time, but it would be nice to rely on the same value for these inAuth identifiers.

Thanks,
Chris

Hi, As many of you know, when we import records into vocabularies, we have to provide a field called inAuth, which is the CSID for the vocabulary where the vocabulary item is going. What is the best way to keep the same CSID in place for these vocabularies, so that we don't have to adjust our migration scripts every time we start up another round of testing and migration? I know we can do a simple global replace each time, but it would be nice to rely on the same value for these inAuth identifiers. Thanks, Chris
RM
Richard Millet
Thu, May 10, 2012 10:53 PM

Chris,

If I'm understanding your question then...

Do the vocabularies you're importing items into already exist or do you
always create those first and then import the related items?  If you're
creating everything from scratch, you should be able to just use the same
CSID (UUID) for each round of migration/import.

In other words, if you're creating the vocabularies from scratch during each
migration then just create them with a known set of CSIDs(UUID)s and use
those in the "inAuthority" field of the items.  You can either create the
CSIDs yourself or just reuse the ones that you get from the Import service
after your first round.  With a good UUID generator, it is very, very
unlikely that you'll every have a name collision.

I hope that helps?

-Richard

-----Original Message-----
From: cspace-ucb-deployments-bounces@lists.berkeley.edu
[mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On Behalf Of
Chris Hoffman
Sent: Thursday, May 10, 2012 1:26 PM
To: cspace-ucb-deployments Deployment; CollectionSpace Talk List
Subject: [cspacedeploy] Maintaining the CSID of vocabularies

Hi,

As many of you know, when we import records into vocabularies, we have to
provide a field called inAuth, which is the CSID for the vocabulary where
the vocabulary item is going.  What is the best way to keep the same CSID in
place for these vocabularies, so that we don't have to adjust our migration
scripts every time we start up another round of testing and migration?  I
know we can do a simple global replace each time, but it would be nice to
rely on the same value for these inAuth identifiers.

Thanks,
Chris

Chris, If I'm understanding your question then... Do the vocabularies you're importing items into already exist or do you always create those first and then import the related items? If you're creating everything from scratch, you should be able to just use the same CSID (UUID) for each round of migration/import. In other words, if you're creating the vocabularies from scratch during each migration then just create them with a known set of CSIDs(UUID)s and use those in the "inAuthority" field of the items. You can either create the CSIDs yourself or just reuse the ones that you get from the Import service after your first round. With a good UUID generator, it is very, very unlikely that you'll every have a name collision. I hope that helps? -Richard -----Original Message----- From: cspace-ucb-deployments-bounces@lists.berkeley.edu [mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On Behalf Of Chris Hoffman Sent: Thursday, May 10, 2012 1:26 PM To: cspace-ucb-deployments Deployment; CollectionSpace Talk List Subject: [cspacedeploy] Maintaining the CSID of vocabularies Hi, As many of you know, when we import records into vocabularies, we have to provide a field called inAuth, which is the CSID for the vocabulary where the vocabulary item is going. What is the best way to keep the same CSID in place for these vocabularies, so that we don't have to adjust our migration scripts every time we start up another round of testing and migration? I know we can do a simple global replace each time, but it would be nice to rely on the same value for these inAuth identifiers. Thanks, Chris
PS
Patrick Schmitz
Fri, May 11, 2012 12:44 AM

The right answer long-term is that the inAuthority should be the shortId,
and not the CSID, of the parent authority.

In the mean time, I agree with Richard. Just set the CSID of your
authorities on import, and there's no problem.

Patrick

-----Original Message-----
From: cspace-ucb-deployments-bounces@lists.berkeley.edu
[mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On
Behalf Of Richard Millet
Sent: Thursday, May 10, 2012 3:53 PM
To: 'Chris Hoffman'; 'cspace-ucb-deployments Deployment';
'CollectionSpace Talk List'
Subject: Re: [cspacedeploy] Maintaining the CSID of vocabularies

Chris,

If I'm understanding your question then...

Do the vocabularies you're importing items into already exist
or do you always create those first and then import the
related items?  If you're creating everything from scratch,
you should be able to just use the same CSID (UUID) for each
round of migration/import.

In other words, if you're creating the vocabularies from
scratch during each migration then just create them with a
known set of CSIDs(UUID)s and use those in the "inAuthority"
field of the items.  You can either create the CSIDs yourself
or just reuse the ones that you get from the Import service
after your first round.  With a good UUID generator, it is
very, very unlikely that you'll every have a name collision.

I hope that helps?

-Richard

-----Original Message-----
From: cspace-ucb-deployments-bounces@lists.berkeley.edu
[mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On
Behalf Of Chris Hoffman
Sent: Thursday, May 10, 2012 1:26 PM
To: cspace-ucb-deployments Deployment; CollectionSpace Talk List
Subject: [cspacedeploy] Maintaining the CSID of vocabularies

Hi,

As many of you know, when we import records into
vocabularies, we have to provide a field called inAuth, which
is the CSID for the vocabulary where the vocabulary item is
going.  What is the best way to keep the same CSID in place
for these vocabularies, so that we don't have to adjust our
migration scripts every time we start up another round of
testing and migration?  I know we can do a simple global
replace each time, but it would be nice to rely on the same
value for these inAuth identifiers.

Thanks,
Chris

The right answer long-term is that the inAuthority should be the shortId, and not the CSID, of the parent authority. In the mean time, I agree with Richard. Just set the CSID of your authorities on import, and there's no problem. Patrick > -----Original Message----- > From: cspace-ucb-deployments-bounces@lists.berkeley.edu > [mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On > Behalf Of Richard Millet > Sent: Thursday, May 10, 2012 3:53 PM > To: 'Chris Hoffman'; 'cspace-ucb-deployments Deployment'; > 'CollectionSpace Talk List' > Subject: Re: [cspacedeploy] Maintaining the CSID of vocabularies > > Chris, > > If I'm understanding your question then... > > Do the vocabularies you're importing items into already exist > or do you always create those first and then import the > related items? If you're creating everything from scratch, > you should be able to just use the same CSID (UUID) for each > round of migration/import. > > In other words, if you're creating the vocabularies from > scratch during each migration then just create them with a > known set of CSIDs(UUID)s and use those in the "inAuthority" > field of the items. You can either create the CSIDs yourself > or just reuse the ones that you get from the Import service > after your first round. With a good UUID generator, it is > very, very unlikely that you'll every have a name collision. > > I hope that helps? > > -Richard > > > -----Original Message----- > From: cspace-ucb-deployments-bounces@lists.berkeley.edu > [mailto:cspace-ucb-deployments-bounces@lists.berkeley.edu] On > Behalf Of Chris Hoffman > Sent: Thursday, May 10, 2012 1:26 PM > To: cspace-ucb-deployments Deployment; CollectionSpace Talk List > Subject: [cspacedeploy] Maintaining the CSID of vocabularies > > Hi, > > As many of you know, when we import records into > vocabularies, we have to provide a field called inAuth, which > is the CSID for the vocabulary where the vocabulary item is > going. What is the best way to keep the same CSID in place > for these vocabularies, so that we don't have to adjust our > migration scripts every time we start up another round of > testing and migration? I know we can do a simple global > replace each time, but it would be nice to rely on the same > value for these inAuth identifiers. > > Thanks, > Chris > > >