Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
I have aan input file with multiple fields. Some of the fields has CR or \r in the flow so as to continue data in single field but in a new row:
Field1;Field2; Field3
1;abc;Hello
2;xyz;Hello\rWorld\rBye
This should eventually be fed in the table as:
Field1|Field2|Field3
1|abc|Hello
2|xyz|Hello
World
Bye
I tried different posts the solution doesn't seem to fit to my needs. Can someone help?
Regards,
Eureka
Hi, you can try to read the file with tFileInputRaw then you replace \r with the end of line you want :
input_row.replaceAll("\\\\r","\\n") if you want LF
input_row.replaceAll("\\\\r","\\r\\n") if you want CRLF
input_row.replaceAll("\\\\r","\\r") if you want CR
or then you can write it with tFileOutputRaw.
finally you can read the new file corrected.
Send me love and kudos