Search code examples
importssisssis-2008

SSIS Import File csv ="" text delimiter ignore =


I'm importing a csv file and for some reason the text delimiter is not just a double quote it's an = sign and the double quotes. is there a way in ssis to open the file, replace the = sign in the entire file and then import it into a table?


Solution

  • I've had almost similar situation and you could do what I did:

    First dataflow task:

    1. Flat File Source with Format=Delimited, Text qualifier=< none >, in Advanced tab ColumnDelimiter={LF} and OutputColumnWidt=8000. The idea is in opening file as 1-column csv to replace wrong characters in each row. enter image description here
    2. Derived column with Expression=REPLACE(Column0,"=","") enter image description here

    3. Flat File Destination with same parameters as in the source.

    Second dataflow task runs after first.

    1. We use saved file as Flat File Source but this time we have to split its columns using delimiter=Comma and Text qualifier=Quote