Hi all,
I have to implement a logic where in i will have to abort after 5 rows are rejected while i load into a target table. Can any one please help me out.
Thanks in Advance
How to send an e-mail notification after 5 rows are rejected
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This is effected in the same grid where you enter your output link constraint expressions in a Transformer stage. The fourth (rightmost) column in the grid is labelled "Abort After Rows". Put 5 against your rejects link. That's all you have to do to get the job to abort.
In its controlling job sequence you need to detect that condition (a Failure trigger), send your email and, ideally, run the job again with the run type "reset".
In its controlling job sequence you need to detect that condition (a Failure trigger), send your email and, ideally, run the job again with the run type "reset".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Use DSSendMail routine
I have done this..
D/S has a built in routine called DSSendMail. You can call this from the Derivation or constraints inside the transformer.
Eg From Derivation
If @OUTROWNUM > 5 Then DSSendMail(StageVar) Else InputLink.MappingCol
StageVar is /n seperated parameters consisting of your exchange server name, target user, originator etc. This is available in the DSSendMail Routine's Long Description
The output link can go to a dummy nul stage or a temporary hash file
Regards
Rangs
D/S has a built in routine called DSSendMail. You can call this from the Derivation or constraints inside the transformer.
Eg From Derivation
If @OUTROWNUM > 5 Then DSSendMail(StageVar) Else InputLink.MappingCol
StageVar is /n seperated parameters consisting of your exchange server name, target user, originator etc. This is available in the DSSendMail Routine's Long Description
The output link can go to a dummy nul stage or a temporary hash file
Regards
Rangs