You were right, your solution works like a charm.
Let me just add to this topic, that in the replace function we might need to be aware of the right linefeed character based on the OS used. In my case, for example, I was working on a Windows machine and the linefeed is "\r\n" then. When transforming the string, I had to also escape the backslash character with another backslash so that the linefeed is replaced properly. Therefore I was able to achieve the goal by using the following function in the Reformat component:
Code: Select all
$out.0.Field4 = replace($in.0.Field4,"\\r\\n",'\\r\\n');
This way the resulting field included the correct \r\n part of the string and has been interpreted by the MySQL database as a multiline string then.