Skip to main content

UuidTransformer

Generates a random Universally unique identifier

Notes

Generates a random Universally unique identifier (UUID) and stores it in the specified field. If no field is provided, the UUID will be added to document.uuid.

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.

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

Examples

The following example generates a UUID and stores it in a "uuid" field, overwriting any existing values under that field.

handler:
class: UuidTransformer
toField: uuid
onSet: REPLACE

Usage

Full configuration skeleton, with every option and its default
class: UuidTransformer
label: string
onSet: APPEND
toField: string

Properties

PropertyTypeRequiredDefault
labelstringNo-
onSetenumNo-
toFieldstringNodocument.uuid

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.

onSet

What to do if a target field of the same name already exist.

Allowed Values

  • APPEND
  • PREPEND
  • REPLACE
  • OPTIONAL

toField

A target field name used to store the value.