loading data dynamically SSIS?

  • Hello,

    I do not know the best place for this question.

    Problem: I have multiple txt files in different formats as they come from different sources. I need to load this data into a single table. Since the files are being generated from multiple sources the data needs some massaging before it is loaded. We are currently loading the data all with dynamic sql. Though this works it limits the amount of control/visibility/performance we have while processing the data. I would like to use SSIS for this, but have found this to be difficult as most tasks are expecting static meta data. I was wondering if anyone has come across this and has found a way of doing this? Just a note I have a limited C# background so I am trying to accomplish this without using script tasks. Any advise/ideas would be much appreciated.

  • If you mean that the files contain the same data but the field and row terminators are different and the fields are in a different order then I would look at a routine based on BCP or Bulk Insert and format files.

    You can build a table of source file names and their format files and then build a dynamic SQL script (I would suggest that you do this in a stored procedure and then call the sproc from SSIS)

    If you need to do any transforms on the data, then this would be more difficult. I would probably load the data into a staging table and then clean it using a child package depending on the incoming data file type but this would really be subject to the level and complexity of the data variances.

  • Thank you for the reply, that is what we are currently doing. I have setup a package that calls all the stored procs that do the dynamic SQL. I was just wondering if there were any SSIS options other then this.

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

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