[Archivesspace_Users_Group] Accession CSV Subject Import

Maura Carbone mauraa at brandeis.edu
Tue Apr 7 10:45:06 EDT 2015


Hi Brian,
I found that one all right, but is there another file that would have to be
edited? Looking at that file I can't see where the 'labels' are linked to
the data types, so I was assuming there was another file that does that.
For example, the first half has labels for date_1:

'date_1_label' => 'date_1.label',
'date_1_expression' => 'date_1.expression',
'date_1_begin' => 'date_1.begin',
'date_1_end' => 'date_1.end',
'date_1_type' => 'date_1.date_type',

and then the date object creator is:

     :date_1 => {
        :record_type => :date,
        :defaults => date_defaults,
        :on_row_complete => Proc.new { |queue, date|
          queue.select {|obj| obj.class.record_type == 'accession'}.each do
|accession|
            accession.dates << date
          end
        }

so I thought there must be a file mapping the date_1 labels to the date
object fields in the schema?


Thanks,
Maura

On Mon, Apr 6, 2015 at 9:11 PM, brian <brianjhoffman at gmail.com> wrote:

> Hi Maura,
>
> Here's the base converter file for accession csv.
>
>
> https://github.com/archivesspace/archivesspace/blob/master/backend/app/converters/accession_converter.rb
>
>
> Brian
>
>
>
> Sent from my T-Mobile 4G LTE Device
>
>
> -------- Original message --------
> From: Maura Carbone <mauraa at brandeis.edu>
> Date:04/06/2015 3:35 PM (GMT-05:00)
> To: Archivesspace Users Group <
> archivesspace_users_group at lyralists.lyrasis.org>
> Cc:
> Subject: Re: [Archivesspace_Users_Group] Accession CSV Subject Import
>
> Hi Chris,
> Any progress on that example? I actually tried to work on it myself, but
> I'm not entirely sure which files need to be altered (aside from
> accession_converter). Ideally, I want to be able to import multiple
> subjects and multiple agents -- I was hoping to copy the date setup (where
> there are multiple dates date1 date2 etc.) but I haven't found the file
> where the terms (such as date_label_1) are mapped to the date object (and
> so on for subject and agents etc.)
>
> Thanks!
> Maura
>
> On Tue, Mar 31, 2015 at 4:03 PM, Maura Carbone <mauraa at brandeis.edu>
> wrote:
>
>> What I was doing was:
>> subject_source,subject_term_type,subject_term,subject_source,subject_term_type,subject_term, Unspecified
>> ingested source,Topical,Pepperoni,Unspecified ingested
>> source,Topical,Cheese. Then only Cheese gets created and imported.
>>
>> Yeah, and I can take a look at how the importer works now as well, I just
>> wasn't sure if it was a known issue, or if there was a specific reason for
>> it.
>>
>> Thanks!
>> Maura
>>
>> On Tue, Mar 31, 2015 at 3:29 PM, Chris Fitzpatrick <
>> Chris.Fitzpatrick at lyrasis.org> wrote:
>>
>>>  Hi Maura,
>>>
>>>
>>>  So, you're just adding more subject columns to the CSV? Yes, what you
>>> describe about overwriting is exactly what's happening...the CSV importer
>>> only allows for one subject per row.
>>>
>>>
>>>  I have a plugin example I started working on last week to show how to
>>> tweak the CSV importer...I'll try and finish that up tomorrow and send it
>>> out for people to have a look...
>>>
>>>
>>>  b,chris.
>>>
>>>
>>>   Chris Fitzpatrick | Developer, ArchivesSpace
>>> Skype: chrisfitzpat  | Phone: 918.236.6048
>>> http://archivesspace.org/
>>>    ------------------------------
>>> *From:* archivesspace_users_group-bounces at lyralists.lyrasis.org <
>>> archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of
>>> Maura Carbone <mauraa at brandeis.edu>
>>> *Sent:* Tuesday, March 31, 2015 7:06 PM
>>> *To:* Archivesspace Users Group
>>> *Subject:* [Archivesspace_Users_Group] Accession CSV Subject Import
>>>
>>>  Hi all,
>>> I've been working on importing accessions with CSV files, but I've
>>> noticed that on import only one subject ever gets brought in (the last
>>> one). Is this a bug, or just a current limitation? I'm not getting an
>>> error, it just appears that the subject field keeps being over-written
>>> until the last subject, then imported.
>>>
>>>  Thanks,
>>> Maura
>>>
>>>  --
>>>  Maura Carbone
>>> Digital Initiatives Librarian
>>> Brandeis University
>>> Library and Technology Services
>>> (781) 736-4659
>>> 415 South Street, (MS 017/P.O. Box 549110)
>>> Waltham, MA 02454-9110
>>> email: mauraa at brandeis.edu
>>>
>>> _______________________________________________
>>> Archivesspace_Users_Group mailing list
>>> Archivesspace_Users_Group at lyralists.lyrasis.org
>>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>>
>>>
>>
>>
>> --
>> Maura Carbone
>> Digital Initiatives Librarian
>> Brandeis University
>> Library and Technology Services
>> (781) 736-4659
>> 415 South Street, (MS 017/P.O. Box 549110)
>> Waltham, MA 02454-9110
>> email: mauraa at brandeis.edu
>>
>
>
>
> --
> Maura Carbone
> Digital Initiatives Librarian
> Brandeis University
> Library and Technology Services
> (781) 736-4659
> 415 South Street, (MS 017/P.O. Box 549110)
> Waltham, MA 02454-9110
> email: mauraa at brandeis.edu
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>


-- 
Maura Carbone
Digital Initiatives Librarian
Brandeis University
Library and Technology Services
(781) 736-4659
415 South Street, (MS 017/P.O. Box 549110)
Waltham, MA 02454-9110
email: mauraa at brandeis.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150407/9c36579b/attachment.html>


More information about the Archivesspace_Users_Group mailing list