SSIS Ignore Blank Lines

Viewed 22

I get the following SSIS error message when my source file has blank lines at the end of the file. I don't care about the blank lines as they don't affect the overall goal of pumping data from a text file to a database table. I'd like to ignore this message or, if its easier, configure SSIS to ignore blanks.

<DTS:Column DTS:ID="96" DTS:IdentificationString="Flat File Source.Outputs[Flat File Source Error Output].Columns[Flat File Source Error Output Column]"/>

I found a similar question below, but the solution isn't an SSIS one, its one that preprocesses the text files which would be my least favorite solution.

SSIS Import Multiple Files Ignore blank lines

1 Answers

If you want to exclude records with blank values you can use the Conditional Split. Add it between you source file and your destination. The expression can be like below :

ISNULL(Col1) && ISNULL(Col2) && ISNULL(Col3) ...

Name the output as Remove Blank Lines. When connecting your Conditional Split to your destination, SSIS will ask you what output the split component that needs to be returned. In this case chose the Conditional Split Default Output to get the entire records without the blank values. You can enable Data Viewer before and after the conditional split to see the filtered output.

Related