Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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;
}