Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
tmiles-vfpng
Contributor
Contributor

Sending Mail with tSendMail with tJava Condition

I would like to trigger an email when the sql executed returns null rows. However, triggering the email from tJava is proving troublesome. Talend Data Integration Talend Studio 

Labels (5)
1 Solution

Accepted Solutions
tmiles-vfpng
Contributor
Contributor
Author

Solved the issue. Refer to the java code. 

 
// Process rows
while (input_row != null) 
{
    if (input_row.TRNCNT > 1) 
    {
    System.out.println("Systems OK!");
 
        context.rowsProcessed = true;
        return;
    }
return;
}
 
// Check if any rows were processed
if (!context.rowsProcessed) 
{
System.out.println("No Transactions");
    globalMap.put("sendEmail", false);
    return;
}

 

View solution in original post

1 Reply
tmiles-vfpng
Contributor
Contributor
Author

Solved the issue. Refer to the java code. 

 
// Process rows
while (input_row != null) 
{
    if (input_row.TRNCNT > 1) 
    {
    System.out.println("Systems OK!");
 
        context.rowsProcessed = true;
        return;
    }
return;
}
 
// Check if any rows were processed
if (!context.rowsProcessed) 
{
System.out.println("No Transactions");
    globalMap.put("sendEmail", false);
    return;
}