SSIS - Settings Question - How to avoid Column Headers from being written to the OUTPUT FLAT file

  • See attached (flatFile.PNG ) , Those are the settings I have.

    Here is how I did

    1.) Create a File that has the column names ( tab delimitted ) and use the files to define columns in the Flat Output File.

    Initially you will use the BROWSE button to SELECT this file.

    2.) Make sure to check the check box "Column Names in the First Data Row" ( Otherwise SSIS will use default Column Names like Column0, Column1...

    to name the columns.

    2.) Now look at FileCols.PNG file, Now you see the advantage of using a file in step 1 that has the exact columns names that represent your output.

    This is a great advantage when your file has more than 150 columns.

    3.) This arrangement works fine. I get the output but the output file still has the "COLUMN HEADERS" included.

    Question: How do I tell SSIS not to write the HEADER COLUMNS to the OUTPUT file.

  • Please IGNORE the above.. I found the answer...from another website.

    THE TRICK is in the PROPERTIES WINDOW

    The best way that I've found to accomplish this is the following:

    I create a test output flat file. I populate the .txt file with the result set from the SQL query that will be used in the package. Make sure that the first row of the .txt file contains the column header names.

    Create a Flat File Connection. Point it to the text output flat file. Check the "Column names in the first data row" box. This will make sure that the actual column header names will be used/shown, instead of "Column 0", "Column 1", etc. Click "OK" to close the Flat File Connection Manager.

    Edit the Flat File Destination item to make sure that the actual column header names are picked up and that the fields are mapped properly between your query and the output columns of your Flat File Connection. Click "OK".

    Highlight the Flat File Connection and press "F4" to open the "Properties" window. There, change the "ColumnNamesInFirstDataRow" to "False".

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

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