Skip to main content

RenameTransformer

Rename metadata fields to different names.

Notesโ€‹

Storing values in an existing fieldโ€‹

If a target field with the same name already exists for a document, values will be added to the end of the existing value list. It is possible to change this default behavior by supplying a PropertySetter.

When using regular expressions, toField can also hold replacement patterns (e.g. $1, $2, etc).

Can be used both as a pre-parse or post-parse handler.

Examplesโ€‹

The above example renames a "dc.title" field to "title", overwriting any existing values in "title".

handler:
class: RenameTransformer
operations:
- toField: title
onSet: REPLACE
fieldMatcher:
method: REGEX
pattern: dc.title

Usageโ€‹

Full configuration skeleton, with every option and its default
class: RenameTransformer
label: string
operations:
- fieldMatcher: {}
onSet: APPEND
toField: string

Propertiesโ€‹

PropertyTypeRequiredDefault
labelstringNo-
operationsRenameOperation[]No-

Property Detailsโ€‹

labelโ€‹

An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing โ€” it exists purely to help identify this step, for example in large configurations or in the visual configurator.

operationsโ€‹

A list of DOM extraction operations to perform, each targeting a specific element selector and specifying what to extract and where to store it.