SSIS flat file source columns change

  • I'd like to know if an SSIS package can accommodate a source that will vary in the number of columns it contains. The column names are in the first row and the flat file columns would map to table columns of the same name.

    For example, say that I have a csv file to import like this:

    Col-A,Col-B,Col-C

    22,43,12

    35,22,94

    The next csv file might be:

    Col-B,Col-C

    82,76

    19 74

    and then:

    Col-A,Col-B,Col-D

    28,46,82

    91,73,88

    Can an SSIS package handle these inputs as intended?

    Thanks!

    Marge

  • Not directly.

    But you can handle it with some code. Import every row as a single column and then send that through a Script Component to parse out the relevant columns.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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