Expand my Community achievements bar.

SOLVED

Bulk Metadata Import - Append Mode?

Avatar

Level 1

Hello!

 

We are working on updating a few metadata properties on assets spread through a variety of folders in our DAM. Most metadata properties have been easy to address by replacing asset metadata in bulk using a CSV file; however, we're running into complications with tags. Instead of appending the new tag to these assets, the bulk metadata import replaces the existing tags with the new one. Is there a way to append metadata when using the bulk importer? We regularly use the 'append mode' when bulk editing metadata in one folder, but the assets we're working on are distributed throughout the DAM. 

Thank you in advance for your thoughts and advice!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi,

 

I'm pretty sure you can't append using the CSV upload.

 

You may have to download the metadata for these images, or for all images.

 

Then do some Excel manipulation to only leave the images you need to update, and only the metadata fields you want to update.

 

Hopefully then it's relatively easy to add your additional metadata entries.

It'll test your Excel expertise

 

Then you can upload that CSV file to make the update in AEM.

 

 

 

View solution in original post

6 Replies

Avatar

Correct answer by
Level 3

Hi,

 

I'm pretty sure you can't append using the CSV upload.

 

You may have to download the metadata for these images, or for all images.

 

Then do some Excel manipulation to only leave the images you need to update, and only the metadata fields you want to update.

 

Hopefully then it's relatively easy to add your additional metadata entries.

It'll test your Excel expertise

 

Then you can upload that CSV file to make the update in AEM.

 

 

 

Avatar

Community Advisor

I can confirm and would like to add: excel power query was very helpful when I had to clean up the tags.

It helped me a lot. Big time.

Avatar

Community Advisor

@ap-ap Have you tried tagging assets using , (comma) or | (pipe) as a separator in your excel file? The metadata field header should be of type {{String: multi }} in your CSV file.

 

 

 

Avatar

Community Advisor

So you export the tags and receive something like this:
Asset path; cq:tags
/dam/bla/bla; bodypart:hands|department:sport;
This asset contains two tags.
If you want it to contain another, you can not overwrite these values but you can add to them by using the pipe symbol bodypart:hands|department:sport|activities:running|season:summer
Excel is your friend with this but i couldn't have done it with excel alone since we had a loooot.
Excel Power Query saved me.

Avatar

Level 1

Thank you all for the help and great responses! As appending isn't an option, we ended up using Excel, as many of you had also suggested. 

 

For anyone else looking to address this issue in the future, the approach we settled on is as follows: 

  1. Export assetPath and existing cq:tags{{String:multi }}
  2. Add a blank column before cq:tags. Insert any new desired tags here. 
  3. In column D, use the formula =B2&"|"&C2 to prepend the new tags to existing. Keep values in D, erasing B & C. 
  4. Bulk metadata import to add the new tags. 

Thank you all again!

Avatar

Community Advisor

By using the power query function - i made myself some shortcuts and a way to reproduce the outcome with a simple change of the source csv file.
I created multiple functions that check the filename or even better the asset path for information fragments and then created additional columns that then became new tags.
In the end i created a bunch of functions that combine the all the new columns, after checking if the new tag is already there - so we don't have multiple entries of the same tag.
Next time i need to do something similar, i can simply reload my power query editor and change the scource file csv.

Table.SplitColumn(#"Replaced Value.2", "themes", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), {"themes.sports.1", "themes.sports.2", "themes.sports.3", "themes.sports.4", "themes.sports.5", "themes.sports.6", "themes.sports.7", "themes.sports.8", "themes.sports.9", "themes.sports.10"})
Table.AddColumn(#"Changed Type", "tags.sports.1", 
	each if [themes.sports.1] = null then null 
        else if Text.Contains([assetPath], "athletes") 
		then "lifestyle-asset-type:marketing-picture/athletes" 
	else if Text.Contains([assetPath], "campaign-images") 
		then "lifestyle-asset-type:marketing-picture/campaign" 
	else if Text.Contains([assetPath], "content-images") 
		then "lifestyle-asset-type:marketing-picture/content" 
	else if Text.Contains([assetPath], "event-pictures") 
		then "lifestyle-asset-type:marketing-picture/events" 
	else if Text.Contains([assetPath], "key-visual-content") 
		then "lifestyle-asset-type:marketing-picture/key-visual" 
	etc... 
	else null, type text)

I hope this gives people ideas ;D