RecordReaderFactory
Implementations: CEFReader
SyslogReader
ReaderLookup
ProtobufReader
Syslog5424Reader
CSVReader
GrokReader
WindowsEventLogReader
ScriptedReader
AvroReader
ParquetReader
JsonPathReader
ExcelReader
JsonTreeReader
YamlTreeReader
XMLReader
The Record Reader to use parsing the incoming FlowFile into Records | Record Writer | Record Writer | | Controller Service API: RecordSetWriterFactory Implementations: JsonRecordSetWriter RecordSetWriterLookup AvroRecordSetWriter XMLRecordSetWriter FreeFormTextRecordSetWriter CSVRecordSetWriter ParquetRecordSetWriter ScriptedRecordSetWriter | The Record Writer to use for serializing Records after they have been transformed |
Script Language | Script Engine | Groovy | - Clojure
- ECMAScript
- Groovy
- lua
- python
- ruby
| The Language to use for the script |
Script Body | Script Body | | | Body of script to execute. Only one of Script File or Script Body may be used |
Script File | Script File | | | Path 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) |
Module Directory | Module Directory | | | Comma-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: file, directory.
Supports Expression Language: true (will be evaluated using variable registry only) |
Relationships:
Name | Description |
---|
success | FlowFiles that are successfully partitioned will be routed to this relationship |
failure | If a FlowFile cannot be partitioned from the configured input format to the configured output format, the unchanged FlowFile will be routed to this relationship |
original | Once all records in an incoming FlowFile have been partitioned, the original FlowFile is routed to this relationship. |
Reads Attributes:
None specified.Writes Attributes:
Name | Description |
---|
partition | The partition of the outgoing flow file. If the script indicates that the partition has a null value, the attribute will be set to the literal string "<null partition>" (without quotes). Otherwise, the attribute is set to the String representation of whatever value is returned by the script. |
mime.type | Sets the mime.type attribute to the MIME Type specified by the Record Writer |
record.count | The number of records within the flow file. |
record.error.message | This attribute provides on failure the error message encountered by the Reader or Writer. |
fragment.index | A one-up number that indicates the ordering of the partitioned FlowFiles that were created from a single parent FlowFile |
fragment.count | The number of partitioned FlowFiles generated from the parent FlowFile |
State management:
This component does not store state.Restricted:
Required Permission | Explanation |
---|
execute code | Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has. |
System Resource Considerations:
None specified.See Also:
ScriptedTransformRecord, ScriptedValidateRecord, ScriptedFilterRecord