May 11, 2009 at 7:45 am
Hi,
I want to process several files within a foreach loop. The loop contains a data flow that reads data that has to be appended to a raw file.
My problem is, that I cannot find a way to ensure an empty raw file (like create it) for the first loop but to append data from all following loops.
Thank you in advance
Alexander
May 12, 2009 at 6:43 am
You could use the following steps
0. create an empty raw file on the file system where the SSIS package can access it
then in the SSIS package
1. use the file system task to copy an empty raw file and then rename the copy - this is handy as you can date stamp the file name
2. use a script task to set the file connection settings to point to the new file
3. start your for each loop to write into the raw file
May 13, 2009 at 1:00 pm
In the Raw file properties dialogue set WriteOption to 'append' and ValidateExternalMetaData to false. This should still create the file on the first iteration. I found it to be inconsistent in the past, thus if speed is no issue then a flat file destination is friendlier in this regard.
----------------------------------------------------
May 15, 2009 at 1:17 pm
Alexander G. (5/11/2009)
Hi,I want to process several files within a foreach loop. The loop contains a data flow that reads data that has to be appended to a raw file.
My problem is, that I cannot find a way to ensure an empty raw file (like create it) for the first loop but to append data from all following loops.
Thank you in advance
Alexander
Alexander,
What is the reason you want to write to raw data file?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply