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.