<?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: Group-user link via SQL in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4530#M62</link>
    <description>&lt;P&gt;Hi @Marcelo Castro​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2023 06:58:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-22T06:58:56Z</dc:date>
    <item>
      <title>Group-user link via SQL</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4528#M60</link>
      <description>&lt;P&gt;I've been trying to check, via databricks SQL, which groups a user belongs to. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run SHOW GROUPS or SHOW USERS, everything is returned correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when a try to run:&lt;/P&gt;&lt;P&gt;    SHOW GROUPS WITH USER `user@domain.com`&lt;/P&gt;&lt;P&gt;Nothing is returned, but the user belongs to one of the existing groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the right way to execute this query and get the expected results?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:27:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4528#M60</guid>
      <dc:creator>rcmarcelo</dc:creator>
      <dc:date>2023-05-11T13:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Group-user link via SQL</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4529#M61</link>
      <description>&lt;P&gt;@Marcelo Castro​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;To show the groups that a user belongs to in Databricks using SQL, you can use the following query:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT groupname FROM databricks_groups WHERE userid IN (SELECT userid FROM databricks_users WHERE username = 'user@domain.com')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This query uses the databricks_users and databricks_groups tables to get the userid associated with the username and then returns the group names associated with that userid. You can replace 'user@domain.com' with the username of the user you want to check. This should return the group names that the user belongs to.&lt;/P&gt;&lt;P&gt;Note that you will need the appropriate privileges to query the databricks_users and databricks_groups&lt;/P&gt;&lt;P&gt;tables.&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2023 16:02:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4529#M61</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-13T16:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Group-user link via SQL</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4530#M62</link>
      <description>&lt;P&gt;Hi @Marcelo Castro​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 06:58:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4530#M62</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-22T06:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Group-user link via SQL</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4531#M63</link>
      <description>&lt;P&gt;Hey! The actual solution was to run SHOW GROUPS WITH USER as an administrator. This wasn't expected, since SHOW USERS and SHOW GROUPS doesn't require administrator privileges and there's nothing mentioned in the&amp;nbsp;&lt;A href="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-show-groups.html" alt="https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-show-groups.html" target="_blank"&gt;docs&lt;/A&gt;. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 14:06:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/group-user-link-via-sql/m-p/4531#M63</guid>
      <dc:creator>rcmarcelo</dc:creator>
      <dc:date>2023-05-22T14:06:13Z</dc:date>
    </item>
  </channel>
</rss>

