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


how to load multiple flat file


how to load multiple flat file

Author
Message
vignesh.ms
vignesh.ms
SSC Eights!
SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)SSC Eights! (842 reputation)

Group: General Forum Members
Points: 842 Visits: 516
how to load all files in a directory in ssis with different delimiter ?

I have tried this using Foreach File Enumerator. It works fine for same delimiters, but I dont know how to implement it for different delimiters.
MyDoggieJessie
MyDoggieJessie
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12454 Visits: 7444
Perhaps a nested ForEach loop container - I'd think about creating a "delimiter" variable, then place a script inside the ForEach task, one that picks up the file, opens it, and looks for the delimiter, assigns it to the variable, then proceeds with processing the file

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience" ;-)
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63570 Visits: 13298
vignesh.ms (6/14/2014)

how to load all files in a directory in ssis with different delimiter ?

I have tried this using Foreach File Enumerator. It works fine for same delimiters, but I dont know how to implement it for different delimiters.



You need a seperate data flow for each type of delimiter. Even then, the metadata of the columns needs to be the same.
In the worst case scenario, you need a data flow for each different flat file.

If this is too much work, I advice scripting. You can for example just dump the contents of the flat files in a staging table and split out the data in TSQL and send it to the appropriate table.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
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