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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading CSV file which have new line with blank columns

Hi,
I have CSV file which has a new line in middle of the column and the rest of the data in that row has gone to next line.
because of which i am facing issue while loading the data into DB.
please see the below screen shot.
I need to remove the spaces after column with data "MANJUN" and append the rest of the data after it.


Thanks,
Tulasi
Labels (4)
25 Replies
Anonymous
Not applicable
Author

please open file in notepad then locate the row which causing the problem. 
Anonymous
Not applicable
Author

I know the line numbers of the row which are causing the problem.
Anonymous
Not applicable
Author

then would you like to share that line with us?
Anonymous
Not applicable
Author

0683p000009MD6w.jpgThanks,
Tulasi
Anonymous
Not applicable
Author

Can you please provide a solution since it is urgent
Anonymous
Not applicable
Author

design job as below, 
tFileInputFullRow----tjavarow---textractDelmitedField---youroutput. 
in tJavaRow add following code to replace multiple white spaces with one space. 
yourcolumn.replaceAll("+", " ");

Note: please make copy of source file before doing test. 
Anonymous
Not applicable
Author

Hi Umesh,
I test above code with sample data.It's not removing new line in string.Pls see attached pics.
1st image have sample data.
2nd image talend generated output.

0683p000009MCtL.png  0683p000009MD71.png
Regards,
kumar.talend
Anonymous
Not applicable
Author

Hi Tulasi,
Use below code in tamp:
row1.Customer_name.replaceAll("\\r\\n|\\r|\\n", " ") (Replace row1.Customer_name with your  column)..See attached screen

0683p000009MD7B.png
Regards,
kumar.talend
Anonymous
Not applicable
Author

Hi Kumar.Talend, 
Thank you for testing it, but you tested it with wrong data. 
As I asked Tulsi earlier, if he show us raw data of file then we can suggest, the images he shared previously showing from excel open view. 
he has to open same file in notepad or notepad++ and then locate the problematic row. then take snap and share with us. 

Either your file row delimiter is different? 
Column has long spaces. 
may be Filed delimiter is different? 
or anything else. 
please share the actual data not the created one, last solution provided to replace multiple white spaces with single one. 
_AnonymousUser
Specialist III
Specialist III

Hi Umesh,
I have attached the screen shot of the file. i am attaching i once again.
The screen shot i have attached is the one form the notepad++ only.
The delimited file is tab separated.
Thanks,
Tulasi