<?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: RLS in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141872#M2429</link>
    <description>&lt;P&gt;It should be still supported, the only change I can find is that the table that you're referencing can't have a row filter applied to it. Has the users table got any type of row filter on it? It also can't create any type of circular reference.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Dec 2025 15:37:40 GMT</pubDate>
    <dc:creator>emma_s</dc:creator>
    <dc:date>2025-12-15T15:37:40Z</dc:date>
    <item>
      <title>RLS</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141654#M2420</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created a function that I have applied as a row filter function to multiple tables.&lt;/P&gt;&lt;P&gt;The function takes one input parameter (a column value from the table). It then uses session_user() to look up a user in our users table. If the user is found, we look at the users access rights which is specified in the users table. That value is compared to the input parameter to return true or false if the user can see or not see this row.&lt;/P&gt;&lt;P&gt;This does not work now, but I am certain that I had it working before. Why does it not work? This is the function:&lt;/P&gt;&lt;P&gt;EXISTS (&lt;BR /&gt;&amp;nbsp; &amp;nbsp;SELECT 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;FROM {table} AS users&lt;BR /&gt;&amp;nbsp; &amp;nbsp;WHERE user_name = session_user()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AND (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;users.{id col} = {param}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OR users.{id col} IS NULL&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OR users.{id col} = ''&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;thanks in adavance!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 11:04:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141654#M2420</guid>
      <dc:creator>Leif</dc:creator>
      <dc:date>2025-12-11T11:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: RLS</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141669#M2421</link>
      <description>&lt;P&gt;Hi, It's difficult for me to troubleshoot without seeing the actual data. Have you validated that the raw data hasn't changed? There could be some update at your end to the format of session.user and it not matching your table. Is there any error message? If I understand correctly what you're trying to do, then a better way maybe using ABAC and adding users to groups rather than the tabular approach.&lt;A href="https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/" target="_blank"&gt;https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 13:39:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141669#M2421</guid>
      <dc:creator>emma_s</dc:creator>
      <dc:date>2025-12-11T13:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: RLS</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141781#M2425</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply! Yeah, no the raw data has not changed at all. My thought is, can the row filter function handle reading from another table than the raw data table? I mean, I do a read in the users table to find a value, and want to compare that value to the value from a column in the raw data table. Is that supported? I konw I had this working before so perhaps Databricks changed some rule or something?&lt;BR /&gt;I will take a look at that ABAC you suggested. That is setting up policies, right? I tried that, and created a new Tag on a column in my table, but that Tag was then not available to select in the policy, so there was no way I could run the policy to get the parameter for my function that way.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 02:45:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141781#M2425</guid>
      <dc:creator>Leif</dc:creator>
      <dc:date>2025-12-13T02:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: RLS</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141872#M2429</link>
      <description>&lt;P&gt;It should be still supported, the only change I can find is that the table that you're referencing can't have a row filter applied to it. Has the users table got any type of row filter on it? It also can't create any type of circular reference.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 15:37:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/141872#M2429</guid>
      <dc:creator>emma_s</dc:creator>
      <dc:date>2025-12-15T15:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: RLS</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/143077#M2444</link>
      <description>&lt;P&gt;Hi! Sorry for the late reply, lots of holidays &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;No, the user table does not have a row filter in it. The structure is like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;schema1.users: contains a list of users obviously, and it has a column with a customer id for the customer they are allowed to see data from (a user can have multiple entries in this table if they have access to multiple customers).&lt;/LI&gt;&lt;LI&gt;schema2.{various_tables}: all of these tables have a column with the customer id in it&lt;/LI&gt;&lt;LI&gt;schema1 has a function (permissions): this function looks like below. The idea is that when a user queries the database, either directly in databricks sql, a dashboard, a dash app etc, should ONLY see data from their assigned customer(s), or if the customer id field is empty, they should see all data. I am sure that is already clear &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Every table with that customer id column has a row filter defined, using the below function.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Problem: the function below does NOT work.&amp;nbsp;If I hardcode the customerid, the function works fine.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;EXISTS (
    SELECT 1
    FROM catalog.schema1.users AS users
    WHERE user_name = session_user()
      AND (
        users.customer_id = customer_id
        OR users.customer_id IS NULL
        OR users.customer_id = ''
      )
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 07:31:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/rls/m-p/143077#M2444</guid>
      <dc:creator>Leif</dc:creator>
      <dc:date>2026-01-06T07:31:27Z</dc:date>
    </item>
  </channel>
</rss>

