Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using flowfile content

Tags:

apache-nifi

New to NiFi!

I've split a flowfile into a single line of text using splitJSON processor.

The NiFi flowfile contents are as follows:

abcdefg

I'd like to be able to take the text in the flowfile and either add it to a url to make a subsequent call using InvokeHTTP or add the contents of the flowfile as an attribute so I can make the subsequent call using InvokeHTTP like so

http://localhost/${my.newly.added.attribute}

How do i do this?

Any help would be appreciated! Thanks in advance!

like image 959
BigBug Avatar asked May 04 '26 06:05

BigBug


1 Answers

ExtractText will allow you to find sections of content and place in an attribute on the FlowFile. For your example, you could capture the entirety of the content and assign to an attribute my.newly.added.attribute. InvokeHTTP would then access it using Expression Language 2 as in your example.

like image 199
apiri Avatar answered May 07 '26 09:05

apiri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!