Skip navigation
Contact Us
7366 Views 9 Replies Latest reply: Oct 4, 2011 6:33 AM by Puneet Gupta RSS
reena mishra Novice 36 posts since
Aug 22, 2011
Currently Being Moderated

Sep 26, 2011 9:40 PM

flatfile row delimiter

I have pipe delimited source file,but has some records which has large value so it comes in a new row.BUt since in informatica row delimiter is \n,it takes the next line also as a new record and this is where the mapping fails,can anyone help me to know what row delimiter should i selct in flat file properties to avoid this situation.

  • sran liang Newbie 19 posts since
    May 11, 2011
    Currently Being Moderated
    Sep 26, 2011 11:22 PM (in response to reena mishra)
    flatfile row delimiter

    try to use delimiters which can not be typed out simply,  like À .

  • sakthi balan Newbie 10 posts since
    Sep 23, 2011
    Currently Being Moderated
    Sep 26, 2011 11:38 PM (in response to reena mishra)
    flatfile row delimiter

    Is it Unix or Window? If it is unix based, then you can create a script , that will fetch the required row(use 'echo' command to throw the row). Call this script in the session level(under flat file sesion property--> command).

    

    

  • sasi ramesh Master 1,110 posts since
    Oct 2, 2010
    Currently Being Moderated
    Sep 27, 2011 7:28 AM (in response to reena mishra)
    flatfile row delimiter

    Hi Reena,

     

    Can you please explain more specific on your requirement?If you have pipe delimted as a source file then you can provide | as a delimiter in the source properties.

     

    How the records are splitted into two rows.It is because of some /n  character in betweem of the records.

     

     

     

    Regard

    Sasiramesh

      • sasi ramesh Master 1,110 posts since
        Oct 2, 2010
        Currently Being Moderated
        Sep 27, 2011 8:58 AM (in response to reena mishra)
        flatfile row delimiter

        Hi Reena,

         

        Replace the \n with '' so that informatica wont split the records into two.Use the below logic in the mapping which is producing the flatfile to remove the linefeed in the column

         

        REPLACESTR(TRUE,Columname, chr(10), '')

         

        Regards

        Sasiramesh

          • sasi ramesh Master 1,110 posts since
            Oct 2, 2010
            Currently Being Moderated
            Sep 30, 2011 4:02 AM (in response to reena mishra)
            flatfile row delimiter

            Hi Reena,

             

            Informatica will split the records into new record whenever it encounter \n value in a feild.

            Could you please post the source file if possible.You have to remove the \n in the source file before processing into informatica.

             

            May be use some scripts in the  presession command to remove all the \n in the file and then process the records in informatica

             

            Regards

            Sasiramesh

            • Arun Gupta Newbie 8 posts since
              Dec 9, 2010
              Currently Being Moderated
              Sep 30, 2011 4:47 AM (in response to sasi ramesh)
              flatfile row delimiter

              Hi Reena,

               

              Create a script  which replease "\n" character in your file with any  other character (for this you can SED  commands)

              call this script  processing the source file.

               

               

              Thanks,

              Arun Gupta .

              • Puneet Gupta Newbie 11 posts since
                Aug 29, 2011
                Currently Being Moderated
                Oct 4, 2011 6:33 AM (in response to Arun Gupta)
                flatfile row delimiter

                Hi Reena,

                 

                Following UNIX command will rename all occurences of \n to 'BACKSLASHN' .

                 

                sed 's/\\n/BACKSLASHN/g'  test.txt > test1.txt

                 

                Here test.txt will be input file and test1.txt will be the output file.

                Take test1.txt as input to your Informatica mapping .

                 

                Regards,

                Puneet.

More Like This

  • Retrieving data ...

Bookmarked By (0)