<?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 External functions on a SQL endpoint in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/external-functions-on-a-sql-endpoint/m-p/24664#M17171</link>
    <description>&lt;P&gt; want to create an external function using &lt;A href="https://docs.databricks.com/spark/latest/spark-sql/language-manual/sql-ref-syntax-ddl-create-function.html?_ga=2.95002588.1119862750.1647848981-245442605.1638253457" alt="https://docs.databricks.com/spark/latest/spark-sql/language-manual/sql-ref-syntax-ddl-create-function.html?_ga=2.95002588.1119862750.1647848981-245442605.1638253457" target="_blank"&gt;CREATE FUNCTION (External)&lt;/A&gt; and expose it to users of my SQL endpoint. Although this works from a SQL notebook, if I try to use the function from a SQL endpoint, I get "User defined expression is not supported on a SQL endpoint." Specifically, the function is created by doing this, like the example in the CREATE FUNCTION (External) docs says.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE FUNCTION f1 AS 'SimpleUDF' USING JAR '/dbfs/FileStore/udf.jar'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Screenshot of error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot 2022-03-24 at 21.32.59"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1982iD4B9E2450B4DEFC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-03-24 at 21.32.59" alt="Screenshot 2022-03-24 at 21.32.59" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JAR lives in DBFS. Maybe the reason why this doesn't work is that a SQL endpoint doesn't have access to DBFS? I haven't been able to find anything about this, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Mar 2022 14:49:21 GMT</pubDate>
    <dc:creator>Vegard_Stikbakk</dc:creator>
    <dc:date>2022-03-25T14:49:21Z</dc:date>
    <item>
      <title>External functions on a SQL endpoint</title>
      <link>https://community.databricks.com/t5/data-engineering/external-functions-on-a-sql-endpoint/m-p/24664#M17171</link>
      <description>&lt;P&gt; want to create an external function using &lt;A href="https://docs.databricks.com/spark/latest/spark-sql/language-manual/sql-ref-syntax-ddl-create-function.html?_ga=2.95002588.1119862750.1647848981-245442605.1638253457" alt="https://docs.databricks.com/spark/latest/spark-sql/language-manual/sql-ref-syntax-ddl-create-function.html?_ga=2.95002588.1119862750.1647848981-245442605.1638253457" target="_blank"&gt;CREATE FUNCTION (External)&lt;/A&gt; and expose it to users of my SQL endpoint. Although this works from a SQL notebook, if I try to use the function from a SQL endpoint, I get "User defined expression is not supported on a SQL endpoint." Specifically, the function is created by doing this, like the example in the CREATE FUNCTION (External) docs says.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE FUNCTION f1 AS 'SimpleUDF' USING JAR '/dbfs/FileStore/udf.jar'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Screenshot of error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot 2022-03-24 at 21.32.59"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1982iD4B9E2450B4DEFC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-03-24 at 21.32.59" alt="Screenshot 2022-03-24 at 21.32.59" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JAR lives in DBFS. Maybe the reason why this doesn't work is that a SQL endpoint doesn't have access to DBFS? I haven't been able to find anything about this, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 14:49:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/external-functions-on-a-sql-endpoint/m-p/24664#M17171</guid>
      <dc:creator>Vegard_Stikbakk</dc:creator>
      <dc:date>2022-03-25T14:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: External functions on a SQL endpoint</title>
      <link>https://community.databricks.com/t5/data-engineering/external-functions-on-a-sql-endpoint/m-p/24665#M17172</link>
      <description>&lt;P&gt;It is separated runtime &lt;A href="https://docs.databricks.com/sql/release-notes/index.html#channels" target="test_blank"&gt;https://docs.databricks.com/sql/release-notes/index.html#channels&lt;/A&gt; so it seems that it is not yet supported. &lt;/P&gt;&lt;P&gt;There is CREATE FUNCTION documentation but it seems that it is support only SQL syntax &lt;A href="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html" target="test_blank"&gt;https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 14:22:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/external-functions-on-a-sql-endpoint/m-p/24665#M17172</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-03-28T14:22:07Z</dc:date>
    </item>
  </channel>
</rss>

