Hi,
I am sending databricks sql alerts to an email. I am trying to get the query results table in the body of the email.
I have used a custom template with
{{QUERY_RESULT_TABLE}}
and this works fine for a teams alert. In Teams, I can see the table properly formatted as a table.
However, using the same for an email destination, results in a table with no borders- which is pretty much useless.
I have tried various options and none have worked.
the best I could get to was a horizontal row seperator using the hr tag.
e.g.
<html>
<table>
<tr><th>AssetId</th><th>Source</th><th>CycleId</th><th>Delay_Hours</th><th>LastLoadedTimestamp</th>
{{#QUERY_RESULT_ROWS}}
<tr>
<td><hr style="margin:0"/>{{AssetId}}</td>
<td><hr style="margin:0"/>{{Source}}</td>
<td><hr style="margin:0"/>{{CycleId}}</td>
<td><hr style="margin:0"/>{{Delay_Hours}}</td>
<td><hr style="margin:0"/>{{LastLoadedTimestamp}}</td>
</tr>
{{/QUERY_RESULT_ROWS}}
</table>
</html>
but I miss the column borders. I also tried setting the border property of the table using
<table border="1">
Like, I said:
Just using QUERY_RESULT_TABLE works for teams, it is only outlook email, that is the problem. Outlook is a essential mode of communication in every organization, so this is quite important that people are able to make sense of it.
I tried bunch of "style" tags, but those are not recognized by the template.
I have gone through the documentation and understand he supported tags: https://learn.microsoft.com/en-us/azure/databricks/sql/user/alerts/#--create-an-alert
What else should I be doing?