2 Replies Latest reply on Nov 27, 2018 11:00 AM by Deep Ajabani

    How to eliminate New line characters.

    SP K Seasoned Veteran

      Hi Team,


      I have a indirect file as source and creating a single file as target. single file is used to load the Teradata DB table, where i am getting issues with new line character and my session getting failed.


      How can i take care of New line character issues and load my target table.


      having 23 columns and new line character can come at any columns.

      1. first mapping

           Indirect file --> File

      2. Second Mapping

           File --> TD table (Failing with new line character).




        • 2. Re: How to eliminate New line characters.
          Deep Ajabani New Member

          Hello SP,

               There are two types of END LINE characters.

          1. Carriage Return (Also known as CR or \r)

          2. Line Feed (Also known as LF or \n)


          Two things can be done. But first figure out which type of new line character is part of your data by doing following.

          Open your source file in NOTEPAD++ or UltraEdit and see that which type of End Line you are getting.

          If using NOTEPAD++ --> View --> Show Symbol --> Show all symbols (This is freeware tool)


          1. As Srini mentioned, you can replace the Line feed or Carriage return from each field.




          a. It is possible that what Line End characters are coming are set as END LINE character in Source File option.

          You can check that by opening a session --> Mapping --> Sources --> Properties --> Set File Properties --> Advance --> Row Delimiter.

          b. Make sure what new line character what is coming in your data is not the same as Row Delimiter. If so replace that with NULL and your mapping will work as expected.


          Best luck. Let me know if it is still not working. Attach source file in the attachment of your reply to debug the same with ease.