<?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>question Re: How to show tables based on the table owner? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-show-tables-based-on-the-table-owner/m-p/77612#M13011</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/23776"&gt;@lonetiger&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;You can do it by two kind of scripts:&lt;BR /&gt;1- show all tables:&lt;/P&gt;&lt;PRE&gt;SHOW TABLES;&lt;/PRE&gt;&lt;P&gt;get the list and run this query on all tables:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;DESCRIBE FORMATTED&lt;/STRONG&gt; tableX;&lt;/PRE&gt;&lt;P&gt;Then you can get the results and extract the owner, if it's the &lt;SPAN&gt;desired &lt;/SPAN&gt;one, drop the table.&lt;BR /&gt;&lt;BR /&gt;2- Connect with your &lt;STRONG&gt;hive metastore DB&lt;/STRONG&gt; and get the table list of the owner you want&lt;/P&gt;&lt;PRE&gt;SELECT "TBL_NAME"
FROM   "TBLS"
WHERE  "OWNER" = 'ownerX';&lt;/PRE&gt;&lt;P&gt;Then drop them.&lt;BR /&gt;&lt;BR /&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 09:17:40 GMT</pubDate>
    <dc:creator>AcharkiMed</dc:creator>
    <dc:date>2018-07-26T09:17:40Z</dc:date>
  </channel>
</rss>

