SSIS Data Validation based on Column Names or Column Position?

  • I've run into an issue where I'm getting data conversion errors on a test Flat File. The Flat File connection contains the same column names and datatypes as the file being imported however the columns were in a different order for this one particular test file.

    It seems to me that the FlatFile Connection data validation isn't really based on Column names but position of the column itself. Does anyone know if that's actually the issue?

    For example:

    FlatFile Connection

    CompanyName DT_STR

    ID DT_I4

    Amount DT_Numeric

    Flat File to be imported

    ID DT_I4

    CompanyName DT_STR

    Amount DT_Numeric

    Conversion error on CompanyName DT_STR to DT_I4 instead of it automatically mapping to same named column.

  • Once the definition is set I don't believe you can change it at run-time. So if two columns are reversed for example it will probably break. And if that happens I have to question WHY it is allowed. Are you allowing willy nilly file creation? Why the variation?

    CEWII

  • Elliott,

    Thanks for the reply. I just ran across it in a test scenario. I'm using a script task to identify the file based on the content and then use conditional control flow to push it to the correct data flow task. These two files are almost identical b/c they come from the same company. There is just a slight variation between the two (mainly just a different order of the columns) and when I kept getting a conversion error on this particular column I didn't understand why b/c the data was exactly the same. I suspected column order was the issue.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply