<?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 Run HIVE queries in command shell (cmd), not in Ambari Hive View in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-HIVE-queries-in-command-shell-cmd-not-in-Ambari-Hive/m-p/202978#M71883</link>
    <description>&lt;P&gt;I have installed Ambari and I can use Hive View 2.0 for executing Hive Queries. Due to my hardware issues (less RAM), Ambari server is very slow sometimes. For this reason, I wana run Hive queries in a command shell not in Hive View in Ambari. Is it possible? If so, how is it possible?&lt;/P&gt;&lt;P&gt;I would appreciate any help.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 06:14:18 GMT</pubDate>
    <dc:creator>amin_karami</dc:creator>
    <dc:date>2017-11-28T06:14:18Z</dc:date>
    <item>
      <title>Run HIVE queries in command shell (cmd), not in Ambari Hive View</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-HIVE-queries-in-command-shell-cmd-not-in-Ambari-Hive/m-p/202978#M71883</link>
      <description>&lt;P&gt;I have installed Ambari and I can use Hive View 2.0 for executing Hive Queries. Due to my hardware issues (less RAM), Ambari server is very slow sometimes. For this reason, I wana run Hive queries in a command shell not in Hive View in Ambari. Is it possible? If so, how is it possible?&lt;/P&gt;&lt;P&gt;I would appreciate any help.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 06:14:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-HIVE-queries-in-command-shell-cmd-not-in-Ambari-Hive/m-p/202978#M71883</guid>
      <dc:creator>amin_karami</dc:creator>
      <dc:date>2017-11-28T06:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run HIVE queries in command shell (cmd), not in Ambari Hive View</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-HIVE-queries-in-command-shell-cmd-not-in-Ambari-Hive/m-p/202979#M71884</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/48282/aminkarami.html" nodeid="48282"&gt;@Mike Bit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to use a CLI to access Hive, the recommend client tool to use is called beeline.  It is normally included in the client tools installation, so you probably already have it ready to go.  From your client tools machine/host/server, you will use the beeline client to connect to the HiveServer2 JDBC URL, and everything from there is the usual SQL commands.&lt;/P&gt;&lt;P&gt;In Ambari, you can easily copy the HiveServer2 JDBC URL directly from the Hive service config screen, and paste it right into a beeline connect string.  So for example, if my machines were ssahi[0-2].hortonworks.com, where I was running ZooKeeper, and I was using hive/hive as the user/password, my beeline command to open the client and connect to Hive may look like:&lt;/P&gt;&lt;P&gt;beeline -u "jdbc:hive2://ssahi1.hortonworks.com:2181,ssahi0.hortonworks.com:2181,ssahi2.hortonworks.com:2181/;ServiceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"
-n hive -p hive&lt;/P&gt;&lt;P&gt;You can find more on Beeline from the project documentation here, including example syntax, and config to have things display nicer, etc: &lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Beeline–CommandLineShell" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Beeline–CommandLineShell&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 09:01:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Run-HIVE-queries-in-command-shell-cmd-not-in-Ambari-Hive/m-p/202979#M71884</guid>
      <dc:creator>ssahi</dc:creator>
      <dc:date>2017-11-28T09:01:33Z</dc:date>
    </item>
  </channel>
</rss>

