<?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 How to use HCatalog or Hive Metastore to list tables/search columnnames? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/135243#M35080</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;In our current relational environment of Teradata, Oracle, SQL-Server, we often use the online SQL-based data dictionary facilities (DBC, ALL_TABLES, ALL_TAB_COLUMNS, INFORMATION_SCHEMA, etc) for use in the automation of operational tasks and to search columns for "data of interest" for study from other data marts.  How can this be done in Hive?  I'm aware of "show tables" and "describe", but need much more power.  I see that the metastore, 
org.apache.hadoop.hive.metastore.api.Table    has a rich set of functionality, but I have not found examples for what I want to do.  I would like to write some Java that would walk all databases of interest, and generate an output of ALL tables in the databases and their columns, types, etc. Or does HCatalog or some other tool offer this type of functionality as an easier/quicker alternative?  If someone could point me to some similar examples or intro material, etc, that would be appreciated very much.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2016 18:16:16 GMT</pubDate>
    <dc:creator>gpolanch</dc:creator>
    <dc:date>2016-07-19T18:16:16Z</dc:date>
    <item>
      <title>How to use HCatalog or Hive Metastore to list tables/search columnnames?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/135243#M35080</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;In our current relational environment of Teradata, Oracle, SQL-Server, we often use the online SQL-based data dictionary facilities (DBC, ALL_TABLES, ALL_TAB_COLUMNS, INFORMATION_SCHEMA, etc) for use in the automation of operational tasks and to search columns for "data of interest" for study from other data marts.  How can this be done in Hive?  I'm aware of "show tables" and "describe", but need much more power.  I see that the metastore, 
org.apache.hadoop.hive.metastore.api.Table    has a rich set of functionality, but I have not found examples for what I want to do.  I would like to write some Java that would walk all databases of interest, and generate an output of ALL tables in the databases and their columns, types, etc. Or does HCatalog or some other tool offer this type of functionality as an easier/quicker alternative?  If someone could point me to some similar examples or intro material, etc, that would be appreciated very much.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 18:16:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/135243#M35080</guid>
      <dc:creator>gpolanch</dc:creator>
      <dc:date>2016-07-19T18:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use HCatalog or Hive Metastore to list tables/search columnnames?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/135244#M35081</link>
      <description>&lt;P style="margin-left: 40px;"&gt; &lt;A rel="user" href="https://community.cloudera.com/users/11751/gpolanch.html" nodeid="11751"&gt;@Greg Polanchyck&lt;/A&gt; some of the functionality you are looking for is available in WebHCat api.  Take a look &lt;A href="https://cwiki.apache.org/confluence/display/Hive/WebHCat+Reference+GetColumns#WebHCatReferenceGetColumns-ListColumns—GETddl/database/:db/table/:table/column"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;&lt;/P&gt;&lt;H2&gt;Description&lt;/H2&gt;&lt;P&gt;List the columns in an HCatalog table.&lt;/P&gt;&lt;H2&gt;URL&lt;/H2&gt;&lt;P&gt;&lt;CODE&gt;http://&lt;/CODE&gt;&lt;EM&gt;&lt;A href="https://community.cloudera.com/www.myserver.com" target="_blank"&gt;www.myserver.com&lt;/A&gt;&lt;/EM&gt;&lt;CODE&gt;/templeton/v1/ddl/database/&lt;/CODE&gt;&lt;EM&gt;:db&lt;/EM&gt;&lt;CODE&gt;/table/&lt;/CODE&gt;&lt;EM&gt;:table&lt;/EM&gt;&lt;CODE&gt;/column&lt;/CODE&gt;&lt;/P&gt;&lt;H2&gt;Parameters&lt;/H2&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;&lt;P&gt;Name&lt;/P&gt;
&lt;/TH&gt;&lt;TH&gt;
&lt;P&gt;Description&lt;/P&gt;&lt;/TH&gt;&lt;TH&gt;
&lt;P&gt;Required?&lt;/P&gt;&lt;/TH&gt;&lt;TH&gt;
&lt;P&gt;Default&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;:db&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;The database name&lt;/TD&gt;&lt;TD&gt;Required&lt;/TD&gt;&lt;TD&gt;None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;:table&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;The table name&lt;/TD&gt;&lt;TD&gt;Required&lt;/TD&gt;&lt;TD&gt;None&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The &lt;A href="https://cwiki.apache.org/confluence/display/Hive/WebHCat+UsingWebHCat#WebHCatUsingWebHCat-Standard+Parameters"&gt;standard parameters&lt;/A&gt; are also supported.&lt;/P&gt;&lt;H2&gt;Results&lt;/H2&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;&lt;P&gt;Name&lt;/P&gt;
&lt;/TH&gt;&lt;TH&gt;
&lt;P&gt;Description&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;columns&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;A list of column names and types&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;database&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;The database name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;table&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;The table name&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H2&gt;Example&lt;/H2&gt;&lt;H3&gt;Curl Command&lt;/H3&gt;&lt;PRE&gt;% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table/column?user.name=ctdean'
&lt;/PRE&gt;&lt;H3&gt;JSON Output&lt;/H3&gt;&lt;P style="margin-left: 40px;"&gt;
&lt;/P&gt;&lt;PRE&gt;{
 "columns": [
   {
     "name": "id",
     "type": "bigint"
   },
   {
     "name": "user",
     "comment": "The user name",
     "type": "string"
   },
   {
     "name": "my_p",
     "type": "string"
   },
   {
     "name": "my_q",
     "type": "string"
   }
 ],
 "database": "default",
 "table": "my_table"
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 10:16:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/135244#M35081</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-07-20T10:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use HCatalog or Hive Metastore to list tables/search columnnames?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/293159#M35082</link>
      <description>&lt;P&gt;How to get entire table list in hive(cluster). Not for particular table and database.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 11:46:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-HCatalog-or-Hive-Metastore-to-list-tables-search/m-p/293159#M35082</guid>
      <dc:creator>RajeshMadurai</dc:creator>
      <dc:date>2020-04-02T11:46:08Z</dc:date>
    </item>
  </channel>
</rss>

