March 12, 2010 at 8:21 am
Hi everyone, I have a sql job setup to import a dynamic file everyday. The file is created at certain times of the day, so I setup the sql job to look for the file every 5 minutes. If the file doesn't exist, the package fails. Instead of failing the package I want to write to a log table with a general error like 'File doesn't exist'.
Please help.
Thanks.
March 12, 2010 at 8:36 am
I think the easiest would be to create a script task that used the system.io namespace to look and see if the file exists if not fail that task and log from there. If it does exist complete the script task with success..
Clear?
CEWII
March 12, 2010 at 8:58 am
If you can live without that log message, you could just put your dataflow inside a FOREACH container - then the package would still end gracefully, even if the file was not found.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 15, 2010 at 10:11 am
Not exactly elegant but you could put a File System Task in the control flow and have it set a file attribute. On fail (no file) direct the flow into a data flow task and create your log entry.
March 16, 2010 at 7:46 am
Thx everyone. Really appreciate all the help.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply