0

I want to add headers to a csv file, to it I have used given instrcutions here. Nifi: how to add custom header to CSV file, I have used Replace text processor and changed parameters as given here.

But final output just append headers to the first line.

Sample :

1,sachith,SO,1587

Expected output :

id,name,site,score
1,sachith,SO,1587

Output :

id,name,site,score,1,sachith,SO,1587

Should I use another processor or is there a missing conf?

4
  • 1
    just add a new line at the end of the replacement value Commented Nov 5, 2019 at 9:14
  • I have used id,name,site,score\n as the replacement value, but still same. \n was taken as a value. Commented Nov 5, 2019 at 9:24
  • 1
    Instead of \n, type shift+enter after your header line. Commented Nov 5, 2019 at 10:06
  • That worked. Can you please post this as an answer I can accept it. Commented Nov 5, 2019 at 10:23

1 Answer 1

1

Instead of using \n, use shift+enter after header line

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

1 Comment

thanks a lot, i searched thru the entire internet and only this answer is valid!

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.