<?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 Using Temporary Functions in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167589#M5558</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently doing my professional internship and working on a reporting project that integrates with Databricks through Unity Catalog functions.&lt;/P&gt;&lt;P&gt;The reporting application is external to Databricks and uses Data Sources, Parameters, Result Sets, Grids, Charts, and Report Definitions to build dashboards. Existing reports consume data through functions referenced by a URI pattern similar to:&lt;/P&gt;&lt;P&gt;fn://catalog.schema.function_name@DATABRICKS.UNITYCATALOG&lt;BR /&gt;Show more lines&lt;/P&gt;&lt;P&gt;My mentor provided an existing report as a starting point and asked me to use it as a template for the new development. The report is already functional and contains the complete structure, including Data Sources, Parameters, Result Sets, Grids, Charts, and Report Definitions. My task is to understand how those pieces work together and then adapt or replace them to support a different dataset.&lt;/P&gt;&lt;P&gt;The challenge is that the new dataset does not currently have equivalent Unity Catalog functions available.&lt;/P&gt;&lt;P&gt;As guidance, my mentor suggested creating temporary functions first, using a pattern such as:&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt;1&lt;BR /&gt;CREATE OR REPLACE TEMPORARY FUNCTION `catalog.schema.function_name`&lt;BR /&gt;2&lt;BR /&gt;RETURNS TABLE (...)&lt;BR /&gt;3&lt;BR /&gt;RETURN ...&lt;BR /&gt;4&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Show more lines&lt;/P&gt;&lt;P&gt;The idea is to prototype the expected interface, validate the returned schema locally with the reporting application, and later create the permanent Unity Catalog functions if the design works correctly.&lt;/P&gt;&lt;P&gt;My mentor has already given me a clear direction, but as an intern I am still connecting the dots and trying to understand the complete flow from temporary functions, to production Unity Catalog functions, to the final report displayed in the application.&lt;/P&gt;&lt;P&gt;Has anyone worked on a similar integration between an external dashboard/reporting application and Databricks?&lt;/P&gt;&lt;P&gt;Any guidance, recommendations, or examples would be greatly appreciated.&lt;/P&gt;&lt;P&gt;I'm still pretty new to this area, so honestly I'm feeling a bit lost and trying to understand the correct path before I spend time going in the wrong direction &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;Thanks in advance! &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2026 17:31:51 GMT</pubDate>
    <dc:creator>Marbricks</dc:creator>
    <dc:date>2026-09-04T17:31:51Z</dc:date>
    <item>
      <title>Using Temporary Functions</title>
      <link>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167589#M5558</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently doing my professional internship and working on a reporting project that integrates with Databricks through Unity Catalog functions.&lt;/P&gt;&lt;P&gt;The reporting application is external to Databricks and uses Data Sources, Parameters, Result Sets, Grids, Charts, and Report Definitions to build dashboards. Existing reports consume data through functions referenced by a URI pattern similar to:&lt;/P&gt;&lt;P&gt;fn://catalog.schema.function_name@DATABRICKS.UNITYCATALOG&lt;BR /&gt;Show more lines&lt;/P&gt;&lt;P&gt;My mentor provided an existing report as a starting point and asked me to use it as a template for the new development. The report is already functional and contains the complete structure, including Data Sources, Parameters, Result Sets, Grids, Charts, and Report Definitions. My task is to understand how those pieces work together and then adapt or replace them to support a different dataset.&lt;/P&gt;&lt;P&gt;The challenge is that the new dataset does not currently have equivalent Unity Catalog functions available.&lt;/P&gt;&lt;P&gt;As guidance, my mentor suggested creating temporary functions first, using a pattern such as:&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt;1&lt;BR /&gt;CREATE OR REPLACE TEMPORARY FUNCTION `catalog.schema.function_name`&lt;BR /&gt;2&lt;BR /&gt;RETURNS TABLE (...)&lt;BR /&gt;3&lt;BR /&gt;RETURN ...&lt;BR /&gt;4&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Show more lines&lt;/P&gt;&lt;P&gt;The idea is to prototype the expected interface, validate the returned schema locally with the reporting application, and later create the permanent Unity Catalog functions if the design works correctly.&lt;/P&gt;&lt;P&gt;My mentor has already given me a clear direction, but as an intern I am still connecting the dots and trying to understand the complete flow from temporary functions, to production Unity Catalog functions, to the final report displayed in the application.&lt;/P&gt;&lt;P&gt;Has anyone worked on a similar integration between an external dashboard/reporting application and Databricks?&lt;/P&gt;&lt;P&gt;Any guidance, recommendations, or examples would be greatly appreciated.&lt;/P&gt;&lt;P&gt;I'm still pretty new to this area, so honestly I'm feeling a bit lost and trying to understand the correct path before I spend time going in the wrong direction &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;Thanks in advance! &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2026 17:31:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167589#M5558</guid>
      <dc:creator>Marbricks</dc:creator>
      <dc:date>2026-09-04T17:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Temporary Functions</title>
      <link>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167704#M5563</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250405"&gt;@Marbricks&lt;/a&gt;&amp;nbsp;your mentor’s approach is useful for validating the function contract, but the temporary function should use an unqualified name&lt;/P&gt;&lt;P&gt;Databricks defines a temporary function in &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-sql-function" target="_blank" rel="noopener"&gt;CREATE FUNCTION&lt;/A&gt; as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;“When you specify TEMPORARY, the created function is valid and visible in the current session. No persistent entry is made in the catalog.”&lt;/BLOCKQUOTE&gt;&lt;P&gt;A three-part reference such as catalog.schema.function_name() resolves to a persistent catalog function. Create and call the prototype without the catalog and schema:&lt;/P&gt;&lt;PRE&gt;CREATE OR REPLACE TEMPORARY FUNCTION function_name(p_id BIGINT)
RETURNS TABLE (id BIGINT, value STRING)
LANGUAGE SQL
RETURN
  SELECT id, value
  FROM catalog.schema.source_table
  WHERE id = p_id;

SELECT * FROM function_name(123);&lt;/PRE&gt;&lt;P&gt;The reporting application can use this temporary function only if it creates and invokes it through the same Databricks session. A new or pooled connection may use a different session and will not see it.&lt;/P&gt;&lt;P&gt;The fn://catalog.schema.function_name@DATABRICKS.UNITYCATALOG value is not Databricks SQL syntax; it appears to be your reporting connector’s resource URI. For the final integration, create the permanent Unity Catalog table function with the three-part name:&lt;/P&gt;&lt;PRE&gt;CREATE OR REPLACE FUNCTION catalog.schema.function_name(p_id BIGINT)
RETURNS TABLE (id BIGINT, value STRING)
LANGUAGE SQL
RETURN
  SELECT id, value
  FROM catalog.schema.source_table
  WHERE id = p_id;&lt;/PRE&gt;&lt;P&gt;Keep the parameter types and returned column names/types identical to the tested contract. Grant the application principal USE CATALOG, USE SCHEMA, and EXECUTE. The function owner must retain access to the source objects because SQL UDF bodies run with the owner’s privileges.&lt;/P&gt;&lt;P&gt;Databricks &lt;A href="https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/privileges-reference" target="_blank" rel="noopener"&gt;recommends&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;“Following the principle of least privilege, Databricks recommends granting EXECUTE on individual functions.”&lt;/BLOCKQUOTE&gt;&lt;P&gt;Test the permanent function in Databricks SQL, then confirm that the reporting connector supports Unity Catalog table functions and parameter binding through its fn:// URI.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2026 17:00:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167704#M5563</guid>
      <dc:creator>ivanvyd</dc:creator>
      <dc:date>2026-09-06T17:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Temporary Functions</title>
      <link>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167767#M5564</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/249473"&gt;@ivanvyd&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand it correctly, fn://catalog.schema.function_name@DATABRICKS.UNITYCATALOG&amp;nbsp;is a URI that uniquely identifies a Unity Catalog SQL or Python function. It is primarily used by Databricks AI Agents and MCP integrations to discover and invoke governed Unity Catalog functions as tools. The URI contains the catalog, schema, function name, and the Unity Catalog provider namespace, enabling secure, permission-controlled tool calling.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;The agent call the function as a tool using a URI like fn://catalog.schema.function@DATABRICKS.UNITYCATALOG. This provides governance, auditing, RBAC, and abstraction of the underlying model.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Table&amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;main.sales.customers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;Function -&amp;gt;&amp;nbsp; &amp;nbsp; fn://catalog.schema.function@DATABRICKS.UNITYCATALOG&lt;/DIV&gt;&lt;DIV class=""&gt;Model&amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;&amp;nbsp; &amp;nbsp; models:/model_name/version_or_alias&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250405"&gt;@Marbricks&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;DIV&gt;&lt;P&gt;Instead of using a temporary function, I would recommend creating a regular function in the Dev environment. Since temporary functions are session-scoped, they are only available within the current session. A regular function will be registered in Unity Catalog and should be sufficient for completing your POC.&lt;/P&gt;&lt;P&gt;Use a temporary function only when your report is session-specific and the function is both created and consumed within the same session.&lt;/P&gt;&lt;P&gt;Below terms seem specific to SSRS&amp;nbsp; &amp;nbsp;-&amp;nbsp;&lt;SPAN&gt;Data Sources, Parameters, Result Sets, Grids, Charts, and Report Definitions. you can check in SSRS documentation as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Sep 2026 09:04:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167767#M5564</guid>
      <dc:creator>rkhand14_ltm</dc:creator>
      <dc:date>2026-09-07T09:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Temporary Functions</title>
      <link>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167782#M5565</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250405"&gt;@Marbricks&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Follow&amp;nbsp;this approach: define the function’s interface first, then connect the real data. Use a temporary function for testing within the same session, and a persistent Unity Catalog function in a development schema for testing with the external reporting application.&lt;/P&gt;&lt;P&gt;1. Prototype the expected parameters and output columns&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE TEMPORARY FUNCTION report_data(p_id BIGINT)
RETURNS TABLE (id BIGINT, label STRING, amount DOUBLE)
LANGUAGE SQL
RETURN
  SELECT p_id, 'Prototype', CAST(100 AS DOUBLE);

SELECT * FROM report_data(123);&lt;/LI-CODE&gt;&lt;P&gt;Temporary functions exist only in the session that creates them. An external application using another connection will not see this function.&lt;/P&gt;&lt;P&gt;2. Test the application with an UC registered function&lt;/P&gt;&lt;P&gt;Create the same prototype using (With same definition from Above):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE FUNCTION dev_catalog.reporting.report_data(...)&lt;/LI-CODE&gt;&lt;P&gt;Reuse the parameters, return schema, and body from step 1, removing TEMPORARY and using the fully qualified name.&lt;/P&gt;&lt;P&gt;Update the report’s data source using the same URI format as the working report:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fn://dev_catalog.reporting.report_data@DATABRICKS.UNITYCATALOG&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Map the report parameters to the functions arguments and bind the returned columns to the grids and charts.&lt;/P&gt;&lt;P&gt;Potential Flow is:&lt;STRONG&gt;&amp;nbsp;Report parameter → Function argument → Returned result set → Grid/chart&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3. Replace the prototype body with real data&lt;/P&gt;&lt;P&gt;If the dataset is already in databricks, SQL function can query it as:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RETURN
  SELECT s.id, s.label, s.amount
  FROM dev_catalog.reporting.source_data AS s
  WHERE s.id = p_id;&lt;/LI-CODE&gt;&lt;P&gt;Alternatively, If the data comes from an external API, expose a Python table function that fetches the data and returns rows with a defined schema.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE FUNCTION dev_catalog.reporting.api_data(p_id BIGINT)
RETURNS TABLE (id BIGINT, label STRING, amount DOUBLE)
LANGUAGE PYTHON
HANDLER 'ApiData'
AS $$
class ApiData:
    def eval(self, p_id):
        import requests

        response = requests.get(
            "https://api.example.com/data",
            params={"id": p_id},
            timeout=30,
        )
        response.raise_for_status()

        for row in response.json()["data"]:
            yield int(row["id"]), row["label"], float(row["amount"])
$$;&lt;/LI-CODE&gt;&lt;P&gt;The reporting application consumes it like any other table function:&lt;/P&gt;&lt;P&gt;SELECT * FROM dev_catalog.reporting.api_data(123);&lt;/P&gt;&lt;P&gt;Before testing, grant the application identity USE_CATALOG, USE_SCHEMA, EXECUTE&amp;nbsp;on the function, plus access to the compute endpoint. For the API example, confirm the compute (Databricks Run Time) supports UC Python table functions, configure API authentication, and ensure network access to the endpoint. Once validated, deploy the production function, update the report URI, and preserve the tested parameters and output schema.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2026 09:51:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/using-temporary-functions/m-p/167782#M5565</guid>
      <dc:creator>data_pulse</dc:creator>
      <dc:date>2026-09-07T09:51:08Z</dc:date>
    </item>
  </channel>
</rss>

