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
| Property | Type | Required | Description |
|---|---|---|---|
sourceKey | String | Yes | The metadata field name from the source (e.g., "Make", "TIT2", "General - Title") |
customMetadataProperty | String | Yes | The target custom attribute property name OR special field name |
createNewContentRecord | Boolean | No | For tag/collection fields, whether to auto-create missing records (default: false) |
splitByDelimiter | String | No | Delimiter to split source values into multiple values (e.g., ",", ";", "|") |
Example Mapping
{
"sourceKey": "Keywords",
"customMetadataProperty": "tags",
"createNewContentRecord": true,
"splitByDelimiter": ","
}This mapping will:
- Extract the
Keywordsfield from the source metadata - Split the value by comma (e.g., "tag1, tag2, tag3" → ["tag1", "tag2", "tag3"])
- For each value, find or create a tag (because
createNewContentRecordis true) - Attach all tags to the asset
Special Target Properties
These target properties have special handling and are not stored in customProperties:
| Target Property | Description | Auto-Create Support | Notes |
|---|---|---|---|
tags | Asset tags | Yes | Controlled by createNewContentRecord flag |
collections | Asset collections | No | Collections are never auto-created |
language | Asset language | No | Must match existing language GUID |
createdDate | Asset creation date | N/A | Overwrites system creation date |
lastModifiedDate | Asset last modified date | N/A | Overwrites 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 titlefalse- 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
splitByDelimiteris 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 Type | Validation | Example Source Values | Notes |
|---|---|---|---|
String/Text | Any value accepted | "Sample text", "123" | Converted to string |
Number | Must be numeric | "42", "3.14", 42 | Parsed to number |
Boolean | Must be true/false | "true", "false", true, false | Case-insensitive |
Date | Must be valid date | "2024-03-15", "2024-03-15T00:00:00Z" | ISO 8601 format |
DateTime | Must be valid date/time | "2024-03-15T14:30:00Z" | ISO 8601 format |
Lookup | Must match existing record | "Option A" (by title) or GUID | Exact match |
MultiSelect | Array 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 Type | Behavior | Logging |
|---|---|---|
| Type mismatch | Field skipped | Warning logged with details |
| Missing custom attribute | Field skipped or error | Controlled by mergeMissingMetadataFields |
| Invalid lookup value | Field skipped | Warning logged |
| Tag creation failure | Tag skipped | Warning logged |
| Invalid date format | Field skipped | Warning logged |
| Null/empty required field | Field skipped | Warning 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.
