Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to add customer headers to csv file in NIFI

avatar
Explorer

Hi,

 

I want to add headers to a csv file. I have used Replace text processor for this purpose.

But final output just append headers to the first line.

eg:

Sample :

2-Dec-15,Mumbai,120

Expected output :

date,city,temp
2-Dec-15,Mumbai,120

Output :

date,city,temp2-Dec-15,Mumbai,120

 

I have tried both ways by adding '\n' and 'shift+enter' after the header line

  id,name,site,score\n

  id,name,site,scoreshift+enter as the replacement value,

but no luck instead \n and shift+enter was taken as a value.

 

Could anyone help to resolve this issue.

1 ACCEPTED SOLUTION

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer

Thanks Matt for the quick response.