<?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 beeline command against file on HDFS? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220058#M69607</link>
    <description>&lt;P&gt;Thought as much, thanks for confirming&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 18:13:13 GMT</pubDate>
    <dc:creator>daniel_perry</dc:creator>
    <dc:date>2017-10-13T18:13:13Z</dc:date>
    <item>
      <title>How to run beeline command against file on HDFS?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220056#M69605</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Sorry for the basic question i've had little success searching online, i just need clarification whether something is possible.&lt;/P&gt;&lt;P&gt;Can i run a beeline command against a file that is in HDFS. I know we use -f in beeline to specify a file when its on the local file system but can this also be done against a file on HDFS.&lt;/P&gt;&lt;P&gt;My use case is that i'd like to run a beeline command through a shell action in Oozie. I'm hitting some issues using Hive2 actions so i wanted to try using a shell action instead&lt;/P&gt;&lt;P&gt;Any help is much appreciated,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:29:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220056#M69605</guid>
      <dc:creator>daniel_perry</dc:creator>
      <dc:date>2017-10-13T17:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to run beeline command against file on HDFS?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220057#M69606</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2430/danielperry.html" nodeid="2430"&gt;@Daniel Perry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Beeline expects the HQL file to be local file system. So If your HQL file is in HDFS, you should first download it to local file system, then feed it to Beeline.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:56:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220057#M69606</guid>
      <dc:creator>YangWang</dc:creator>
      <dc:date>2017-10-13T17:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to run beeline command against file on HDFS?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220058#M69607</link>
      <description>&lt;P&gt;Thought as much, thanks for confirming&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 18:13:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220058#M69607</guid>
      <dc:creator>daniel_perry</dc:creator>
      <dc:date>2017-10-13T18:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to run beeline command against file on HDFS?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220059#M69608</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2430/danielperry.html" nodeid="2430"&gt;@Daniel Perry&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You can try to use expression and cat command, something like this (but it won't work if you have comments in hql file, so remove all comments):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;beeline
-e “$(hdfs dfs -cat &amp;lt;hdfs_filename&amp;gt;&lt;/STRONG&gt;&lt;STRONG&gt;)”&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if you still want to keep comments you can pipeline the output to sed, keep in mind that comments should start from a new line:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;beeline -e “$(hdfs dfs -cat &amp;lt;hdfs_filename&amp;gt; &lt;/STRONG&gt;&lt;STRONG&gt;| sed -e 's/^--.*//g' )'&lt;/STRONG&gt; &lt;STRONG&gt;)”&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:24:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-run-beeline-command-against-file-on-HDFS/m-p/220059#M69608</guid>
      <dc:creator>rodionsvasiljev</dc:creator>
      <dc:date>2018-02-15T20:24:43Z</dc:date>
    </item>
  </channel>
</rss>

