Page 1 of 1
aborting job
Posted: Wed Feb 22, 2006 7:38 pm
by samba
Hi,
I have a source ( sequential file) for which few mandatory checks are being performed. and i also have a error link to capture these in an error file. my requirement says that if the error file records exceeds 10% of the source records the job needs to be aborted.
Can anyone help me to get this done.
Thanks in advance,
Samba
Posted: Wed Feb 22, 2006 8:45 pm
by ray.wurlod
Welcome aboard. :D
Your problem is that you can't know in advance how many represents 10% unless you know how many are in the file to begin with. You could pre-process the row to get this count.
Direct the Reject output link from the Sequential File stage through a Transformer stage which tests whether this threshold has been exceeded and, if so, call a routine that aborts the job.
To my way of thinking, any requirement to abort a job should be challenged. You can process all the data, then check the row counts, then take any remedial/notification action required. It's a more streamlined approach.
Posted: Wed Feb 22, 2006 10:37 pm
by samba
Datastage jobs will run daily on incremental basis
how many records will come daily in source file we dont know.
if error records exceeds 10% we have to abort particular job
Thanks in Advance
samba
Posted: Wed Feb 22, 2006 11:30 pm
by ray.wurlod
Who says you have to abort the job? Make them justify such an ill-advised decision! Robust ETL requires that you maintain control at all times.