Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
brubakerbr
Yak Posting Veteran
53 Posts |
Posted - 2013-10-02 : 09:27:33
|
I have an SSIS package that runs automatically once a month. It pulls data from two separate Excel Spreadsheets (in two separate folders) and compiles it into an SSRS Report for our VP's. I have an issue with one of the data providers not putting his information into the folder at the appropriate time, thus causing the package to fail.My Director now wants some checks put in place so that the package looks for the file first and if it's not their the Job will not attempt to run until the package is present. Is this possible in SQL or do I need to find a customer resource to make this work?Brian D. BrubakerBusiness Intelligence AnalystViega LLC |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2013-10-02 : 11:28:23
|
I usually have a set time for the job to run then poll the folder to wait for the file - or just leave the job running continuously polling.This will get a directory listing and you can check for the file but there are many ways of doing it.http://www.nigelrivett.net/SQLTsql/s_ProcessAllFilesInDir.htmlThis does a similar thing using SSIS (for executing SSIS packages but easy to convert to detecting files).https://www.simple-talk.com/sql/ssis/executing-ssis-packages-/==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-04 : 02:06:02
|
quote: Originally posted by brubakerbr I have an SSIS package that runs automatically once a month. It pulls data from two separate Excel Spreadsheets (in two separate folders) and compiles it into an SSRS Report for our VP's. I have an issue with one of the data providers not putting his information into the folder at the appropriate time, thus causing the package to fail.My Director now wants some checks put in place so that the package looks for the file first and if it's not their the Job will not attempt to run until the package is present. Is this possible in SQL or do I need to find a customer resource to make this work?Brian D. BrubakerBusiness Intelligence AnalystViega LLC
you will need to implement a file watcher functionality i guess to check if file is present and start only processing once its availablethis is how i did it for one of similar requirementshttp://visakhm.blogspot.in/2011/12/simulating-file-watcher-task-in-ssis.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|