Support Questions
Find answers, ask questions, and share your expertise

how to apply NiFi expression language on flow file content?

Please help me with below scenarios.

  1. I have a flow file with a single record as data. Is there a way to apply expression language on content of flow file if I want to add a new flow file attribute using update attribute?

    in my current approach I'm using extract text to assign the entire row as an attribute and then using update attribute to add new attribute with EL. I feel like it is not a correct approach. Please suggest a better way to do this.

  2. Also, Can we add one flow file's attribute to another flow file? ex: I want to extract some part of filename attribute of flow file A and use that to add an attribute for flow file B.
1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to apply NiFi expression language on flow file content?

1) You can not apply EL to the content of a flow file, this is by design, The approach you mentioned with ExtractText is correct.

2) You might be able to do this with a custom processor, or possibly somehow using the distributed cache services, but in general a processor is operating on one flow file at a time.

View solution in original post

2 REPLIES 2

Re: how to apply NiFi expression language on flow file content?

1) You can not apply EL to the content of a flow file, this is by design, The approach you mentioned with ExtractText is correct.

2) You might be able to do this with a custom processor, or possibly somehow using the distributed cache services, but in general a processor is operating on one flow file at a time.

View solution in original post

Re: how to apply NiFi expression language on flow file content?

Explorer

Hi, Hanu V

Can u please share the attributes example or flow file as an example to explain how extract text to assign the entire row as an attribute ???

I am searching for it from a while.