0
votes

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?

1
just add a new line at the end of the replacement value - daggett
I have used id,name,site,score\n as the replacement value, but still same. \n was taken as a value. - Sachith Muhandiram
Instead of \n, type shift+enter after your header line. - Pushkr
That worked. Can you please post this as an answer I can accept it. - Sachith Muhandiram

1 Answers

1
votes

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