Info: This plug-in is part of a set of sample plug-ins that is shipped with Assest Server. For more information, see Elvis 6 sample plug-ins.
With the metadata import plug-in you can merge metadata from spreadsheet files with assets already imported on the server. This plug-in can be used in combination with the bulk import to migrate from another DAM system, for example Canto Cumulus or Extensis Portfolio.
Note: This bundled plug-in is supported for production use.
The metadata import plug-in has a slightly different configuration when compared to the other import plug-ins. Default configuration includes server settings, input- and output folders and a few options to tweak the plug-in, which are all described in the configuration file.
The metadata import plug-in requires you to define mappings from spreadsheet fields to fields in Assets Server. You can map to custom metadata fields as well. The mappings can be configured in the <metadata_import>/field-mappings.xml file.
<?xml version="1.0" encoding="UTF-8"?> <mapping> <!-- Standard fields --> <field nameInElvis="tags" metadataColumnName="Keywords" multivalue="true"/> <field nameInElvis="credit" metadataColumnName="Credit"/> <field nameInElvis="source" metadataColumnName="Source"/> <field nameInElvis="title" metadataColumnName="Title"/> <field nameInElvis="description" metadataColumnName="Description"/> <field nameInElvis="created" metadataColumnName="Catalogued"/> <!-- Custom fields --> <field nameInElvis="cf_itemId" metadataColumnName="Item ID"/> <field nameInElvis="cf_filmSerie" metadataColumnName="Film/series"/> <field nameInElvis="cf_people" metadataColumnName="People"/> <field nameInElvis="cf_cdTitle" metadataColumnName="CD Title"/> <field nameInElvis="cf_cdNumber" metadataColumnName="CD number"/> <field nameInElvis="cf_originallyCatalogued" metadataColumnName="Catalogued"/> </mapping>
Each mapping is defined as a field element. The field element defines 3 possible attributes:
- nameInElvis: This is the internal field name as defined in Assets Server, all fields are listed in the asset info report (required).
- metadataColumnName: The column name of the field in the spreadsheet (required).
- multivalue: Whether or not this field is multivalue field (optional, default=false).
Custom assetinfo configuration
Custom Assets Server fields used in the field mappings need to be defined in custom-assetinfo.xml.
Creating the metadata files
The metadata import plug-in expects either CSV or XLS (format 97-2004) as input files. Some systems provide a way to export metadata as CSV/XLS. If the user wants to merge metadata from such a system into Assets Server, the user should export at least the columns defined in the field mappings and the user should provide a column with the asset paths as defined in Assets Server.
The input spreads should always define a header with the column names.
One way to do this is to either import the CSV into Excel, or open the Excel sheet in Excel. After that, the import paths need to be determined and put into a new column in the sheet. This column should have the column name defined as assetPath in the header. The user could also make some more manual adjustments in the sheet.
When ready, the sheet can be saved as XLS or CSV, however it is preferable to save it as an XLS (format 97-2004).
A sample metadata Excel file is packaged with the plug-in.
Running the plug-in
- Use the bulk import to import files into Assets Server and make sure the folder structure matches the paths you will use for assetPath in the metadata input.
- Put your metadata input files in the plug-in's import folder, defined as importFolderPath in the plug-in config file.
- Start the plug-in from the plug-in admin in the client or, if the plug-in has been scheduled, wait until the scheduled time.
- The plug-in will split the input files into smaller parts in the folder temp/processing called tabledata-xx+xx.xml
- The tabledata files will be processed by the plug-in 1-by-1.
- For each row found in the metadata input, the plug-in will try to find an existing asset in Assets Server.
- If the asset is found, the metadata for the row will be merged with the metadata already defined in Assets Server. The metadata already in Assets Server will be overwritten with the metadata from the input.
- If the asset is not found in Assets Server, the row will added to the corresponding failed file in the failed folder. This allows the user to review any failed rows after the imports are done, to determine while a file failed and whether the user can fix the row to make the import succeed later. After reviewing and updating the failed file, it can be dropped into the input folder, after which it can be processed again.
- The imports can be processed as many times as needed to make sure all the imported metadata is correct.