Apache NiFi RecordPath Guide
Also available as:
PDF

base64Encode

Converts a String or byte[] using Base64 encoding, using the UTF-8 character set. For example, given a schema such as:

{
  "type": "record",
  "name": "events",
  "fields": [
    { "name": "name", "type": "string" }
  ]
}

and a record such as:

{
  "name" : "John"
}

The following record path expression would encode the String using Base64:

RecordPath

Return value

base64Encode(/name)

Sm9obg==