January 31, 2011 at 11:24 pm
eliminating empty output files in ssis dynamically in flat file destination when there are empty files loaded that should be deleted
when we are loading data from source to destination
February 1, 2011 at 3:33 am
jyothi_siri2000 (1/31/2011)
eliminating empty output files in ssis dynamically in flat file destination when there are empty files loaded that should be deletedwhen we are loading data from source to destination
Is there a question?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 9, 2011 at 3:57 am
1) Use for each loop conatiner to get the file available in the source.assign the file name path into one variable.Every time the loop execuet and provide you the new file path.
2)inside the foreach loop just drag the script task,Just give the path details available variable as input to the script task.Inside the scrip[t task just check the file size by using below code.
HttpPostedFile MyFile;
int FileLen;
System.IO.Stream MyStream;
MyFileCollection = Request.Files;
MyFile = MyFileCollection[0];
FileLen = MyFile.ContentLength;
Once filelen > 0 then that file needs to pass as a out put from script task and insert where you want.if you do this you wont get the o kb soze files.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply