Send an email according to a query result after each insert in the table

Highlighted
Six Stars

Send an email according to a query result after each insert in the table

I'm building a job that allows me to charge Data from SQL Server table into different tables. Then I want to execute some queries on the new charged tables and send e-mail according to the query result after each insert in those tables. 

 

Is it possible to do that with Talend Open Studio and if so, Can you guide me through this ?


Accepted Solutions
Employee

Re: Send an email according to a query result after each insert in the table

Hi,

 

     The essence I want to say is that depending on your conditions, you can create data from multiple output data flows to your mail system by configuring the data accordingly. 

 

      The below links are having scenarios where mails will be send in case of error and mails transmitting based on input data. You will be more interested in second link where the data is transmitted from a file source. In your case, it will be the output from tMap. You need to modify the steps according to your specific use case.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/1cI0j9wKAYr~17MIMyzKIQ

 

https://help.talend.com/reader/Ok43Kg3ngFDpParZTRS4Tg/MyK~z4vo0uDqz8lRXAMq7w

 

 


All Replies
Moderator

Re: Send an email according to a query result after each insert in the table

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Send an email according to a query result after each insert in the table

here's an overview of my job where I charge data from the source to Vehicule tableCapture.PNG

and  here you find the column of the table Vehicule

&.PNG 

 

What I want to do is to compare between SGW and CP8 (for exemple) and if they are not the same I send an alert mail to the user.

Employee

Re: Send an email according to a query result after each insert in the table

Hi,

 

    In the tMap output section, do a string comparison (assuming both are not null) like below.

 

!row2.CP8.equals(row2.SGW)

    This will make sure that all non matching records will be filtered to a separate flow. You can join this data to a tFlowtoIterate (to loop the records to be processed one record at a time) and after that to tSendMail component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Six Stars

Re: Send an email according to a query result after each insert in the table

I want them to be inserted even if they are matching. and this is just an example. in other cases, I need to execute queries between different tables and see if i can send the result in tsend 

Employee

Re: Send an email according to a query result after each insert in the table

Hi,

 

     The essence I want to say is that depending on your conditions, you can create data from multiple output data flows to your mail system by configuring the data accordingly. 

 

      The below links are having scenarios where mails will be send in case of error and mails transmitting based on input data. You will be more interested in second link where the data is transmitted from a file source. In your case, it will be the output from tMap. You need to modify the steps according to your specific use case.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/1cI0j9wKAYr~17MIMyzKIQ

 

https://help.talend.com/reader/Ok43Kg3ngFDpParZTRS4Tg/MyK~z4vo0uDqz8lRXAMq7w

 

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download