Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to load multiple flat file Expand / Collapse
Author
Message
Posted Saturday, June 14, 2014 8:29 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 6, 2014 7:28 AM
Points: 138, Visits: 382

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.

Post #1580842
Posted Tuesday, June 17, 2014 10:22 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 9:31 AM
Points: 3,894, Visits: 7,138
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"
Post #1582447
Posted Tuesday, June 17, 2014 1:12 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:29 AM
Points: 13,570, Visits: 10,448
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1582548
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse