<?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 Way to send SQL query results from a Databricks notebook via email in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/way-to-send-sql-query-results-from-a-databricks-notebook-via/m-p/147611#M52764</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m working with a Databricks notebook where I run a SQL query using spark.sql. The query returns a small result set (mainly counts or summary values).&lt;/P&gt;&lt;P&gt;Once the notebook finishes running, I need to automatically send the query result from the Databricks notebook to an email (Outlook).&lt;/P&gt;&lt;P&gt;I’m looking for the simplest and commonly used approach to do this directly from a Databricks notebook, just a clean and reliable solution.&lt;/P&gt;&lt;P&gt;Any guidance or best practices would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 09 Feb 2026 06:10:08 GMT</pubDate>
    <dc:creator>faizan_111111</dc:creator>
    <dc:date>2026-02-09T06:10:08Z</dc:date>
    <item>
      <title>Way to send SQL query results from a Databricks notebook via email</title>
      <link>https://community.databricks.com/t5/data-engineering/way-to-send-sql-query-results-from-a-databricks-notebook-via/m-p/147611#M52764</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m working with a Databricks notebook where I run a SQL query using spark.sql. The query returns a small result set (mainly counts or summary values).&lt;/P&gt;&lt;P&gt;Once the notebook finishes running, I need to automatically send the query result from the Databricks notebook to an email (Outlook).&lt;/P&gt;&lt;P&gt;I’m looking for the simplest and commonly used approach to do this directly from a Databricks notebook, just a clean and reliable solution.&lt;/P&gt;&lt;P&gt;Any guidance or best practices would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 06:10:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/way-to-send-sql-query-results-from-a-databricks-notebook-via/m-p/147611#M52764</guid>
      <dc:creator>faizan_111111</dc:creator>
      <dc:date>2026-02-09T06:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Way to send SQL query results from a Databricks notebook via email</title>
      <link>https://community.databricks.com/t5/data-engineering/way-to-send-sql-query-results-from-a-databricks-notebook-via/m-p/147613#M52765</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/144140"&gt;@faizan_111111&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I would suggest setting up an email destination around a SQL Alert which should give you the ability to see returned results in the&amp;nbsp;QUERY_RESULT_TABLEvariable. See: &lt;A href="https://docs.databricks.com/aws/en/sql/user/alerts/" target="_self"&gt;https://docs.databricks.com/aws/en/sql/user/alerts/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If this doesn't fit your use case exactly you could look at various python libraries that are designed to send emails. e.g &lt;A href="https://docs.python.org/3/library/smtplib.html" target="_self"&gt;https://docs.python.org/3/library/smtplib.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 06:20:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/way-to-send-sql-query-results-from-a-databricks-notebook-via/m-p/147613#M52765</guid>
      <dc:creator>Marc_Gibson96</dc:creator>
      <dc:date>2026-02-09T06:20:46Z</dc:date>
    </item>
  </channel>
</rss>

