1

I am trying to extract only the headers from the csv file using Nifi. I am new to Nifi and I am not much used to the processors. I am trying to use GetFile->ExtractText->PutFile to get the header line and just output that into a different directory. And this is my regex used inside the ExtractText: ^(.*)\n

1 Answer 1

3

Use ReplaceText processor to get the header attribute value into flowfile content.

Configs:

enter image description here

Replacement Value
${extract_text_attribute_name} //change this to your attribute name

Sample Flow: enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, this helped me to understand. I was able to figure out.
@Shu why do we need ReplaceText processor here, could you please explain? I have a similar requirement and I did not understand this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.