Transform Logfile in a table

  • Hi guys, 

    I need a help on a demand here, so I'd transform one LOG File (example in the image) into a table. What I wanted to know was whether SSIS really has this robustness to transform this file and what recommendation (where to start) with this discussion. I'm creating a Flat File in SSIS, but I'm not visualizing a solution then help me in this case.]


    For creating a table I would use only the Equipment Code | Date / Time of Schedule TASK (Field 'End of task').

    I could not see a solution to 'break' this file or capture just that text on the line. Any tips? Would you use another tool?

  • +x

    joseajgermano - Tuesday, May 29, 2018 5:15 AM

    Hi guys, 

    I need a help on a demand here, so I'd transform one LOG File (example in the image) into a table. What I wanted to know was whether SSIS really has this robustness to transform this file and what recommendation (where to start) with this discussion. I'm creating a Flat File in SSIS, but I'm not visualizing a solution then help me in this case.]


    For creating a table I would use only the Equipment Code | Date / Time of Schedule TASK (Field 'End of task').

    I could not see a solution to 'break' this file or capture just that text on the line. Any tips? Would you use another tool?

    If you could include just a few examples of how you would like Equipment Code | Date / Time of Schedule TASK to be broken down, based on the sample data, it would be helpful.

    Don't give up hope on SSIS just yet.


  • Hi Phil,

    That would be more or less what I was going to capture from the archive.

    Where date / time I'll capture from the line "Fim da Tarefa", just below the "Comunicação Agendada"

    After open the SSIS, I just could not 'visualize' how to 'get' this block of text inside the line to identify what is what (would be a condition like this: If on the line contain the expression "Comunicação agendada para o equipamento: [equip] and popular column x ") | and so on .... Would you have any tips on how to do this?

    Note: This file is a single log file, generated by a third-party application, where there is no such record in database, so I'm developing something in that sense for better administration and control of sending / receiving information

  • It's not that difficult, but there are some tricks required.

    1) Define the flat file source rows as single columns
    -- So every source file row is (initially) treated as a single block of text
    2) Add a data flow using the flat file source you have defined
    3) Add a Conditional Split to remove all of the unwanted rows (ie those which do not contain the text Comunicacao (with diacritics))
    4) Add derived columns to strip out the data for the three columns you are interested in
     -- You may need some help with the code required to do this
    5) Map the derived columns to the target table


  • Wow with these tips I'll start looking for something here. Thanks a lot for the help. I will not give up on SSIS not 🙂

  • joseajgermano - Tuesday, May 29, 2018 11:22 AM

    Wow with these tips I'll start looking for something here. Thanks a lot for the help. I will not give up on SSIS not 🙂

    Excellent. Post back with any questions as you go along and we'll try to help.


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply