blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

SSIS: Processing data from multiple files all at once

Quite often you may want to process data from multiple files all at the same time. There are a number of options available to you if you want to do this.

1. Have a seperate source adapter for each file and amalgamate them together with the Union All component.
Advantages of this approach:

  • This works well if the files are of differing formats
  • You only have one executable in order to do everything
Disadvantages:
  • This does not work if the number of files differs each time

2. Loop over the files in a Foreach loop and append to a raw file. Then, process all data together in a seperate data flow.
Advantages:

  • You can re-use data-flows for files of the same format
  • Works regardless of the number of files

Disadvantages

  • You have more executables in your package
  • You will need to build control-flow logic to handle differing formats or else have some clever logic in your data-flow inside the Foreach loop
  • You need to stage the data (in the raw file)

3. Use a MULTIFLATFILE connection manager
Advantages

  • Only one executable in your package
  • One set of logic if all files are of the same format
  • Works regardless of the number of files

Disadvantages

  • You need some clever logic in your data-flow to handle differing file formats

 

Its clear that you choice depends on your circumstances so given that I don't know your circumstances I won't make a recommendation.

 

-Jamie

 

Published 14 October 2006 17:54 by jamie.thomson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Uja said:

Hi,

I went through this Blog,"Processing data from multiple files all at once " I tried to with option 2 - "Loop over the files in a Foreach loop".

I did Set up all the this as per the document here.

But my for eachloop continer loades same file for many times. (e.g. if have 5 files in the folder it loads same file 5 times.) It does not points to the next file.

Please let me know how to set it.

Appreciate your help.

Thanks,

Uja

October 27, 2006 16:26
 

Yogesh said:

Hi ..

   In our SSIS we execute task in SQ as

SQLTASK(Create Temp table)

Script Task(Reads the File name and assigne to a varialbe)

Data Flow Task(Put data from XML file to TEMP Table)

SQL Task(Reads data from temp table and put to actual table

Script Task(Prepare status file)

    This works for 1 file properly. Now we want that our 1st scripts task should read files one bye one and do the same. Can be execute the Dataflow task in scrit task and so on in script task?

December 19, 2007 09:58
 

BPO Services said:

it will be more simple if u can provide an example of each

Regards

<a href="http://www.saibposervices.com/">SBL - BPO Services</a>

October 15, 2008 10:12

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems