<?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: Cannot read from view if no access to underlying table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80514#M36046</link>
    <description>&lt;P&gt;FYI this is not true. In serverless mode or with Shared clusters you can give access to the view without giving access to the underlying table. The problem arises with Single User clusters.&lt;/P&gt;&lt;P&gt;Does anyone know a workaround? Shared clusters have a lot of limitations&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 09:36:13 GMT</pubDate>
    <dc:creator>tomph</dc:creator>
    <dc:date>2024-07-25T09:36:13Z</dc:date>
    <item>
      <title>Cannot read from view if no access to underlying table</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80102#M35932</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I created a view &lt;STRONG&gt;my_view&lt;/STRONG&gt; in a schema &lt;STRONG&gt;project_schema&lt;/STRONG&gt; in Unity catalog&amp;nbsp;&lt;STRONG&gt;catalog_dev&lt;/STRONG&gt; that is a select * from a table &lt;STRONG&gt;my_table&lt;/STRONG&gt; in my &lt;STRONG&gt;common_schema&lt;/STRONG&gt; in the same catalog.&lt;/P&gt;&lt;P&gt;I gave a service principal full grants on the &lt;STRONG&gt;project_schema&lt;/STRONG&gt;. It is a owner of the schema and has full privileges on it. But when it tries to select from &lt;STRONG&gt;catalog_dev.project_schema.my_view&lt;/STRONG&gt;&amp;nbsp;(from a job cluster with Unity Catalog enabled) it gets the following exception:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Insufficient privileges: User does not have SELECT on Table 'catalog_dev.common_schema.my_table'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It was my understanding that users do not need read access on all underlying tables in the view definition. What could be the issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Tommaso&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 09:46:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80102#M35932</guid>
      <dc:creator>tomph</dc:creator>
      <dc:date>2024-07-23T09:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read from view if no access to underlying table</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80113#M35936</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/99196"&gt;@tomph&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;That's how views work in the most of the engines.&lt;BR /&gt;You need to grant the permissions to the underlying tables.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 10:56:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80113#M35936</guid>
      <dc:creator>daniel_sahal</dc:creator>
      <dc:date>2024-07-23T10:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read from view if no access to underlying table</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80514#M36046</link>
      <description>&lt;P&gt;FYI this is not true. In serverless mode or with Shared clusters you can give access to the view without giving access to the underlying table. The problem arises with Single User clusters.&lt;/P&gt;&lt;P&gt;Does anyone know a workaround? Shared clusters have a lot of limitations&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 09:36:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80514#M36046</guid>
      <dc:creator>tomph</dc:creator>
      <dc:date>2024-07-25T09:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read from view if no access to underlying table</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80653#M36098</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/99196"&gt;@tomph&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yup, you're correct. I've check the documentation once more and it clearly statest that:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;For single-user compute resources on Databricks Runtime 15.4 and above, shared compute resources, and SQL warehouses, you need SELECT on the view itself, USE CATALOG on its parent catalog, and USE SCHEMA on its parent schema.&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;For single-user compute resources on Databricks Runtime 15.3 and below, you must also have SELECT on all tables and views that the view references, in addition to USE CATALOG on their parent catalogs and USE SCHEMA on their parent schemas.&lt;/LI-CODE&gt;&lt;P&gt;This was introduced in DBR 15.4 LTS (that was released this week). Switching to that DBR should workaround your issue.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/en/release-notes/runtime/15.4lts.html#single-user-compute-supports-fine-grained-access-control-materialized-views-and-streaming-tables-public-preview" target="_blank"&gt;https://docs.databricks.com/en/release-notes/runtime/15.4lts.html#single-user-compute-supports-fine-grained-access-control-materialized-views-and-streaming-tables-public-preview&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 05:42:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-from-view-if-no-access-to-underlying-table/m-p/80653#M36098</guid>
      <dc:creator>daniel_sahal</dc:creator>
      <dc:date>2024-07-26T05:42:25Z</dc:date>
    </item>
  </channel>
</rss>

