Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

csv file is breaking because of some data

Hi ,

 

I am trying to generate csv file after querying records..but csv is not generated properly as expected ...please find below screen shot...please suggest how to overcome this issue ?

 

0683p000009M5l0.png

check at line no : 55 the same record but it has email data which is breaking csv file..so could you please tell how to over come this

Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi,

 

   Even though it seems that lines are breaking for a human reader, since they are enclosed within Text enclosure characters, it will be processed properly by Talend program. But if you want to remove the line breaks, you can do it by passing the data as a string and removing all line breaks using replaceAll java function within a tMap.

 

   My only suggestion will be to change the text enclosure characters to a rare combination instead of normal double quotes. There are chances that double quotes may come as value also within email. So if you change the text enclosure character combination to a rare value set, you won't have any issues.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

in tfileoutputdelimited :---------

in CSV options 

i have set 

  Escape char  : "\""

  Text Enclosure :  "\"" 

 

  will it handle if my data has double quotes ?

 

or i need o use Escape char as  : """  and Text enclosure as : """

 

can u please suggest ?

Anonymous
Not applicable
Author

Hi,

 

   If you are using Escape char as  : """  and Text enclosure as : """, make sure that data also is not having the same character. You can use other combinations like |"| or $#$ etc. also but again the thumb rule remains same.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂