You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Lee Laim <le...@gmail.com> on 2015/10/04 02:24:52 UTC

expression language: flowfile contents

Hey Everyone,

Is there a built-in language expression to represent the flowfile contents?


In my case, I have an incoming flowfile to an executeStreamCommand
processor.  The flowfile contains data that I would like to use as an
argument in the processor.

an example:

    flowfile(contents:'-ltra') ->

    execute stream command (command: ls, arguments:
'{flowfile_contents}'...) ->

    new flowfile (contents:  of 'ls -ltra'  ).

I feel like I could use flowfile-> extractText->  updateAttribute ->
executeStreamCommand  to accomplish the same thing, but often, the contents
happen to be the attributes.


Thanks,
Lee

Re: expression language: flowfile contents

Posted by Rick Braddy <rb...@softnas.com>.
Lee,

>From what I have seen, the expression language is for attributes only and doesn't operate on FlowFile content directly. 

Your ExtractText flow seems appropriate.

Rick

> On Oct 3, 2015, at 7:25 PM, Lee Laim <le...@gmail.com> wrote:
> 
> Hey Everyone,
> 
> Is there a built-in language expression to represent the flowfile contents?  
> 
> In my case, I have an incoming flowfile to an executeStreamCommand processor.  The flowfile contains data that I would like to use as an argument in the processor.
> 
> an example:
> 
>     flowfile(contents:'-ltra') ->
> 
>     execute stream command (command: ls, arguments: '{flowfile_contents}'...) -> 
> 
>     new flowfile (contents:  of 'ls -ltra'  ).  
>    
> I feel like I could use flowfile-> extractText->  updateAttribute -> executeStreamCommand  to accomplish the same thing, but often, the contents happen to be the attributes.
> 
> 
> Thanks,  
> Lee 
> 
>