I have a pkg that currently uses a script task to check to see if the file is available, sets an ssis variable to true if it is, and I use that variable in an expression inside the precedence constraint to determine if the truncate statement inside the following execute sql task is executed or not.
Now, I've been asked to also check to see if the file has records as well before running the truncate exesql task. The flat files have header rows in each. The only thing I can think of is adding another dataflow after my script task that checks for existing file to use a rowcount task to set the variable again and have another expression in the precedence constraint after the dataflow and before the truncate table exe sql task.
To me this doesn't feel like the most efficient way of doing this. Any ideas would be appreciated.