fgerlits commented on code in PR #1483:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1483#discussion_r1135687938
##########
PROCESSORS.md:
##########
@@ -589,91 +688,97 @@ In the list below, the names of required properties
appear in bold. Any other pr
### Description
-Executes a script given the flow file and a process session. The script is
responsible for handling the incoming flow file (transfer to SUCCESS or remove,
e.g.) as well as any flow files created by the script. If the handling is
incomplete or incorrect, the session will be rolled back. Scripts must define
an onTrigger function which accepts NiFi Context and Property objects. For
efficiency, scripts are executed once when the processor is run, then the
onTrigger method is called for each incoming flowfile. This enables scripts to
keep state if they wish, although there will be a script context per concurrent
task of the processor. In order to, e.g., compute an arithmetic sum based on
incoming flow file information, set the concurrent tasks to 1. The python
script files are expected to contain `describe(procesor)` and
`onTrigger(context, session)`.
+Executes a script given the flow file and a process session. The script is
responsible for handling the incoming flow file (transfer to SUCCESS or remove,
e.g.) as well as any flow files created by the script. If the handling is
incomplete or incorrect, the session will be rolled back.Scripts must define an
onTrigger function which accepts NiFi Context and Property objects. For
efficiency, scripts are executed once when the processor is run, then the
onTrigger method is called for each incoming flowfile. This enables scripts to
keep state if they wish, although there will be a script context per concurrent
task of the processor. In order to, e.g., compute an arithmetic sum based on
incoming flow file information, set the concurrent tasks to 1.
### 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.
| Name | Default Value | Allowable Values | Description
|
|-----------------------------|---------------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Script File | | | Path to
script file to execute. Only one of Script File or Script Body may be used
|
+| Script Body | | | Script to
execute. Only one of Script File or Script Body may be used
|
| Module Directory | | |
Comma-separated list of paths to files and/or directories which contain modules
required by the script |
| **Reload on Script Change** | true | | If true and
Script File property is used, then script file will be reloaded if it has
changed, otherwise the first loaded version will be used at all times. |
-| Script Body | | | Script to
execute
|
-| Script File | | | Path to
script file to execute. Only one of Script File or Script Body may be used
|
+
### Relationships
-| Name | Description |
-|---------|------------------|
-| failure | Script failures |
-| success | Script successes |
+| Name | Description |
+|---------|-----------------|
+| success | Script succeeds |
+| failure | Script fails |
-## ExecuteSQL
+## ExecuteScript
### Description
-Execute provided SQL query. Query result rows will be outputted as new flow
files with attribute keys equal to result column names and values equal to
result values. There will be one output FlowFile per result row. This processor
can be scheduled to run using the standard timer-based scheduling methods, or
it can be triggered by an incoming FlowFile. If it is triggered by an incoming
FlowFile, then attributes of that FlowFile will be available when evaluating
the query.
+Executes a script given the flow file and a process session. The script is
responsible for handling the incoming flow file (transfer to SUCCESS or remove,
e.g.) as well as any flow files created by the script. If the handling is
incomplete or incorrect, the session will be rolled back.Scripts must define an
onTrigger function which accepts NiFi Context and Property objects. For
efficiency, scripts are executed once when the processor is run, then the
onTrigger method is called for each incoming flowfile. This enables scripts to
keep state if they wish, although there will be a script context per concurrent
task of the processor. In order to, e.g., compute an arithmetic sum based on
incoming flow file information, set the concurrent tasks to 1.
+
### 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.
-| Name | Default Value | Allowable Values |
Description
|
-|----------------------------|---------------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **DB Controller Service** | | | Database
Controller Service.
|
-| **Max Rows Per Flow File** | 0 | | The
maximum number of result rows that will be included in a single FlowFile. This
will allow you to break up very large result sets into multiple FlowFiles. If
the value specified is zero, then all rows are returned in a single FlowFile.
|
-| **Output Format** | JSON-Pretty | JSON<br/>JSON-Pretty | Set the
output format type.
|
-| SQL select query | | | The SQL
select query to execute. The query can be empty, a constant value, or built
from attributes using Expression Language. If this property is specified, it
will be used regardless of the content of incoming flowfiles. If this property
is empty, the content of the incoming flow file is expected to contain a valid
SQL select query, to be issued by the processor to the database. |
+| Name | Default Value | Allowable Values | Description
|
+|-------------------|---------------|------------------|--------------------------------------------------------------------------------------------------------|
+| **Script Engine** | python | lua<br/>python | The engine to execute
scripts (python, lua)
|
+| Script File | | | Path to script file
to execute. Only one of Script File or Script Body may be used
|
+| Script Body | | | Body of script to
execute. Only one of Script File or Script Body may be used
|
+| Module Directory | | | Comma-separated list
of paths to files and/or directories which contain modules required by the
script |
+
### Relationships
-| Name | Description |
-|---------|----------------------------------------------------------|
-| success | Successfully created FlowFile from SQL query result set. |
-| failure | Flow files containing malformed sql statements |
+| Name | Description |
+|---------|------------------|
+| success | Script successes |
+| failure | Script failures |
-## ExecuteScript
+## ExecuteSQL
### Description
-Executes a script given the flow file and a process session. The script is
responsible for handling the incoming flow file (transfer to SUCCESS or remove,
e.g.) as well as any flow files created by the script. If the handling is
incomplete or incorrect, the session will be rolled back. Scripts must define
an onTrigger function which accepts NiFi Context and Property objects. For
efficiency, scripts are executed once when the processor is run, then the
onTrigger method is called for each incoming flowfile. This enables scripts to
keep state if they wish, although there will be a script context per concurrent
task of the processor. In order to, e.g., compute an arithmetic sum based on
incoming flow file information, set the concurrent tasks to 1.
+ExecuteSQL to execute SELECT statement via ODBC.
Review Comment:
fixed in f43e7ef373d2f4579b76e199b92d2a339df5cfd4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]