<?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 Re: AI Playground access Tools(SQL Function) with spark connect PERMISSION_DENIED in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156165#M1794</link>
    <description>&lt;P&gt;Thanks for the hint. My problem is at AI playground and it goes different entry point. I have to enable the serverless generic compute to enable this usage. The normal function works at the serverless SQL. Maybe do you have some documentation explain the authentication / connection process happened behind?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2026 13:11:34 GMT</pubDate>
    <dc:creator>loujiang</dc:creator>
    <dc:date>2026-05-05T13:11:34Z</dc:date>
    <item>
      <title>AI Playground access Tools(SQL Function) with spark connect PERMISSION_DENIED</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156048#M1790</link>
      <description>&lt;P&gt;Hello, Dear community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one SQL function defined in Unity Catalog accessing delta table in the unity catalog. It works normally if i use SQL to execute Function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the possibility connecting function to Agent/ Chat. For the quick prototype, I just try with the AI playground tab and include the function as a tool. With the first trial, it give back the&amp;nbsp;Error: dbconnectshaded.v15.org.sparkproject.io.grpc.StatusRuntimeException: PERMISSION_DENIED: PERMISSION_DENIED: Cannot access Spark Connect. (requestId=fd346bc6-eafb-42eb-a32e-883578db6d1b)Error: Error: dbconnectshaded.v15.org.sparkproject.io.grpc.StatusRuntimeException: PERMISSION_DENIED: PERMISSION_DENIED: Cannot access Spark Connect. (requestId=fd346bc6-eafb-42eb-a32e-883578db6d1b).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like the Tool and Function call are different. How can I enable the Tool getting the spark and how it will be authenticated? For my simple case, I do not what to use the heavy solution with link to genie spaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;best wishes&lt;/P&gt;&lt;P&gt;loujiang&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 07:04:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156048#M1790</guid>
      <dc:creator>loujiang</dc:creator>
      <dc:date>2026-05-04T07:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: AI Playground access Tools(SQL Function) with spark connect PERMISSION_DENIED</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156149#M1793</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/229070"&gt;@loujiang&lt;/a&gt;,&amp;nbsp; a few questions to understand the issue.&lt;/P&gt;&lt;P&gt;Does your workspace have serverless compute enabled?&lt;BR /&gt;When AI Playground calls your function as a tool, is there an active classic cluster attached ?&lt;BR /&gt;If you have a classic cluster, is it configured with Spark Connect enabled (which runtime, single-user or shared access mode)?&lt;BR /&gt;Is it a scalar function or a table-valued function?&lt;BR /&gt;Are you running as your personal user or through a service principal?&lt;BR /&gt;Does your user have USE CATALOG, USE SCHEMA, and EXECUTE on the function ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Why I'm asking :&lt;BR /&gt;calling a SQL function directly via SQL uses a SQL warehouse.&lt;BR /&gt;But when AI Playground invokes it as a tool, it goes through Spark Connect — a completely different entry point that needs its own compute and auth.&lt;/P&gt;&lt;P&gt;Try&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;spark&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"SELECT * from catalog.shema.my_function(arg)"&lt;/SPAN&gt;&lt;SPAN&gt;) in a notebook.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 11:43:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156149#M1793</guid>
      <dc:creator>Oliver_learning</dc:creator>
      <dc:date>2026-05-05T11:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: AI Playground access Tools(SQL Function) with spark connect PERMISSION_DENIED</title>
      <link>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156165#M1794</link>
      <description>&lt;P&gt;Thanks for the hint. My problem is at AI playground and it goes different entry point. I have to enable the serverless generic compute to enable this usage. The normal function works at the serverless SQL. Maybe do you have some documentation explain the authentication / connection process happened behind?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 13:11:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/ai-playground-access-tools-sql-function-with-spark-connect/m-p/156165#M1794</guid>
      <dc:creator>loujiang</dc:creator>
      <dc:date>2026-05-05T13:11:34Z</dc:date>
    </item>
  </channel>
</rss>

