Subject: Handling empty text files in DTS
Posted By: ahofle Post Date: 1/19/2006 12:07:29 PM
Hi, I am trying to make a DTS package that takes several text files and ingests them into our tables.  The text files are retrieved via FTP from an external source.  The problem is that sometimes the text file can be empty if there is no data.  Of course DTS bombs when this happens.  What is the best way to handle this?  I tried using an activeX script someone posted here to check the file size and return success or failure, but when I return failure, the entire DTS task stops running and my 'on failure' workflow step is ignored. I have made sure that the 'faili package on first failure' checkbox is unchecked in the package properties.
Any help would be appreciated.

Thx,
Andy

Reply By: David_the_DBA Reply Date: 1/21/2006 11:29:31 PM
One workaround that immediately comes to mind is to modify your activex script task to insert a dummy row into each of the empty text files and then after the data pump tasks do a clean up step (SQL Task) to delete the dummy rows that have been inserted.

Aside from that I would need to see the script and a brief run down of your package.

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com

Go to topic 38737

Return to index page 389
Return to index page 388
Return to index page 387
Return to index page 386
Return to index page 385
Return to index page 384
Return to index page 383
Return to index page 382
Return to index page 381
Return to index page 380