Search code examples
apache-nificarriage-return

How to replace carriage return (CR) and not line feed (LF) on Nifi


I have a text file to ingest but, some of the text fields os this file are coming with CR char in it. The official line break is LF so I figured I could replace all CR and normalize to files.

But I'm triyng to do this for a week now with no good results.

What I tried so far is using replaceText processor with several configurations. Line by line, entire text, already tried "\r", "\\r", "[\r]" but nothing seemed to work.

Do you have any suggestions or experience to share?


Solution

  • After a week of attempts, i was able to replace the carriage return in my file with a simple replacetext processor. Here is the print for you to try if needed. replaceText Processor