Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Data with one value per line conversation to csv not working

avatar
Explorer

Hello everyone,

 

i have data which has only one value per line, often not even a header. My goal is to conert the data to csv and format it afterwards (remove the comments and add some columns).

 

Example base data:

#This is my base data#

#################

value1

value2

value3

 

Example finished data:

value-description, source, timestamp

value1, source1, 984359345

value2, source1, 98249732

value3, source1, 984u9834

 

Right now I'm able to achieve the output if I have an input which is already in a CSV format (comma separated). But if I try is with the example data above the output is the following:

 

header-descriptionvalue1value2value3

 

This happens after the ReplaceText processor which should delete blank lines. The source and timestamp column is not yet added. This is the config of the processor:

 

I am glad about every response. 

 

Best regards

Maurice

 

 

1 ACCEPTED SOLUTION

avatar
Explorer

Solved. Ihad the settings in the csv writer wrong.

View solution in original post

1 REPLY 1

avatar
Explorer

Solved. Ihad the settings in the csv writer wrong.