blob: 5ebbe9c7a10cde13058e47f6503e7877edc728ae [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>SimpleScriptedLookupService</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">SimpleScriptedLookupService</h1><h2>Description: </h2><p>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.</p><h3>Tags: </h3><p>lookup, script, invoke, groovy, python, jython, jruby, ruby, javascript, js, lua, luaj</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Script Engine</strong></td><td id="default-value">ECMAScript</td><td id="allowable-values"><ul><li>ECMAScript <img src="../../../../../html/images/iconInfo.png" alt="ECMAScript ECMA - 262 Edition 5.1 [Oracle Nashorn 1.8.0_345-b01]" title="ECMAScript ECMA - 262 Edition 5.1 [Oracle Nashorn 1.8.0_345-b01]"></img></li></ul></td><td id="description">The engine to execute scripts</td></tr><tr><td id="name">Script File</td><td></td><td id="allowable-values"></td><td id="description">Path to script file to execute. Only one of Script File or Script Body may be used<br/><br/><strong>This property requires exactly one file to be provided..</strong><br/><br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Script Body</td><td></td><td id="allowable-values"></td><td id="description">Body of script to execute. Only one of Script File or Script Body may be used</td></tr><tr><td id="name">Module Directory</td><td></td><td id="allowable-values"></td><td id="description">Comma-separated list of paths to files and/or directories which contain modules required by the script.<br/><br/><strong>This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file.</strong><br/><br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3><table id="restrictions"><tr><th>Required Permission</th><th>Explanation</th></tr><tr><td>execute code</td><td>Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has.</td></tr></table><h3>System Resource Considerations:</h3>None specified.</body></html>