<?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: [13.3] Vacuum on table fails if shallow clone without write access exists in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57603#M30840</link>
    <description>&lt;P&gt;Are you using Unity Catalog in single user access mode? If yes, could you try using shared access mode.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 15:33:18 GMT</pubDate>
    <dc:creator>Lakshay</dc:creator>
    <dc:date>2024-01-17T15:33:18Z</dc:date>
    <item>
      <title>[13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57589#M30838</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;We use unity catalog, separating our dev, test and prod data into individual catalogs.&lt;/P&gt;&lt;P&gt;We run weekly vacuums on our prod catalog using a service principal that only has (read+write) access to this production catalog, but no access to our dev/test catalogs. I'd like to keep it this way if possible.&lt;/P&gt;&lt;P&gt;For testing, we do shallow clones from these production tables to the test catalog, using a separate service principal that has (read-only) access to the prod catalog, as well as (read+write) access to the test catalog.&lt;/P&gt;&lt;P&gt;However, when we do such a shallow clone on a (managed) table in Databricks Runtime 13.3, our production service principal cannot run vacuum on the *source table* anymore:&lt;/P&gt;&lt;PRE&gt;com.databricks.sql.managedcatalog.acl.UnauthorizedAccessException: PERMISSION_DENIED: User does not have USE CATALOG on Catalog 'test-catalog'&lt;/PRE&gt;&lt;P&gt;This is very unexpected. It seems like the service principal needs access to the &lt;STRONG&gt;clone &lt;/STRONG&gt;to be able to vacuum the &lt;STRONG&gt;original table&lt;/STRONG&gt;. The other way around makes sense, but it doesn't make sense that I need access to the cloned tables to vacuum the original. Right now, it is possible to disturb our production job just by cloning the table somewhere else.&lt;/P&gt;&lt;P&gt;Is this a bug? Is there any workaround?&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 14:12:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57589#M30838</guid>
      <dc:creator>pyter</dc:creator>
      <dc:date>2024-01-17T14:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: [13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57603#M30840</link>
      <description>&lt;P&gt;Are you using Unity Catalog in single user access mode? If yes, could you try using shared access mode.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 15:33:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57603#M30840</guid>
      <dc:creator>Lakshay</dc:creator>
      <dc:date>2024-01-17T15:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: [13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57677#M30858</link>
      <description>&lt;P&gt;Thanks for the suggestion, I will try that now.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 08:59:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57677#M30858</guid>
      <dc:creator>pyter</dc:creator>
      <dc:date>2024-01-18T08:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: [13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57695#M30867</link>
      <description>&lt;P&gt;It actually worked, thank you! Do you happen to know the technical reason why this does not work in single-user mode? I wonder if I should report this as a bug to databricks.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 09:44:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57695#M30867</guid>
      <dc:creator>pyter</dc:creator>
      <dc:date>2024-01-18T09:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: [13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57742#M30891</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/98334"&gt;@pyter&lt;/a&gt;&amp;nbsp;, This is actually an expected scenario while working with Unity Catalog in Single User access mode. This is also documented here:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/delta/clone-unity-catalog.html#work-with-shallow-cloned-tables-in-single-user-access-mode" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/delta/clone-unity-catalog.html#work-with-shallow-cloned-tables-in-single-user-access-mode&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is an excerpt from this document:&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Databricks recommends working with Unity Catalog clones on compute with shared access mode as this allows independent evolution of permissions for Unity Catalog shallow clone targets and their source tables.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 11:55:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57742#M30891</guid>
      <dc:creator>Lakshay</dc:creator>
      <dc:date>2024-01-18T11:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: [13.3] Vacuum on table fails if shallow clone without write access exists</title>
      <link>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57750#M30898</link>
      <description>&lt;P&gt;I actually read through this section before posting here. I did not think this applies to my situation the way it is worded, as the failed job does not touch the cloned table at all, it only deals with the original table. The creator of the original table might not even know that a clone has occurred, so it is surprising to me that this changes operations on the original table.&lt;BR /&gt;&lt;BR /&gt;I don't fully understand how the shared access mode differs to single-user mode on job-clusters (that aren't actually used by multiple people), but I will enable it for my vacuum job since that seems to help. I do still think the documentation is not perfect in this regard, and the error message mentioning access rights to a completely different table (the clone) is also not helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 12:05:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/13-3-vacuum-on-table-fails-if-shallow-clone-without-write-access/m-p/57750#M30898</guid>
      <dc:creator>pyter</dc:creator>
      <dc:date>2024-01-18T12:05:38Z</dc:date>
    </item>
  </channel>
</rss>

