Link to home
Start Free TrialLog in
Avatar of wppiexperts
wppiexpertsFlag for United States of America

asked on

SSIS Importing CSV file

I have set up a Flat File Source in SSIS to load in a CSV file. The trouble that I am having is that some rows have 10 columns, some have 15. When I set up the column structure, the first row had 10 columns, so I added the missing columns to the data structure, but when I do that, it does not appear to be picking up the CR/LF characters, so in the column that I create, it looks like its pulling in the CR/LF control characters followed by the first value of the new line and so on.

I've tried all the variations of the row delimiter, but nothing seems to work as the line feed and properly load the new line of data.

Could it be that the csv source file has an unknown CR/LF character or am I not setting up the parameters of the file connection properly?
ASKER CERTIFIED SOLUTION
Avatar of vdr1620
vdr1620
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wppiexperts

ASKER

as an additional note, I threw together a sample file with 3 columns and a couple rows of data, the import worked fine. However, when one of the rows only had 2 columns, the import went haywire and didn't load properly. So it looks like when using the flat file connection manager, each row of data has to be uniform, otherwise this issue will arise.
Yes the issue will definitely arise.. Thats the reason i suggested you to take a dynamic approach as suggested in the link where you treat the row as one complete column and then in the script you split the columns. please check the link above
wow - you link was the perfect solution! Thanks!