<?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: CREATE OR REPLACE VIEW removes permissions [Unity Catalog] in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/108922#M2403</link>
    <description>&lt;P&gt;I've just encountered this exact same problem where the behaviour of CREATE OR REPLACE for Tables keeps the permissions but loses them for Views. Very frustrating as it creates a race condition within the CI/CD to resolve!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/6280"&gt;@marcell_nagy&lt;/a&gt;&amp;nbsp; or&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/90597"&gt;@vmpmreistad&lt;/a&gt;&amp;nbsp; did either of you ever get any response from Databricks on this being resolved?&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2025 09:33:04 GMT</pubDate>
    <dc:creator>gavinchi-onmo</dc:creator>
    <dc:date>2025-02-05T09:33:04Z</dc:date>
    <item>
      <title>CREATE OR REPLACE VIEW removes permissions [Unity Catalog]</title>
      <link>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/49602#M1424</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When I run CREATE OR REPLACE VIEW on an existing view in Unity Catalog, the grants that were made on that object are removed. This seems like it is a bug. Is it on purpose or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;How to replicate:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Create the view&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Run the create or replace statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;create or replace view bronze.default.test_access_view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select 1 as one;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Grant access to a user&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Run a statement to grant access&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;grant select on bronze.default.test_access_view to `user1`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Verify that user has access to view&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;4. Rerun the create or replace view statement&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;create or replace view bronze.default.test_access_view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select 1 as one;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5.&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Check permissions&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;User1 does not have permission on the table anymore.&lt;/SPAN&gt;&lt;SPAN&gt;The reason I suspect this is a bug is because if I run CREATE OR REPLACE TABLE instead of view, and follow the same exact procedures as above, then user1 does not lose access to the table afterwards.&lt;/SPAN&gt;&lt;SPAN&gt;Is this a bug that can be fixed?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 14:06:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/49602#M1424</guid>
      <dc:creator>vmpmreistad</dc:creator>
      <dc:date>2023-10-20T14:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: CREATE OR REPLACE VIEW removes permissions [Unity Catalog]</title>
      <link>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/87410#M2069</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;, you are wrong, this is a bug. I'll file an issue to remove this feature from Databricks. It can be of course possible to change only the definition/code of the view and do not touch or just copy the previous permissions. Permission management always had separated commands and UI tab, and it is very bad for CI/CD tasks, where alter view is not the same and thus not an alternative. Even if it relates to the create or replace view, Databricks SQL can create keywords to tell that when replacing the view, do not touch the permissions. Or just a command to refresh the code of the view. Maybe changing/keeping the permissions could be controlled under another permission. So there are lot of possibilities.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 19:45:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/87410#M2069</guid>
      <dc:creator>marcell_nagy</dc:creator>
      <dc:date>2024-09-02T19:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: CREATE OR REPLACE VIEW removes permissions [Unity Catalog]</title>
      <link>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/108922#M2403</link>
      <description>&lt;P&gt;I've just encountered this exact same problem where the behaviour of CREATE OR REPLACE for Tables keeps the permissions but loses them for Views. Very frustrating as it creates a race condition within the CI/CD to resolve!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/6280"&gt;@marcell_nagy&lt;/a&gt;&amp;nbsp; or&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/90597"&gt;@vmpmreistad&lt;/a&gt;&amp;nbsp; did either of you ever get any response from Databricks on this being resolved?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 09:33:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/108922#M2403</guid>
      <dc:creator>gavinchi-onmo</dc:creator>
      <dc:date>2025-02-05T09:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: CREATE OR REPLACE VIEW removes permissions [Unity Catalog]</title>
      <link>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/125329#M2536</link>
      <description>&lt;P&gt;Would also love any sort of communication back from Databricks on why create or replace view acts like this.&lt;/P&gt;&lt;P&gt;I have had to run my CICD once with create (or replace) and then make a code change to swap to "alter view," which per&amp;nbsp;&lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-view," target="_blank"&gt;https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-view,&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;is equivalent to a CREATE OR REPLACE VIEW statement on an existing view, except that privileges granted on the view are preserved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It feels, sure...fine.&amp;nbsp; But our table/view creates are run in the same workflow as our ETL, and making me deploy through my environments with something I can only run once to then change and deploy again so that I can change the guts of my view is not ideal.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 15:56:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/create-or-replace-view-removes-permissions-unity-catalog/m-p/125329#M2536</guid>
      <dc:creator>md1828459045</dc:creator>
      <dc:date>2025-07-15T15:56:13Z</dc:date>
    </item>
  </channel>
</rss>

