I have a CSV file which has salesforce data and is generated using python API call and i am trying to load the file in MS SQL DB using SSIS.
I need a C# script to rectify the issue because the data is not consistent (no of columns and order of columns can change anytime). Below mentioned are more details:
The file is not fully text qualified . There are few records which are text qualified and those records contains quotes/comma in them .
i tried to follow below blogs :-
- Load Text/ CSV files To table when Number of Column Can Change in Source File/s - SQL Server Integration Services(SSIS) Tutorial
- DYNAMIC DATA COLUMN POSITION FOR FLAT FILES IN SSIS
But this logic works only when there are no quotes or comma in the text otherwise the program fails due to data disposition.
i checked few more articles on techbrothersit but i did not get any idea on how to deal with text qualified data. Could anyone provide a possible solution for this.
Update 1
I struggled a lot with this issue and thought of switching to excel but i am facing some issues with excel as well . i am importing data from excel source to oledb destination but it truncates the data to 255 characters whereas i need whole data. As a solution i do not want to try the registry edit as i will be deploying my program to production later and this impacts the performance. Won't be able to keep more length data in first row (data is coming thru API). So now the issue is that i want the data without truncation (using excel i was able to overcome the issues that were there in CSV) .
Any help with be highly appreciated.
Thank You in advance.