<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SQL Alert Email with QUERY_RESULTS_TABLE results in table with no border in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/sql-alert-email-with-query-results-table-results-in-table-with/m-p/55477#M1104</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am sending databricks sql alerts to an email. I am trying to get the query results table in the body of the email.&lt;/P&gt;&lt;P&gt;I have used a custom template with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{{QUERY_RESULT_TABLE}}&lt;/LI-CODE&gt;&lt;P&gt;and this works fine for a teams alert. In Teams, I can see the table properly formatted as a table.&lt;/P&gt;&lt;P&gt;However, using the same for an email destination, results in a table with no borders- which is pretty much useless.&lt;/P&gt;&lt;P&gt;I have tried various options and none have worked.&lt;/P&gt;&lt;P&gt;the best I could get to was a horizontal row seperator using&amp;nbsp; the hr tag.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;AssetId&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Source&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;CycleId&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Delay_Hours&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;LastLoadedTimestamp&amp;lt;/th&amp;gt;
{{#QUERY_RESULT_ROWS}}
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{AssetId}}&amp;lt;/td&amp;gt; 
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{Source}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{CycleId}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{Delay_Hours}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{LastLoadedTimestamp}}&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
{{/QUERY_RESULT_ROWS}}
&amp;lt;/table&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I miss the column borders. I also tried setting the border property of the table using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;table border="1"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Like, I said:&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I tried bunch of "style" tags, but those are not recognized by the template.&lt;/P&gt;&lt;P&gt;I have gone through the documentation and understand he supported tags:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/user/alerts/#--create-an-alert" target="_self"&gt;https://learn.microsoft.com/en-us/azure/databricks/sql/user/alerts/#--create-an-alert&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else should I be doing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2023 07:40:14 GMT</pubDate>
    <dc:creator>SaugatMukherjee</dc:creator>
    <dc:date>2023-12-19T07:40:14Z</dc:date>
    <item>
      <title>SQL Alert Email with QUERY_RESULTS_TABLE results in table with no border</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/sql-alert-email-with-query-results-table-results-in-table-with/m-p/55477#M1104</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am sending databricks sql alerts to an email. I am trying to get the query results table in the body of the email.&lt;/P&gt;&lt;P&gt;I have used a custom template with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{{QUERY_RESULT_TABLE}}&lt;/LI-CODE&gt;&lt;P&gt;and this works fine for a teams alert. In Teams, I can see the table properly formatted as a table.&lt;/P&gt;&lt;P&gt;However, using the same for an email destination, results in a table with no borders- which is pretty much useless.&lt;/P&gt;&lt;P&gt;I have tried various options and none have worked.&lt;/P&gt;&lt;P&gt;the best I could get to was a horizontal row seperator using&amp;nbsp; the hr tag.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;AssetId&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Source&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;CycleId&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Delay_Hours&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;LastLoadedTimestamp&amp;lt;/th&amp;gt;
{{#QUERY_RESULT_ROWS}}
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{AssetId}}&amp;lt;/td&amp;gt; 
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{Source}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{CycleId}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{Delay_Hours}}&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;hr style="margin:0"/&amp;gt;{{LastLoadedTimestamp}}&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
{{/QUERY_RESULT_ROWS}}
&amp;lt;/table&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I miss the column borders. I also tried setting the border property of the table using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;table border="1"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Like, I said:&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I tried bunch of "style" tags, but those are not recognized by the template.&lt;/P&gt;&lt;P&gt;I have gone through the documentation and understand he supported tags:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/user/alerts/#--create-an-alert" target="_self"&gt;https://learn.microsoft.com/en-us/azure/databricks/sql/user/alerts/#--create-an-alert&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else should I be doing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 07:40:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/sql-alert-email-with-query-results-table-results-in-table-with/m-p/55477#M1104</guid>
      <dc:creator>SaugatMukherjee</dc:creator>
      <dc:date>2023-12-19T07:40:14Z</dc:date>
    </item>
  </channel>
</rss>

