<?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 run .hql scripts from beeline prompt in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-run-hql-scripts-from-beeline-prompt/m-p/148622#M52746</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/80089/how-to-run-hql-scripts-from-beeline-prompt.html#"&gt;@Jacqualin jasmin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/80089/how-to-run-hql-scripts-from-beeline-prompt.html#"&gt;&lt;/A&gt;Please try this from within beeline client:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt; 0 jdbc:hive2://&amp;gt; !run /tmp/test.hql&lt;/PRE&gt;&lt;P&gt;The file does not need to be local to the Hiveserver2, it needs to exist on the node where you run Beeline.&lt;/P&gt;&lt;P&gt;check:&lt;/P&gt;&lt;PRE&gt; 0 jdbc:hive2://&amp;gt; !help
&lt;/PRE&gt;&lt;P&gt;too, for many usefull special commands in Beeline&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 17:02:14 GMT</pubDate>
    <dc:creator>jknulst</dc:creator>
    <dc:date>2017-01-27T17:02:14Z</dc:date>
    <item>
      <title>how to run .hql scripts from beeline prompt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-run-hql-scripts-from-beeline-prompt/m-p/148621#M52745</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Can you give me the steps for running the .hql scripts from beeline prompt?&lt;/P&gt;&lt;P&gt;i get below error.&lt;/P&gt;&lt;P&gt;0: &lt;STRONG&gt;jdbc:hive2://&amp;gt; source /home/local/hive/p.hql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NoViableAltException(26@[])&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1079)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;i am comfortable with below command and it works&lt;/P&gt;&lt;P&gt;1) hive&amp;gt; source /home/local/hive/p.hql;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;table_1&lt;/P&gt;&lt;P&gt;table_2&lt;/P&gt;&lt;P&gt;Time taken: 0.231 seconds, Fetched: 2 row(s)&lt;/P&gt;&lt;P&gt;hive&amp;gt; &lt;/P&gt;&lt;P&gt;2) beeline -u jdbc:hive2://xxxxxxxxxx:10000/default -n hive -p hive -f /home/local/hive/st.hql   &amp;gt;&amp;gt; out.txt &lt;/P&gt;&lt;P&gt;3) $HIVE_HOME/bin/hive -f /home/local/hive/st.hql --database default &amp;gt; out.txt&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:04:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-run-hql-scripts-from-beeline-prompt/m-p/148621#M52745</guid>
      <dc:creator>Jacqueline</dc:creator>
      <dc:date>2017-01-27T12:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .hql scripts from beeline prompt</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-run-hql-scripts-from-beeline-prompt/m-p/148622#M52746</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/80089/how-to-run-hql-scripts-from-beeline-prompt.html#"&gt;@Jacqualin jasmin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/80089/how-to-run-hql-scripts-from-beeline-prompt.html#"&gt;&lt;/A&gt;Please try this from within beeline client:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt; 0 jdbc:hive2://&amp;gt; !run /tmp/test.hql&lt;/PRE&gt;&lt;P&gt;The file does not need to be local to the Hiveserver2, it needs to exist on the node where you run Beeline.&lt;/P&gt;&lt;P&gt;check:&lt;/P&gt;&lt;PRE&gt; 0 jdbc:hive2://&amp;gt; !help
&lt;/PRE&gt;&lt;P&gt;too, for many usefull special commands in Beeline&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 17:02:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-run-hql-scripts-from-beeline-prompt/m-p/148622#M52746</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-01-27T17:02:14Z</dc:date>
    </item>
  </channel>
</rss>

