<?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: IDENTIFIER in SQL Views not supported? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141426#M51726</link>
    <description>&lt;P&gt;I had recently the same problem...&lt;/P&gt;</description>
    <pubDate>Mon, 08 Dec 2025 16:57:06 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2025-12-08T16:57:06Z</dc:date>
    <item>
      <title>IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141409#M51715</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;We are phasing out the dollar param `${catalog_name}` because it has been deprecated since runtime 15.2.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Richard3_0-1765199283388.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/22160iB6A6BF7E560A750E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Richard3_0-1765199283388.png" alt="Richard3_0-1765199283388.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We use this parameter in many queries and should now be replaced by the IDENTIFIER clause.&lt;BR /&gt;&lt;BR /&gt;In the query below where we retrieve data from a single catalog, we can switch to the default catalog environment variable from the cluster and remove the catalog from the namespace.&lt;/P&gt;&lt;P&gt;Old situation:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN&gt; TEMPORARY VIEW vw_example&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;SELECT * &lt;/SPAN&gt;&lt;SPAN&gt;FROM&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;${bronze.env}.schema.table&amp;nbsp;&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;New situation with default catalog&amp;nbsp;environment&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN&gt; TEMPORARY VIEW vw_example&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;SELECT * FROM&amp;nbsp;schema.table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where we cannot replace the current dollar param 1-to-1 is in queries where we use multiple catalogs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN&gt; TEMPORARY VIEW vw_example&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;SELECT * &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM&amp;nbsp;${bronze.env}.schema.table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;JOIN&amp;nbsp;&lt;SPAN&gt;${metadata.env}.schema.table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ON 1 = 1 )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;According to the documentation, views are supported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Richard3_1-1765199860462.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/22161i83A49A2B7DC2D6C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Richard3_1-1765199860462.png" alt="Richard3_1-1765199860462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-names-identifier-clause" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-names-identifier-clause&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I can't get this to work with test cases. I might be doing something wrong. CTEs work, but views don't, and I'd like to call the view in a different notebook cell.&lt;/P&gt;&lt;P&gt;If I create the view in one cell and try to call it in another, I get the error message:&lt;/P&gt;&lt;P&gt;A column, variable, or function parameter with the name `env` cannot be resolved.&lt;BR /&gt;First cell:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN&gt; env &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt; &lt;SPAN&gt;DEFAULT&lt;/SPAN&gt; &lt;SPAN&g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&lt;BR /&gt;Second cell:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Select&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; vw_example&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Error:&amp;nbsp;&lt;SPAN&gt;A column, variable, or function parameter with name `env` cannot be resolved. SQLSTATE: 42703&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Curious about your perspective on implementing the IDENTIFIER clause in views with various catalogs as a replacement for the dollar param.&amp;nbsp;I might be doing something wrong and it might just work out of the box.&lt;BR /&gt;&lt;BR /&gt;Thanks!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Richard&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 13:31:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141409#M51715</guid>
      <dc:creator>Richard3</dc:creator>
      <dc:date>2025-12-08T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141422#M51722</link>
      <description>&lt;P&gt;Views CAN accept parameters using DEFINE VIEW parameters:&lt;/P&gt;&lt;P&gt;CREATE OR REPLACE VIEW vw_example (&lt;/P&gt;&lt;P&gt;env STRING&lt;/P&gt;&lt;P&gt;) AS&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM IDENTIFIER('silver_' || env || '.schema.table') u&lt;/P&gt;&lt;P&gt;JOIN IDENTIFIER('gold_' || env || '.schema.table') m&lt;/P&gt;&lt;P&gt;ON 1=1;&lt;/P&gt;&lt;P&gt;Then call it like:&lt;/P&gt;&lt;P&gt;SELECT * FROM vw_example('dev');&lt;/P&gt;&lt;P&gt;This is the most “dbt-like” and robust pattern.&lt;/P&gt;&lt;P&gt;Advantages:&lt;/P&gt;&lt;P&gt;Works across notebooks, clusters, warehouses&lt;/P&gt;&lt;P&gt;No need for global variables&lt;/P&gt;&lt;P&gt;Can inject env at query time&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 16:48:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141422#M51722</guid>
      <dc:creator>Poorva21</dc:creator>
      <dc:date>2025-12-08T16:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141426#M51726</link>
      <description>&lt;P&gt;I had recently the same problem...&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 16:57:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141426#M51726</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2025-12-08T16:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141453#M51730</link>
      <description>&lt;P&gt;There are two options you may want to consider:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Switch to using SQL UDTFs from views in certain cases&lt;/LI&gt;&lt;LI&gt;For each session, dynamically recreate the view using CREATE VIEW via EXECUTE IMMEDIATE or via Python string templating:&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 08 Dec 2025 19:46:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141453#M51730</guid>
      <dc:creator>mnorland</dc:creator>
      <dc:date>2025-12-08T19:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141511#M51747</link>
      <description>&lt;P&gt;Hello!&lt;BR /&gt;Thanks for taking the time to respond. I just can't get this to work. I don't think SQL VIEWS support variables.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 14:16:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/141511#M51747</guid>
      <dc:creator>Richard3</dc:creator>
      <dc:date>2025-12-09T14:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/142037#M51866</link>
      <description>&lt;P&gt;I have good news: in runtime 18, IDENTIFIER and parameter markers are supported everywhere! We need to wait a month or two as the SQL warehouse and serverless are still on runtime 17.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 21:00:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/142037#M51866</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2025-12-16T21:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: IDENTIFIER in SQL Views not supported?</title>
      <link>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/142052#M51870</link>
      <description>&lt;P&gt;Thank you for the info Hubert-Dudek! It's good to see the&lt;SPAN&gt;IDENTIFIER&lt;/SPAN&gt; becoming more widely available in Runtime 18. We will be beta testing and monitoring the release for SQL Warehouse.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 08:20:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/identifier-in-sql-views-not-supported/m-p/142052#M51870</guid>
      <dc:creator>Richard3</dc:creator>
      <dc:date>2025-12-17T08:20:24Z</dc:date>
    </item>
  </channel>
</rss>

