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

[resolved] how to replace in a field when the row separator is also

Hello,
I have a delimited file (field separator "\t", row separator "\n") looking like :
1 \tblue \tapple \n
2 \tred \n
\tpeer \n
tFileInputDelimited will fail on line 2 ...
So my idea was to replace the row separator so I will be able to replace \n by "" in the field. Bbut I didn't found a component for that 0683p000009MPcz.png

regards
Labels (2)
26 Replies
Anonymous
Not applicable
Author

Well this format is really big shit 0683p000009MACJ.png. Well, still there is solution of course 🙂 If you know the schema, you can go trough the whole file and detect \t char which seems to be used as column delimiter and repair the file first before it can be read by Talend.
Send me the file to archenroot@gmail.com, I can write small code which will standardize the file.
Ladislav
janhess
Creator II
Creator II

your example shows line terminators as \t\n or \t\0\n. First replace all the \t\0\n with \t\n then pass to the tFileInputDelimited with a \t\n row separator.
Anonymous
Not applicable
Author

I see...janhes is right, try his approach...
Anonymous
Not applicable
Author

no sorry, in the screenshot there's not all the examples. Some lines do have a value in the last column.
So the end of line can be :
string\n
or
string\t\0\n
or
string\t\n
janhess
Creator II
Creator II

If you don't give us the correct info we can't give you a correct solution.
Can you get the data fields surrounded by quotes? Then you'd be able to treat is as a csv file.
Anonymous
Not applicable
Author

archenroot solved the problem.
Thanks a lot for your help.
akhil3
Contributor
Contributor

Hi archenroot i'm struck with the same issue. If you dont mind can you share your code or any idea how to solve this it will be a great help.