[ 
https://issues.apache.org/jira/browse/NIFI-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17357492#comment-17357492
 ] 

Mark Payne commented on NIFI-8634:
----------------------------------

Wow, I completely missed that. Thanks [~jsizzle]! I thought we had something 
like that but i couldn't find it so i figured I was wrong. I think it's because 
it was called ReaderLookup instead of RecordReaderLookup that I was overlooking 
it. Will close this Jira.

> 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)

Reply via email to