Integration

Get Involved. Join the Conversation.

Topic

    Cesar Tepetla Corte
    Skip blank lines of a text file
    Topic posted April 23, 2019 by Cesar Tepetla CorteBronze Medal: 1,250+ Points, tagged Adapters, Connection, Database, E-Business Suite, Events, Integration, Orchestration, Process 
    44 Views, 1 Comment
    Title:
    Skip blank lines of a text file
    Summary:
    Skip blank lines of a text file
    Content:

    Hi everyone,

    This is my scenario:

    I have to upload files to UCM, I get the files from an ftp server but I have to validate that the contents of the file have not been uploaded to UCM before to make this validation create a table in a database to store line by line of a file then when the integration does the reading process I do a for each and inside that for each I do a select operation to the table and I add an IF condition so that if the line is not in the table then make an insert but if the line already exists in the table omits it.

    goals
    - Compare that the file information has not been imported into UCM before.

    PROBLEMS
    - The file has blank spaces for line breaks, for example:
    Name1

    Name2

    Name3
    And I do not want to insert the blanks in the condition try to make a 'line = null' but do not take it into account and insert them in the database.

    -After making the comparison with the for each I need to make a single file with the necessary lines according to the validation but when I make the file inside the for each the creation is executed many times.

    Any help is appreciated.

    Comment

     

    • Hemanth Lakkaraju

       And I do not want to insert the blanks in the condition try to make a 'line = null' but do not take it into account and insert them in the database.

      I did not understand this part. Can you share your flow?

      After making the comparison with the for each I need to make a single file with the necessary lines according to the validation but when I make the file inside the for each the creation is executed many times

      This can be solved by using append option when you write the file.