Page 1 of 1

reject link creates a file

Posted: Fri Mar 08, 2013 6:29 am
by uzl
I'm implementing jobs that check datainconsistenties between tables. For example : I check if all instanties of a column in one table also exist in another table. I use a lookup-stage for this. The reject link creates a file with all the inconsistenties. However, when no record is rejected, an (empthy) file is created. How can I avoid this ?

Posted: Fri Mar 08, 2013 8:04 am
by chulett
You can't.

Posted: Fri Mar 08, 2013 8:43 am
by uzl
not the answer I was hoping for but thanks anyhow

Posted: Fri Mar 08, 2013 8:44 am
by prasannakumarkk
delete empty files in after job subroutines.

Posted: Fri Mar 08, 2013 8:58 am
by chulett
Was thinking about my answer and realized it was a little... terse. So for grins, here's the longer explanation:

When a job starts, all target stages are opened / initialized. It is at that time that they do whatever they need to do to "get ready". A database stage connects to the database, a file stage creates the file if it doesn't already exist, etc etc. None of those things are conditional, meaning they don't wait for the first row to arrive before they happen.

As noted, if that really bothers you the file can be checked "after job" and deleted if found to be empty.

Posted: Fri Mar 08, 2013 9:19 am
by prasannakumarkk
thanks craig for the information. I always wondered why it happened.

Posted: Fri Mar 08, 2013 7:26 pm
by ray.wurlod
Discover such instances using cross-able analysis in Information Analyzer.