Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have recently started using Talend. I am trying to create and schedule a job that extracts data from a MySQL database and email the results.
This is what my Designer section looks like.
The data is being fetched BUT
Issue 1: instead of just one email, several emails are being generated with identical results.
I have used tJavaRow to incorporate some js into my job. To show the output in a table format, I have used html tags:
The email that is being received looks like this:
This is what my tJavaRow code looks like:
output_row.EngineID = input_row.EngineID;
output_row.Status = input_row.Status;
if (input_row.Status.equals("Server Was Rebooted!")){
output_row.color = "Red";
}else
output_row.color = "Green";
String msg = ((String)globalMap.getOrDefault("mailMsg", "<table><tr><th>EngineID</th><th>Status</th><th>color</th></tr>"));
msg = msg +
"<tr>" +
"<td>" + output_row.EngineID + "</td>" +
"<td>" + output_row.Status + "</td>" +
"<td>" + output_row.color + "</td>" +
"</tr>";
globalMap.put("mailMsg", msg);
Issue 2: why doesn't the email show the table borders? I have also tried inserting table border in my html tags? where can I put the css? it gives me errors when I place them in my tJavaRow component.
Any good practices that you would like to share with a newbie?