Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Half of the data is disappearing during SSIS load

Author  Topic 

sql_er
Constraint Violating Yak Guru

267 Posts

Posted - 2011-11-28 : 18:03:06
Hi,

My SSIS package is behaving very strangely, which to me seems like a microsoft bug.

I wanted to see if anyone else was having a similar problem.

Basically I get a raw CSV file that needs to be loaded into the base database table. The CSV file has an extra comma at the end of each row. Since I use "comma" as my delimiter, I get an extra empty column when I create a "Flat File Connection Manager" in SSIS. I leave that column in there.

I then add an OLE DB Destination, and load the flat file source into a database table. The database table DOES NOT have this column, and when I am doing the mapping I am not mapping this column in the source file to any column in the destination.

I then run the SSIS package.

SSIS package runs with no problems. I check the row count and all matches.

I then open the original raw CSV file and remove the extra comma from the end of each row (I open it in textpad and replace ',\n' with '\n').

I truncate the base table and then re-run the SSIS package.

Once again the package runs fine, but this time the row count in the table is less than in the raw file. And this is the most interesting part: It is exactly half of the original raw file.

I was able to repeat this multiple times, with different files, and each time I get the same result - at half point SSIS completes the data load - as if there are no more rows in the raw file. It is the strangest thing.

Has anyone else encountered anything like that?

Thanks!
   

- Advertisement -