Re: Variable FlowFile Attributes Defined by FlowFile Content
Essentially all of the information contained in a FlowFile's contents would be translated to attributes. I would like to pass in a generic delimited file with two rows: - the first row contains header names, - the second row contains values for each header corresponding to a single entry. The use-case would take the header names as FlowFile keys, and the following line's values as values to the FlowFile keys. I will probably use ExecuteProcess or ExecuteStreamCommand if no built-in functionality exists Matt Burgess wrote > This is an interesting idea, can you elaborate on what such a file would > look like and how it would be used? Would it contain values to be used as > attributes in ExtractText as well as the content from which to extract the > values for these attributes? > > In general, I don't believe a property name can be defined dynamically > (Expression Language, e.g.) for processors like ExtractText, but NiFi > 0.5.0+ has ExecuteScript and InvokeScriptedProcessor, both of which offer > quite a bit of flexibility in these areas. > > Regards, > Matt -- View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Variable-FlowFile-Attributes-Defined-by-FlowFile-Content-tp8682p8756.html Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.
Re: Variable FlowFile Attributes Defined by FlowFile Content
This is an interesting idea, can you elaborate on what such a file would look like and how it would be used? Would it contain values to be used as attributes in ExtractText as well as the content from which to extract the values for these attributes? In general, I don't believe a property name can be defined dynamically (Expression Language, e.g.) for processors like ExtractText, but NiFi 0.5.0+ has ExecuteScript and InvokeScriptedProcessor, both of which offer quite a bit of flexibility in these areas. Regards, Matt On Thu, Mar 31, 2016 at 12:35 PM, dale.chang13 <dale.chan...@outlook.com> wrote: > I see that the ExtractText Processor performs regular expressions on the > FlowFile's content and adds the results as user-defined attributes. > However, > I was wondering if there was a way to avoid "hard-coding" these values. I > was hoping of something along the lines where the key literal of the > FlowFile attributes were defined in the FlowFile content. > > > > -- > View this message in context: > http://apache-nifi-developer-list.39713.n7.nabble.com/Variable-FlowFile-Attributes-Defined-by-FlowFile-Content-tp8682.html > Sent from the Apache NiFi Developer List mailing list archive at > Nabble.com. >
Variable FlowFile Attributes Defined by FlowFile Content
I see that the ExtractText Processor performs regular expressions on the FlowFile's content and adds the results as user-defined attributes. However, I was wondering if there was a way to avoid "hard-coding" these values. I was hoping of something along the lines where the key literal of the FlowFile attributes were defined in the FlowFile content. -- View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Variable-FlowFile-Attributes-Defined-by-FlowFile-Content-tp8682.html Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.