SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


loading data dynamically SSIS?


loading data dynamically SSIS?

Author
Message
Vollmer
Vollmer
SSC-Enthusiastic
SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)

Group: General Forum Members
Points: 133 Visits: 173
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.
aaron.reese
aaron.reese
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2459 Visits: 907
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.
Vollmer
Vollmer
SSC-Enthusiastic
SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)SSC-Enthusiastic (133 reputation)

Group: General Forum Members
Points: 133 Visits: 173
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search