How to abort a job?
Moderators: chulett, rschirm, roy
How to abort a job?
Hi DSXians,
May i know the way to abort a job based on a calculaiton (probably from a transformer). Like a UtilityToAbortLog() available in server.
Is there any built in routines or functions available.
I need to calculate number of reject records and at once if it exceed 2% of source, it should be aboted
regards
kumar
May i know the way to abort a job based on a calculaiton (probably from a transformer). Like a UtilityToAbortLog() available in server.
Is there any built in routines or functions available.
I need to calculate number of reject records and at once if it exceed 2% of source, it should be aboted
regards
kumar
Re: How to abort a job?
Hi Kumar,
You can use the same utility by using the Basic Transformer in your parallel canvas but you need to pass the number of records in source as a parameter to the job.
Then you can implement the logic by using stage variables in the transformer.
Regards
dsusr
You can use the same utility by using the Basic Transformer in your parallel canvas but you need to pass the number of records in source as a parameter to the job.
Then you can implement the logic by using stage variables in the transformer.
Regards
dsusr
-
- Premium Member
- Posts: 38
- Joined: Fri Apr 22, 2005 6:07 am
Use Abort After rows
Hi Kumanr,
You can call shell command wc -l to count number of rows in source if it is a sequential file (equivalent for other) using Before-Stage. This number you can use to determine %age of failure. Then inside a Transformer Stage take one stage variable in which you can write your logic and return a flag based on your requirement. Take this flag as a constraint for any link and specify Abort after rows as 1 or as per your requirement in the Constraint dialogue box.
Hope this will work for you.
-Amit
You can call shell command wc -l to count number of rows in source if it is a sequential file (equivalent for other) using Before-Stage. This number you can use to determine %age of failure. Then inside a Transformer Stage take one stage variable in which you can write your logic and return a flag based on your requirement. Take this flag as a constraint for any link and specify Abort after rows as 1 or as per your requirement in the Constraint dialogue box.
Hope this will work for you.
-Amit
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Sorry, not exactly a constructive comment, but I found something amusing in the concept that you make the job more efficient and shorten the runtime by aborting it.
I guess that's as opposed to letting it continue to run when you know things are going south and will need to be rerun.
I guess that's as opposed to letting it continue to run when you know things are going south and will need to be rerun.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi,
I too agree with your words that not to be aborted.
But the input file is Veryyy... huge. If it reject more that 2% for a condition, the input file should be reprocessed.
The actual requirement is to stop the flow of the job.
Since i dont know how to stop the flow i am aborting it with some log .
regards
kumar
I too agree with your words that not to be aborted.
But the input file is Veryyy... huge. If it reject more that 2% for a condition, the input file should be reprocessed.
The actual requirement is to stop the flow of the job.
Since i dont know how to stop the flow i am aborting it with some log .
regards
kumar
Hi,
I too agree with your words that jobs not to be aborted.
But the input file is Veryyy... huge. If it rejects more that 2% for a condition, the input file should be reprocessed. And if it starts to reject it would reject in early number of records.
The actual requirement is to stop the flow of the job.
Since i dont know how to stop the flow i am aborting it with some log .
regards
kumar
I too agree with your words that jobs not to be aborted.
But the input file is Veryyy... huge. If it rejects more that 2% for a condition, the input file should be reprocessed. And if it starts to reject it would reject in early number of records.
The actual requirement is to stop the flow of the job.
Since i dont know how to stop the flow i am aborting it with some log .
regards
kumar
Hi,
What about stopping the job? ( DSStopJob() )
DS 7.5 introduced the Terminator Activity for sequence jobs that has an option to send such stop requests to running jobs.
This sohould be a safe alternative to aborting jobs.
IHTH,
What about stopping the job? ( DSStopJob() )
DS 7.5 introduced the Terminator Activity for sequence jobs that has an option to send such stop requests to running jobs.
This sohould be a safe alternative to aborting jobs.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Re: How to abort a job?
You could always divide by 0 if you want a quick failure.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.