[ https://issues.apache.org/jira/browse/NIFI-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356536#comment-17356536 ]
Jon Kessler commented on NIFI-8634: ----------------------------------- I don't believe they evaluate ExpressionLanguage but the ReaderLookup and RecordSetWriterLookup controller services introduced by https://issues.apache.org/jira/browse/NIFI-5829 get you pretty close to this requirement. > Create Controller Services that allows user to choose between Record > Readers/Writers based on Expression Language > ----------------------------------------------------------------------------------------------------------------- > > Key: NIFI-8634 > URL: https://issues.apache.org/jira/browse/NIFI-8634 > Project: Apache NiFi > Issue Type: New Feature > Components: Extensions > Reporter: Mark Payne > Priority: Major > > Typically when a user builds a flow, the user must choose a JSON Reader, CSV > Reader, JSON Writer, CSV Writer, etc. whatever makes sense for their use case. > The downside to this approach is that it makes it difficult to build a flow > is more generically distributable. > We should create a RecordReaderLookup service and a RecordWriterLookup > service. Each would have a single well-known property for the name of the > Record Reader/Writer service to use. User-defined properties would then be > used to define those Record Readers/Writers. > For example, one might configure RecordReaderLookup as such: > {code:java} > Selected Reader: #{DataFOrmat} > csv: CSVReader > json: JsonTreeReader > avro: AvroReader {code} > In this case, CSVReader, JsonTreeReader, and AvroReader are other Record > Reader Controller Services. Now, a parameter can be defined with the name > {{DataFormat}}. If that parameter has a value of {{csv}}, the CSVReader would > be used. If the parameter has a value of {{json}}, the JsonTreeReader would > be used, and so forth. > Same principle would be followed for the Record Writer. -- This message was sent by Atlassian Jira (v8.3.4#803005)