Dynamic Bulk Insert Task

  • Hi,

    I need to load data from text file to sql database table. For that i created SSIS package. I can able to load data from one text file to the corresponding table. But i need to load around 50 tables from 50 text file. For that i need to create 50 data source connections.

    I used For each loop container to change data source dynamically but i could not able to change destination table in bulk insert task dynamically.

    Is there any way to make it dynamic so that i have one data source and one data destination connection and load all 50 tables?

    Please help its urgent.

    Thanks.

  • I've never tried this but I believe you can pass the table name to the OLEDB Destination task from a package variable. Set the variable in your For Each loop before you get to the data flow.

    If that doesn't work, you could also write a custom script task with .NET code. You would set it up as a destination and then selectively load to the individual tables there.

  • Thanks Chris,

    I used variables to make it dynamic.

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

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