SSIS create text file and add text

  • Steps:

    (1) create one folder (sourse) under that you are created .csv file as your text header only...

    (2) create another folder(destination) under that create same above mention file in destination also.

    (3) normal craete ssis package flat file destination is map to destination folder related file.

    is ssis package

    step 1: to take one file system task to remove destination folder file.

    step 2: to take another file system task to copy file from sourse

    folder to destination folder.

    step :data fole task for loading data from sql server to flat file

    destination.

    (4) to set delay validation =true...

  • That is our current configuration. I have a master file that is copied. Somehow the master file gets deleted and we cannot identify what is deleting the file. So that is why I want to create the file from SSIS every run and put the text in it that needs to be there.

  • I have several SSIS packages that do this. As far as I know, the text file is created automatically if it does not exist.

    If you want that first row to be the column rows, then in your connection manager, just make sure you have checked the box for "Column names in the first data row". If you want any text before the first row (or column headers), then in the Data Flow task, double-click on your Flat File Destination and add whatever you want in the big text box titled "Header". Might be a good idea as well to check the box for "Overwrite data in the file".

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

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