Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This processor allows the execution of custom scripts.

Configuration

{
  "language" type": "script-processor",
  "name": "Scripting",
  "description": "Description about script",
  "labels": {},
  "active": true,
  "config": {
    "language": "groovy",
    "script" : "println \"RECORD (Groovy):\" + data\nout.put(\"data\", \"data-\"+data.findField(\"c2:/contentId\").get().asText())\nout.put(\"record\", \"record-\"+record.id)\nprintln \"NEW:\" + out",
  "name" : "Scripting",
  "type" : "scripting"
}
}

Configuration Parameters

...

script (Required, String) code to process each record.

name (Required, String) component name.

description (Optional, String) description about component.

Data Cache

The Data Cache is a simple Map<String, Object> structure shared with all jobs in the same seed execution.

...