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

.* doesn't work in nifi

.* doesn't work in nifi

I'm trying to convert whole of flowfile content into an attribute.

Regex I'm using is '.*'. for this I'm using extractText.I have enabled multiline option as well but it only captures first line of flowfile. How can this be resolved.

2 REPLIES 2

Re: .* doesn't work in nifi

Re: .* doesn't work in nifi

Super Guru
@Ashwini Gupta

Configure ExtractText processor as below:

Enable DOTALL Mode

true

Enable Multiline Mode

true

And you need configure `Maximum Buffer Size,Maximum Capture Group Length` property values based on your flowfile size and how much you are trying to extract.

Add new property as

content

(.*)

Then check the content attribute will have all the content of flowfile as attribute value.

**But i recommend not to keep entire content as attribute value because all attributes are hold in memory this will cause performance issues in NiFi.

Refer to this link for more details regards to keeping too many attributes in the flow.