dbTalk Databases Forums  

SSIS Handling diff file types in one package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS Handling diff file types in one package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Colaizzi
 
Posts: n/a

Default SSIS Handling diff file types in one package - 03-02-2006 , 01:41 PM






Hi folks,

I'm looking for pointers or clues on how to handle loading different file
types into a stage table from one SSIS project. For example I may have a
table with file names and types in it and need to use the correct task for
that file type. The table may look like:

FileName FileType
na1.xls 4
na2.txt 3
na3.xls 2
na4.txt 1

Each file type has a different column layout and some basic scrubbing
differences. Once the stage file is populated I then need to scrub it some
more using the same process independant of the file type.

My current thinking is to try either lookups to control which type
processing happens or to write a script to execute the appropriate package.
(I don't know if either of those will work.)

Any suggestions, pointers, links or clues will be greatly appreciated.

Thanks
John

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SSIS Handling diff file types in one package - 03-03-2006 , 04:13 PM






Hello John,

Personally I would do this


ExecuteSQL task grabs the filename + file type data and puts in a Rowset Var
ForEach loop goes over that variable

Use workflow and variables in constraints
Have a dataflow task for each variation of file

Have a look here

http://www.sqlis.com/default.aspx?306

http://www.sqlis.com/default.aspx?55



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi folks,

I'm looking for pointers or clues on how to handle loading different
file types into a stage table from one SSIS project. For example I may
have a table with file names and types in it and need to use the
correct task for that file type. The table may look like:

FileName FileType
na1.xls 4
na2.txt 3
na3.xls 2
na4.txt 1
Each file type has a different column layout and some basic scrubbing
differences. Once the stage file is populated I then need to scrub it
some more using the same process independant of the file type.

My current thinking is to try either lookups to control which type
processing happens or to write a script to execute the appropriate
package. (I don't know if either of those will work.)

Any suggestions, pointers, links or clues will be greatly appreciated.

Thanks
John



Reply With Quote
  #3  
Old   
John Colaizzi
 
Posts: n/a

Default Re: SSIS Handling diff file types in one package - 03-04-2006 , 12:58 PM



Allan,

What a great clue! Thank you very much.

John

"Allan Mitchell" wrote:

Quote:
Hello John,

Personally I would do this


ExecuteSQL task grabs the filename + file type data and puts in a Rowset Var
ForEach loop goes over that variable

Use workflow and variables in constraints
Have a dataflow task for each variation of file

Have a look here

http://www.sqlis.com/default.aspx?306

http://www.sqlis.com/default.aspx?55



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.