SimpleScriptedLookupService

Description:

Allows the user to provide a scripted LookupService instance in order to enrich records from an incoming flow file. The script is expected to return an optional string value rather than an arbitrary object (record, e.g.). Also the scripted lookup service should implement StringLookupService, otherwise the getValueType() method must be implemented even though it will be ignored, as SimpleScriptedLookupService returns String as the value type on the script's behalf. Please note that due to a bug in Jython that remains unresolved, it is not possible to use Jython to write a script for this service in Python.

Tags:

lookup, script, invoke, groovy, python, jython, jruby, ruby, javascript, js, lua, luaj

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Script EngineScript EngineNo Script Engines found
Script FileScript FilePath to script file to execute. Only one of Script File or Script Body may be used

This property requires exactly one file to be provided..

Supports Expression Language: true (will be evaluated using variable registry only)
Script BodyScript BodyBody of script to execute. Only one of Script File or Script Body may be used
Module DirectoryModule DirectoryComma-separated list of paths to files and/or directories which contain modules required by the script.

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file.

Supports Expression Language: true (will be evaluated using variable registry only)

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
Script Engine Binding propertyBinding property value passed to Script RunnerUpdates a script engine property specified by the Dynamic Property's key with the value specified by the Dynamic Property's value
Supports Expression Language: true (will be evaluated using variable registry only)

State management:

This component does not store state.

Restricted:

Required PermissionExplanation
execute codeProvides operator the ability to execute arbitrary code assuming all permissions that NiFi has.

System Resource Considerations:

None specified.