Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

.* doesn't work in nifi

Highlighted

.* doesn't work in nifi

New Contributor

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

New Contributor

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.

Don't have an account?
Coming from Hortonworks? Activate your account here