Import multiple csv files to multiple sql tables

  • Hi

    I am using VS2005 with SQL Server 2005.

    I have recently started using SSIS. I know the basics. My current problem is that I need to import 18 different CSV files into 18 sql tables. Does anyone know how I can do this in SSIS dynamically.

    I have an idea to read a table which contains all the csv filenames and the destination table names into recordsets. By using looping and variables I could update the connection managers, but this doesn't update the underlying meta data.

    Can anyone help, I need this urgently for a project I'm working on currently.

    Thanks in advance.

    Suhel

  • Inelegant as it may seem, your fastest solution is to create 18 'hard-coded' data flows.

    I know, I wouldn't like it either :w00t:

    An alternative is to build the whole thing in a Script task - you'll get the dynamism you want, but lose out on performance and (possibly) ease of maintenance.

    It may be possible to do all the meta data stuff in code, but if your project is as urgent as you suggest, you don't have time - it's not easy.

    Phil

    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.

  • Hi,

    If this is for a one off import then a dynamic solution may save you time, however if you are going to be using this import regularly then you should spend the time and create the dataflows for all 18 tables. Then you can take advantage of error handling, more complex logic and the improved performance.

    Here[/url] is how you can do it dynamically using Bulk Insert and SSIS, if you do decide to go down that route.

    HTH

    Kindest Regards,

    Frank Bazan

  • Guys

    Thanks very much for your posts, they have helped me alot in understanding SSIS and resolve my issue.

    Suhel

  • Suhel,

    We have just released beta with an enhancement, which might help. We have improved the CozyRoc Data Flow Task Plus to support dynamic data flows. We will be happy to hear your feedback.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Viewing 5 posts - 1 through 4 (of 4 total)

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