RecordReaderFactory
Implementations: CSVReader
JsonPathReader
AvroReader
CEFReader
Syslog5424Reader
JsonTreeReader
WindowsEventLogReader
XMLReader
SyslogReader
JASN1Reader
ReaderLookup
ParquetReader
GrokReader
ScriptedReader
YamlTreeReader
ExcelReader
Supports Sensitive Dynamic Properties: No
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
A RecordPath that identifies which field(s) to update | The new name to assign to the Record field | Allows users to specify a new name for each field that matches the RecordPath. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Name | Description |
---|---|
failure | If a FlowFile cannot be transformed from the configured input format to the configured output format, the unchanged FlowFile will be routed to this relationship |
success | FlowFiles that are successfully transformed will be routed to this relationship |
Name | Description |
---|---|
record.index | This attribute provides the current row index and is only available inside the literal value expression. |
Rename a field in each Record to a specific, known name.
Configure the 'Record Reader' according to the input format.
Configure the 'Record Writer' according to the desired output format.
Add a property to the Processor such that the name of the property is a RecordPath to identifies the field to rename. The value of the property is the new name of the property.
For example, to rename the name
field to full_name
, add a property with a name of /name
and a value of full_name
.
Many properties can be added following this pattern in order to rename multiple fields.
Rename a field in each Record to a name that is derived from a FlowFile attribute.
Configure the 'Record Reader' according to the input format.
Configure the 'Record Writer' according to the desired output format.
Add a property to the Processor such that the name of the property is a RecordPath to identifies the field to rename. The value of the property is an Expression Language expression that can be used to determine the new name of the field.
For example, to rename the addr
field to whatever value is stored in the preferred_address_name
attribute, add a property with a name of /name
and a value of ${preferred_address_name}
.
Many properties can be added following this pattern in order to rename multiple fields.
Rename a field in each Record to a new name that is derived from the current field name.
This might be used, for example, to add a prefix or a suffix to some fields, or to transform the name of the field by making it uppercase.
Configure the 'Record Reader' according to the input format.
Configure the 'Record Writer' according to the desired output format.
Add a property to the Processor such that the name of the property is a RecordPath to identifies the field to rename. The value of the property is an Expression Language expression that references the field.name
property.
For example, to rename all fields with a prefix of pre_
, we add a property named /*
and a value of pre_${field.name}
. If we would like this to happen recursively, to nested fields as well, we use a property name of //*
with the value of pre_${field.name}
.
To make all field names uppercase, we can add a property named //*
with a value of ${field.name:toUpper()}
.
Many properties can be added following this pattern in order to rename multiple fields.