SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 SSIS Source Check
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

brubakerbr
Yak Posting Veteran

USA
53 Posts

Posted - 10/02/2013 :  09:27:33  Show Profile  Reply with Quote
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. Brubaker
Business Intelligence Analyst
Viega LLC

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 10/02/2013 :  11:28:23  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
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.html

This 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.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52323 Posts

Posted - 10/04/2013 :  02:06:02  Show Profile  Reply with Quote
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. Brubaker
Business Intelligence Analyst
Viega LLC


you will need to implement a file watcher functionality i guess to check if file is present and start only processing once its available

this is how i did it for one of similar requirements

http://visakhm.blogspot.in/2011/12/simulating-file-watcher-task-in-ssis.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000