Home Forums Data Warehousing Integration Services SSIS 2008 – Read roughly 50 CSV files from a folder, create SQL table from them dynamically, and dump data. RE: SSIS 2008 – Read roughly 50 CSV files from a folder, create SQL table from them dynamically, and dump data.

  • There is going to be no decent way of auto-creating the tables. A major reason for this is that columns in CSV files have no data types. Unless you interrogate the data in the files first & then have some sort of datatype-guessing algorithm ready to go. There must be one somewhere, because the Excel OLEDB driver does something similar (and frequently cocks it up).

    Assuming that the tables can be created first, using whatever means, the data import is one or more data flows (depending on the table structures). Every different table structure requires its own data flow.

    For the purging bit, I would invoke a stored proc. from SSIS using an Execute SQL task.

    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.