Metadata Mapping Reference

Shared reference for metadata import mapping configuration used across all metadata sources

Metadata Mapping Reference

This reference document describes the mapping configuration used by all metadata import systems in Nomad Media, including:

  • Sidecar metadata files
  • EXIF metadata (images)
  • ID3 tags (audio)
  • Video metadata (MediaInfo)
  • Document properties

Mapping Configuration Model

All metadata import configurations use the MetadataImportModel class to define how source metadata maps to asset attributes.

Mapping Properties

PropertyTypeRequiredDescription
sourceKeyStringYesThe metadata field name from the source (e.g., "Make", "TIT2", "General - Title")
customMetadataPropertyStringYesThe target custom attribute property name OR special field name
createNewContentRecordBooleanNoFor tag/collection fields, whether to auto-create missing records (default: false)
splitByDelimiterStringNoDelimiter to split source values into multiple values (e.g., ",", ";", "|")

Example Mapping

{
  "sourceKey": "Keywords",
  "customMetadataProperty": "tags",
  "createNewContentRecord": true,
  "splitByDelimiter": ","
}

This mapping will:

  1. Extract the Keywords field from the source metadata
  2. Split the value by comma (e.g., "tag1, tag2, tag3" → ["tag1", "tag2", "tag3"])
  3. For each value, find or create a tag (because createNewContentRecord is true)
  4. Attach all tags to the asset

Special Target Properties

These target properties have special handling and are not stored in customProperties:

Target PropertyDescriptionAuto-Create SupportNotes
tagsAsset tagsYesControlled by createNewContentRecord flag
collectionsAsset collectionsNoCollections are never auto-created
languageAsset languageNoMust match existing language GUID
createdDateAsset creation dateN/AOverwrites system creation date
lastModifiedDateAsset last modified dateN/AOverwrites system modified date

All other target properties are treated as custom attributes and must match a propertyName in the Asset Metadata definition.

Tag Auto-Creation

The createNewContentRecord flag controls tag creation behavior per mapping:

{
  "sourceKey": "Keywords",
  "customMetadataProperty": "tags",
  "createNewContentRecord": true
}
  • true - Missing tags will be automatically created with the string value as the title
  • false - Only existing tags will be matched; warnings logged for missing tags

This provides fine-grained control over which metadata sources can create new tags.

Value Splitting

The splitByDelimiter property allows splitting a single source value into multiple values:

{
  "sourceKey": "Keywords",
  "customMetadataProperty": "tags",
  "createNewContentRecord": true,
  "splitByDelimiter": ","
}

Common delimiters:

  • "," - Comma (most common)
  • ";" - Semicolon
  • "|" - Pipe
  • " " - Space

Example:

  • Source value: "landscape, sunset, mountains"
  • After splitting: ["landscape", "sunset", "mountains"]
  • Each value is processed separately and attached to the asset

Notes:

  • If splitByDelimiter is null or empty, the value is not split
  • Whitespace is automatically trimmed from each split value
  • Empty values after splitting are ignored

Type Validation and Conversion

The system automatically validates and converts metadata values to match the target field type:

Target TypeValidationExample Source ValuesNotes
String/TextAny value accepted"Sample text", "123"Converted to string
NumberMust be numeric"42", "3.14", 42Parsed to number
BooleanMust be true/false"true", "false", true, falseCase-insensitive
DateMust be valid date"2024-03-15", "2024-03-15T00:00:00Z"ISO 8601 format
DateTimeMust be valid date/time"2024-03-15T14:30:00Z"ISO 8601 format
LookupMust match existing record"Option A" (by title) or GUIDExact match
MultiSelectArray of values["Tag1", "Tag2"]Each value validated

Type Mismatch Handling:

  • Type mismatches are logged as warnings
  • The field is skipped (not imported)
  • Processing continues with remaining fields

Lookup Resolution

For lookup and multiselect fields, the system supports two matching methods:

1. By GUID (Exact Match)

{
  "contentRating": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

2. By Title (String Match)

{
  "contentRating": "PG-13"
}

Matching Rules:

  • Title matching is case-sensitive and must be exact
  • If a GUID is provided, it must match an existing record ID
  • If a title is provided, it's matched against the record's title field
  • Invalid GUIDs or unmatched titles are logged as warnings and skipped

Error Handling

The system provides comprehensive error handling for all metadata processing:

Error TypeBehaviorLogging
Type mismatchField skippedWarning logged with details
Missing custom attributeField skipped or errorControlled by mergeMissingMetadataFields
Invalid lookup valueField skippedWarning logged
Tag creation failureTag skippedWarning logged
Invalid date formatField skippedWarning logged
Null/empty required fieldField skippedWarning logged

All processing is logged with:

  • Source metadata field and value
  • Target property and type
  • Validation results
  • Conversion results
  • Tag/collection creation results
  • Any errors or warnings

Check CloudWatch logs for the asset processing Lambda functions to troubleshoot issues.