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.

nifi dataflow - get result, parse it, and save to file

Solved Go to solution

nifi dataflow - get result, parse it, and save to file

New Contributor

Hello,

I want to create data flow to execute external command, get result from it, put it to file, parse it and save result to new file.

Can it be done using build-in processors? Or I should write my own?

For example I see that I can use: PutFile, ExecuteProcess,

but for parsing file using regexp expressions for example, I don't know how to do it.

Thank you very much for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: nifi dataflow - get result, parse it, and save to file

Expert Contributor

Take a look at the ExtractText processor and see if it meets your needs:

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExtractText/in...

4 REPLIES 4
Highlighted

Re: nifi dataflow - get result, parse it, and save to file

Expert Contributor

Take a look at the ExtractText processor and see if it meets your needs:

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ExtractText/in...

Re: nifi dataflow - get result, parse it, and save to file

New Contributor

14935-screenshot-from-2017-04-28-18-38-12.png

I can't find where to add regexp patterns here.

Re: nifi dataflow - get result, parse it, and save to file

Master Guru
@Gu Gur

You can right click on any NiFi processor and select "usage" to get the complete documentation on that processor. Any processor documentation that states it supports "Dynamic Properties" will allow you to add additional properties in the documented format.

To add an additional property simply click on the following icon on the properties tab:

14917-screen-shot-2017-04-28-at-20131-pm.png

Thanks,

Matt

Re: nifi dataflow - get result, parse it, and save to file

Expert Contributor

@Gu Gur And just to add a little detail to Matt's comment, from the documentation,

Regular Expressions are entered by adding user-defined properties; the name of the property maps to the Attribute Name into which the result will be placed.

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