Using Metadata Import and Export in AEM Assets metadata-import-and-export

Learn how to use the import and export metadata features of Adobe Experience Manager Assets. The import and export capabilities allow content authors to bulk update metadata for existing assets.

Metadata Export metadata-export

Transcript
Let’s take a look at AEM Assets Export Metadata. For this, we’ll need to navigate to Assets, Files, and we’ll want to pick at least one folder whose Assets Metadata we’d like to export. So I’ll select Activities as well as People. If we go to the top action bar, we now have an Export Metadata option. When exporting Metadata, the first thing we need to do is specify the CSV file name for the exported data. The next option is include assets in sub-folders. This is an important yet often overlooked checkbox. If this is left unchecked, only assets that are directly contained in the folders that we selected for export will be included in our Metadata export. In our case, the Activities and People folders don’t have any direct assets, all of the assets in them are actually in sub-folders. So, we want to make sure that we have this checkbox checked. We have the option to run the export job now or immediately, or we can schedule it for a Later date.
I’ll keep it set to Now. And lastly, we can configure the properties to be exported. By default, all properties for the assets will be exported, but we also have the option to selectively pick the properties to export. So, if I select the Selective option, I can pick which properties should be included in the Metadata export. So, for instance, I can select dc:creator, as well as dc:contributor.
It’s worth noting if any of the assets whose Metadata is being exported do not have these properties, these columns will not show up on our report. For this video, we’ll be using the default All option and we can run our Export, to export our Metadata. When the export is complete, Admin Inbox will get a notification, and from here we can download the CSV file.
Alternatively, heading back to AEM, Assets, Jobs, we’ll have a listing of all the Metadata Export jobs that have been run, along with some descriptive data, like the paths that were exported; the start date; end date; and the number of assets whose Metadata was exported, as well as if the export was a success or a failure. So the last thing we’ll do is just open up our CSV file. As you can see, we have all sorts of Metadata that’s been exported for our assets. The first row of the Metadata defines the properties, and each subsequent row represents an asset. So, we can see that row 2 represents the Metadata for our activities/running/marathon-shoes, and as we scroll across, we can see all of the different Metadata attributes, that are assigned in AEM for this asset.

Metadata Import metadata-import

Transcript
In this video, we’re going to be covering AEM Assets metadata import capability. With the metadata import feature, Asset users can import metadata into AEM from a CSV file, making it much easier to bulk update metadata for a large number of assets. First let’s navigate to the adventures folder which contains the assets we would like to update. Clicking into one of the subfolders and viewing the properties of one of the images, we can see that the copyright field under the advanced tab is blank.
Let’s perform a bulk update to all of the images in the adventures folder and subfolders to contain the same copyright information. Since there are over 70 images in these folders, performing this manually would take some time. Instead, we will use the metadata import feature. Let’s take a look at the CSV file that we will be using for our bulk metadata update. The first row in the CSV file begins with asset path and contains all of the metadata properties that will be updated. Note that the asset path is the absolute path of the asset’s location in AEM. The other column names correspond to the metadata property and its type. The rows below point to the individual assets and the corresponding property values. Note that the asset values are case sensitive. Property value can be left empty, and the metadata property for that asset will not be added or modified. Constructing the CSV file from scratch can also be time-consuming. It’s often easier to first do a metadata export of the files and properties you want to update. The CSV file I have opened was generated using the export metadata feature. Here we see that every asset has been given the value copyright WKND Site in the DC rights column. Now let’s import the CSV file to AEM Assets. Click on the create button, select the metadata option, and upload the CSV file. We can either import the metadata now or specify a later date and time to execute the import. We will import the metadata now. This form allows us to override some of the default import settings. We can override what column includes the asset path, choose columns to ignore, and customize which characters are used as delimiters and separators. The default value for batch size is 50, but it can be decreased or increased up to 100. When we click import, an asynchronous job runs in the background performing the bulk asset metadata import. Once the job is complete, users get notified via the AEM inbox. Clicking this inbox notification, we see that the metadata import feature is complete. Here we see a record of the input CSV file and the results CSV. The results CSV file will include an additional column to know the status of the individual assets metadata update. This will be either a success or fail value. Reviewing the results CSV, we can see that all of the assets were successfully updated.
Finally, let’s navigate back to our asset in the adventures folder and take a look at the metadata properties. The asset now displays the updated copyright information. -
NOTE
When preparing a CSV file to import, it is easier to generate a CSV with the list of assets by using the Metadata Export feature. You can then modify the generated CSV file and import it using the Import feature.

Metadata CSV File Format metadata-file-format

First Row

  • The first row of the CSV file defines the metadata schema.

  • The First column defaults to assetPath, which holds the absolute JCR Path for an asset.

  • Subsequent columns in the first-row point to other metadata properties of an asset.

    • For example : dc:title, dc:description, jcr:title
  • Single Value Property format

    • <metadata property name> {{<property type}}
    • If property type is not specified, it defaults to String.
    • For example: dc:title {{String}}
  • Property Name is case-sensitive

    • Correct : dc:title {{String}}
    • Incorrect: Dc:Title {{String}}
  • Property Type is case insensitive

  • All valid JCR Property types are supported

  • Multi Value Property format - <metadata property name> {{<property type : MULTI }}

Second Row to N rows

  • The first column holds the absolute JCR path for an asset. For example: /content/dam/asset1.jpg
  • Metadata property for an asset could have missing values in the CSV file. Missing metadata properties for that particular asset are not updated.
recommendation-more-help
a483189e-e5e6-49b5-a6dd-9c16d9dc0519