Five Stars ami
Five Stars

Sending conditional mail

Dear's, I am using a talend job to send a mail if ACTIVE_FLAG=1 then send mail else dont send it .

 

here is my job design 

 

pic.JPGpic1.JPG

 

 

Now after tlogrows , i will need to add a tsendmail component , and i want to write a IF condition , IF ACTIVE_FLAG =1 thene send mail else dont send mail .

 

Can you help with this design , with proper and correct syntax please.

 

Many Thanks.

Amit

  • Data Integration
  • Talend Integration Cloud
1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars TRF
Nine Stars

Re: Sending conditional mail

Use the "Filter" flow to connect tFilterRows with tSendMail.

Here is the job picture:

Capture.PNG

 

Regards,

 


TRF
5 REPLIES
Nine Stars TRF
Nine Stars

Re: Sending conditional mail

Is active_Flag a context variable?

I suppose the answer is yes and the variable is defined as a boolean.

After tLogRows, add a tSendMail component and use an "if" link between them (right click tLogRows and select Trigger > Run if).

Click the link and enter the condition: 

context.active_Flag == true

Hope this helps,

 


TRF
Five Stars ami
Five Stars

Re: Sending conditional mail

No ACTIVE_FLAG is a column name , and if that column name has value 1 Then we have to trigger email component

 

Thanks..

 

Nine Stars TRF
Nine Stars

Re: Sending conditional mail

Add a tFilterRows after the tLogRows to keep only the desired rows and connect tSendMail after tFilterRows.

Here is the tFilterRows configuration:

Capture.PNG

 


TRF
Five Stars ami
Five Stars

Re: Sending conditional mail

Dear,

After Tflterrow , i will connect tfilterrow to tsendmail right ?

what trigger i should use  to connect to tsend mail ?

onsubjob  ok?

 

Many Thanks.

Nine Stars TRF
Nine Stars

Re: Sending conditional mail

Use the "Filter" flow to connect tFilterRows with tSendMail.

Here is the job picture:

Capture.PNG

 

Regards,

 


TRF