Search code examples
etltalend

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


I'm building a job on Talend Open Studio 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?


Solution

  • You can achieve this by using tDBInput -> tFlowToIterate -> tSendMail components. tDBInput will read the data from your DB table, and for every row it will send an email. You can grab the data fetched from tDBInput in tSendMail by using (String) globalMap.get("row1.FieldNeeded")

    enter image description here

    Hope this helps.