Aborting the Job With Message
Moderators: chulett, rschirm, roy
Aborting the Job With Message
Hi All,
I have to abort the job, whenever the IF condition Fails.
Eg:
If(Len(IN.Col) <= 15)
IN.Col
else
Abort the job with message("Bank Account ID is defined as decimal(15)");
end;
Please let me know, how to achieve this.
Thanks,
SenthilP
I have to abort the job, whenever the IF condition Fails.
Eg:
If(Len(IN.Col) <= 15)
IN.Col
else
Abort the job with message("Bank Account ID is defined as decimal(15)");
end;
Please let me know, how to achieve this.
Thanks,
SenthilP
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
HI ArndW,
Thanks ArndW for your view.
If I put a separate link with "abort after" 1 row in transformer stage. It will abort the job after a row is passed, whatever the derivation may be. Correct me if I am wrong.
But for my case, I have a o/p schema having 4 cols, In it one of the col have the derivation using if then else. If the condition satisfies pass as it is, If fails, i want to abort the job then only with the error message as we type in.
Please let me know about this,
Thanks,
Senthil P
Thanks ArndW for your view.
If I put a separate link with "abort after" 1 row in transformer stage. It will abort the job after a row is passed, whatever the derivation may be. Correct me if I am wrong.
But for my case, I have a o/p schema having 4 cols, In it one of the col have the derivation using if then else. If the condition satisfies pass as it is, If fails, i want to abort the job then only with the error message as we type in.
Please let me know about this,
Thanks,
Senthil P
HI Swapnilverma,
Thanks,
Whatever you said, will definitely work out to abort the job whenever the condition fails. But in addition to this, i have a other requiremnt. The log message for the job abort should include my comments too.
For my case , the log info should include "("Bank Account ID is defined as decimal(15)")" .
Hope you understand my problem. Please let me know about this.
Thanks,
Senthil P
Thanks,
Whatever you said, will definitely work out to abort the job whenever the condition fails. But in addition to this, i have a other requiremnt. The log message for the job abort should include my comments too.
For my case , the log info should include "("Bank Account ID is defined as decimal(15)")" .
Hope you understand my problem. Please let me know about this.
Thanks,
Senthil P
Why not include the 'reject message' on the aborting link? What do you ultimately need to do with this? The presence of a non-zero byte file could trigger an email with the file as an attachment, something easier than fishing the error out of the job logs.
Just a thought.
Just a thought.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi All,
I resolved this issue in this way,
Seqfile--->Transformer--->Output File
|
|
Peak Stage
I set the stage variable for the IF condition fail=0 , pass=1.
In constratint Stagevar=1 then passed the Input to the output
In Peek stage constraint I kept Stagevar=0 and abort after rows 1. Also in peek stage, i have created the column called LOG_MESSAGE , kept the value as "Whatever i wanted to see in the log file" and i displayed this column in log file.
Its fine now.
Thanks ArndW for your Peek Stage info on this,
Also Sincere Thanks and Wishes for your 10,000 Posts.
Senthil P
I resolved this issue in this way,
Seqfile--->Transformer--->Output File
|
|
Peak Stage
I set the stage variable for the IF condition fail=0 , pass=1.
In constratint Stagevar=1 then passed the Input to the output
In Peek stage constraint I kept Stagevar=0 and abort after rows 1. Also in peek stage, i have created the column called LOG_MESSAGE , kept the value as "Whatever i wanted to see in the log file" and i displayed this column in log file.
Its fine now.
Thanks ArndW for your Peek Stage info on this,
Also Sincere Thanks and Wishes for your 10,000 Posts.
Senthil P