I have a situation in which our client has given a flat file (.csv
) to be loaded into a SQL Server table using SSIS.
This huge raw .csv
file (with about 400,000 records) does not have a proper csv format - particularly it does not have the double quotation ("), either in the column name header or in the row data. Please see an example below:
ColumnName 1, ColumnName 2, ColumnName 3,....
Z , 342343242424 , 10.83 , 000001001765 , 2018-12-03 , 2018-12-03 , ABCD , **XYZ,** , CA , 001 , 00 , ?
(This is an instance of a data row, with the column header names as Column 1, Column 2,...There is no double quotation(") at all in this file with extension .csv)
I am using Visual Studio 2017 to work in SSIS.
As you can see the data value XYZ, is desired as XYZ, in a single cell; instead I see XYZ in one cell and a blank in the adjacent cell to the right. (I am currently de-bugging using a Data Viewer.)
Every cell gets shifted one place to the right side. In the last column on the right side, I get this: 00 , ? in one cell.
In the SSIS Flat File Connection Manager Editor - General page, I have set the following properties:
Format: Delimited
Text Qualifier: none
Header row delimiter: {CR}{LF}
I do not have an idea on how to load this sort of an improperly formatted .csv
file (without double quotations(")).
Is there a way I can load properly ? May be changing the file to a text file or something.
I have been told that these are Cobol (Mainframe) files with fixed specific width for each column.
There is also a specific width for each filler (i.e. blank space (including comma) between adjacent values). I have been given a specification document with information such as this below:
Field Name Start Width
-----------------------------------------
ColumnName1 1 26
FILLER 27 5
ColumnName2 32 19
FILLER 51 5
ColumnName3 56 21
FILLER 77 5
.
.
.
.
Any suggestion will be appreciated.