Import media to existing items

Hi!

I have my own installations of Omeka S (in Swedish) and it works great. I am testing to import but have some issues:

  1. I am using CSV Import
  2. I am importing a simple CSV with first a ID (that is for example ‘T26’) - I am adding it to Dublin Core field “identifier”, second column is a Title - adding it to Dublin Core Title. (I am adding my ID to Identifier field to be able to match the media I want to import later.)
  3. All the 2200 posts are coming in - fine! Adding media is the next step:
  4. Second csv file (with media url:s) contains ID (for example ‘T26’) and second coloumn is a URL to the file.
  5. I selecting, in CSV Import, to append and match my ID to Identifier field to match the media to the right item.

But I am only having errors. I seems like Identifier can’t be used?

(If I am checking the post id for the item and writing it in the media file it will match item with media).

Best!
//Staffan

Hi - To be clear, you are selecting a Media import on the first screen (where you upload your spreadsheet), and then picking two columns on the Mapping screen (one for URL and one for Identifier)?

If you are using “Append” then this probably is the problem. What you should be doing is a Media import where you Create a new resource, not an Item or Media import where you “append” media to the item.

media

Hi!

" you are selecting a Media import on the first screen (where you upload your spreadsheet), and then picking two columns on the Mapping screen (one for URL and one for Identifier)?"
Yes!

“you should be doing is a Media import where you Create a new resource”
aha!

I will try
Thanks!!
//Staffan

Hi

Didn´t work I am afraid. I am getting:
2023-02-28T18:12:57+00:00 INFO (6): The following identifiers are not associated with a resource and were skipped: “T1”, “T2”, “T3”, “T4”, “T5”, “T6”, “T7”, “T8”, “T9”, “T10”, “T11”, “T12”, “T13”, “T14”, “T15”, “T16”, “T17”, “T18”, “T19”, “T20”.

This is how I am importing:
{
“filename”: “files3.csv”,
“filesize”: “239787”,
“filepath”: “/tmp/omekawds5Oh”,
“media_type”: “text/csv”,
“resource_type”: “media”,
“comment”: “”,
“automap_check_names_alone”: false,
“column-property”: [
{
“dcterms:identifier”: 10
}
],
“column-data-type”: [
“literal”,
“literal”,
“literal”
],
“column-media_source”: {
“2”: “url”
},
“generic-data”: “default”,
“media-source”: “default”,
“o:resource_template”: “”,
“o:resource_class”: “”,
“o:owner”: “”,
“o:is_public”: 1,
“multivalue_separator”: “,”,
“global_language”: “”,
“action”: “update”,
“identifier_column”: 0,
“identifier_property”: “dcterms:identifier”,
“action_unidentified”: “skip”,
“rows_by_batch”: 20,
“column-multivalue”: [],
“delimiter”: “;”,
“enclosure”: “"”,
“escape”: “\”
}

Kind Regards,
//Staffan

And, do you have items already loaded into the site currently that have those identifiers, T1, etc.? The info line there is saying that CSV Import didn’t find any items with matching identifiers to what you specified in the sheet.

I think you’ve said that you do already have those items with the right identifiers loaded in… can you show a screenshot of the item show page for, say, the one with the “T1” identifier?

Hi

"And, do you have items already loaded into the site currently that have those identifiers, T1, etc.? "
Yes, it has T1 in Identifier field

“The info line there is saying that CSV Import didn’t find any items with matching identifiers to what you specified in the sheet.”
Yes, very strange.

“I think you’ve said that you do already have those items with the right identifiers loaded in… can you show a screenshot of the item show page for, say, the one with the “T1” identifier?”

Yes, see attached

this is how I do it:

Ah, great. I was going to ask you to show the import process also and I see you’ve done that.

You just have one problem with how you’re doing the import: you’ve mapped the identifier column wrong. What you’re doing in the video you posted is mapping it as identifier, i.e. telling the importer you want to set that column’s data as the dcterms:identifier field for the media you’re creating.

Instead, you want to be mapping it as the property to look up to find the each new Media’s parent item. Instead of being under that first “Egenskaper” section in the sidebar, the one you want is listed under the second option, “Media-specific data”, and will let you pick a property from a dropdown (you’ll pick Identifier/Identifierare there). When that’s done, it should be listed in the mappings table as “Item [dcterms:identifier]” as shown in Allana’s screenshot above.

ah! So great! Thanks!!

It worked! Super thanks - excellent!

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.