SSIS Moving Flat files

  • I have a folder with 6 files with name format as 2201.txt, 2202.txt.....2206.txt. When we open the text file we can see header on it...there are 3 type of headers account,transaction and history. I have to run a ssis package so that it reads the header and merge the files with same header name and save at destination with header names i.e account.txt, trans.txt,history.txt. It is a production data and data changes everyday.Files name may change but header remains same. So when ever i run that package it has to read the header name and merge the data with already exiting file account.txt,trans.txt,history.txt. Destination should have another column DATE, which shows the date when data is moved to destination.

    Can someone give an idea about how to execute it.

  • Hi

    If you setup a foreach loop container and then add a Data Flow to that.

    Add the source file and then a Script component (Transformation Type) with 3 Outputs (see attachment)

    The script needs to look at the header and take the appropriate action. The script can also add the date column.

    Hope this helps

  • Thanq SSC Rookie,

    i was struck at script that needs to look at the header and take the appropriate action, Can you help me out in how i write this script to do this task.

Viewing 3 posts - 1 through 2 (of 2 total)

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