<?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: All hive tables location in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372228#M241187</link>
    <description>&lt;P&gt;Use the below Query to fetch the&amp;nbsp;table location from HMS .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select "DBS"."NAME" as DB_NAME, "TBLS"."TBL_NAME", "SDS"."LOCATION" from "DBS" join "TBLS" on "DBS"."DB_ID" = "TBLS"."DB_ID" AND "TBLS"."TBL_TYPE" != 'VIRTUAL_VIEW' join "SDS" on "TBLS"."SD_ID" = "SDS"."SD_ID";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;To query the same from hive, Would recommend to use&amp;nbsp;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/JDBC+Storage+Handler" target="_blank" rel="noopener"&gt;JDBC Storage Handler&lt;/A&gt;.&amp;nbsp; In CDP by default in sysdb this tables has been created. you can use the same.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Query&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select dbs.name as db_name , tbls.tbl_name , sds.location from dbs join tbls on dbs.db_id = tbls.db_id and tbls.tbl_type != 'VIRTUAL_VIEW' join sds on tbls.sd_id = sds.sd_id;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 13:24:21 GMT</pubDate>
    <dc:creator>ggangadharan</dc:creator>
    <dc:date>2023-06-07T13:24:21Z</dc:date>
    <item>
      <title>All hive tables location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372226#M241185</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way get the hdfs locations of all tables in CDP 7.1.7 SP1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried running a for loop against a list of tables on below command, however, it will take ages to get the list as I am looking forward to 66k+ tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hive -e “desc formatted &amp;lt;table&amp;gt;;” | grep Location&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thought of to get from HMS DB directly, however, I can only see DB location URI, but nothing specific to tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help as this is urgent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;snm1523&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 07:08:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372226#M241185</guid>
      <dc:creator>snm1523</dc:creator>
      <dc:date>2026-04-21T07:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: All hive tables location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372228#M241187</link>
      <description>&lt;P&gt;Use the below Query to fetch the&amp;nbsp;table location from HMS .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select "DBS"."NAME" as DB_NAME, "TBLS"."TBL_NAME", "SDS"."LOCATION" from "DBS" join "TBLS" on "DBS"."DB_ID" = "TBLS"."DB_ID" AND "TBLS"."TBL_TYPE" != 'VIRTUAL_VIEW' join "SDS" on "TBLS"."SD_ID" = "SDS"."SD_ID";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;To query the same from hive, Would recommend to use&amp;nbsp;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/JDBC+Storage+Handler" target="_blank" rel="noopener"&gt;JDBC Storage Handler&lt;/A&gt;.&amp;nbsp; In CDP by default in sysdb this tables has been created. you can use the same.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Query&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select dbs.name as db_name , tbls.tbl_name , sds.location from dbs join tbls on dbs.db_id = tbls.db_id and tbls.tbl_type != 'VIRTUAL_VIEW' join sds on tbls.sd_id = sds.sd_id;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 13:24:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372228#M241187</guid>
      <dc:creator>ggangadharan</dc:creator>
      <dc:date>2023-06-07T13:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: All hive tables location</title>
      <link>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372299#M241208</link>
      <description>&lt;P&gt;Thank you for the respone&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 05:51:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/All-hive-tables-location/m-p/372299#M241208</guid>
      <dc:creator>snm1523</dc:creator>
      <dc:date>2023-06-08T05:51:53Z</dc:date>
    </item>
  </channel>
</rss>

