![]() I created a ScriptTask and used the TaskFieldParser class to read the csv file and convert it to tab delmited file and then modified my subsequent tasks to read the tab file. Not sure why SSIS flat file connection manager cannot parse it correctly. Then I spoted the comment from Andew Knight above to use a TextFieldParser class and I tested that out and lo and behold the TextFieldParser class parses the file pefectly fine. In my case I have fields that are not enclosed in double quotes and some fields that are enclosed in double quotes. The script advise from ViewMaster to parse out the double quotes in the file using ScriptTask works but it assumes that all the fields are qualified with a double quote. I ran into this same issue and when I did a search ended up in this forum. What would be your suggestions to help me parse this out? (don't forget, some of these are large files with about 260,000 records- ) ![]() which prevents me from doing a replace on the double quotes. The other problem is the double quotes with blank text. The biggest problems stem from the double quotes mixed in with the comma because it is a comma delimited file with quotes as the text qualifier. Text From Vendor "Vendor Name, Inc." blah blah Next string 1234 Many things to notice here - as well you can imagine some of the difficulties here.Īfter parsing, this data should have 4 columns. "Text from vendor ""Vendor Name, Inc."" blah blah", "Next string", "", 1234 I'm trying to import it into a SQL database via SSIS, but the data is a little bit frustrating. I have many CSV files (~20), with varying amounts of data- but some are quite large (largest file is ~230mb) I have a lot of data coming in from CSV files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |