<?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 can I run multiple beeline commands in a script without authenticating every time? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207772#M169733</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/14200/asirna.html" nodeid="14200"&gt;@Aditya Sirna&lt;/A&gt;, I think this will get me what I need. What I'm ultimately trying to get is the HDFS location so I can use it in the script I'm writing. Is performing a describe table and then grepping the output the best way to do this?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Oct 2018 22:12:49 GMT</pubDate>
    <dc:creator>josh_nicholson</dc:creator>
    <dc:date>2018-10-08T22:12:49Z</dc:date>
    <item>
      <title>How can I run multiple beeline commands in a script without authenticating every time?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207770#M169731</link>
      <description>&lt;P&gt;As part of a script I'm writing, I'm wanting to get the HDFS location of a list of Hive schemas that's passed in via a text file. The best way I can think to do this is to run a beeline command in a loop that performs a `describe schema` command and extracts the HDFS location of each schema from this output. However, this will require me to authenticate every time I run this command which is inefficient. Is there a better way to programtically get the HDFS locations of a list of Hive schemas?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 22:27:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207770#M169731</guid>
      <dc:creator>josh_nicholson</dc:creator>
      <dc:date>2018-10-05T22:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run multiple beeline commands in a script without authenticating every time?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207771#M169732</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/48501/joshnicholson.html" nodeid="48501"&gt;@Josh Nicholson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can put all your sql commands in a file and run the file using beeline.&lt;/P&gt;&lt;P&gt;Ex queries.sql has below statements&lt;/P&gt;&lt;PRE&gt;describe formatted table1;
describe formatted table2;&lt;/PRE&gt;&lt;P&gt;You can run the queries.sql like below&lt;/P&gt;&lt;PRE&gt;beeline -u "{url}" -f queries.sql&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please "Accept" the answer if this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 23:04:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207771#M169732</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-10-05T23:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run multiple beeline commands in a script without authenticating every time?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207772#M169733</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/14200/asirna.html" nodeid="14200"&gt;@Aditya Sirna&lt;/A&gt;, I think this will get me what I need. What I'm ultimately trying to get is the HDFS location so I can use it in the script I'm writing. Is performing a describe table and then grepping the output the best way to do this?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:12:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207772#M169733</guid>
      <dc:creator>josh_nicholson</dc:creator>
      <dc:date>2018-10-08T22:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run multiple beeline commands in a script without authenticating every time?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207773#M169734</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/48501/joshnicholson.html" nodeid="48501"&gt;@Josh Nicholson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt; You can grep for the location. I am not able to think of other solution for now.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:32:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207773#M169734</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-10-08T22:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run multiple beeline commands in a script without authenticating every time?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207774#M169735</link>
      <description>&lt;P&gt;Hey Josh:&lt;/P&gt;&lt;P&gt;you could do:&lt;/P&gt;&lt;P&gt;SHOW CREATE TABLE mytable;&lt;/P&gt;&lt;P&gt;and then look for the keyword LOCATION in the output.&lt;/P&gt;&lt;P&gt;When i run that in my sql client, the hdfs path is the next line. You can also look for a line that starts with&lt;/P&gt;&lt;P&gt;'hdfs://&lt;/P&gt;&lt;P&gt;If you want to use this with the information &lt;A rel="user" href="https://community.cloudera.com/users/14200/asirna.html" nodeid="14200"&gt;@Aditya Sirna&lt;/A&gt; provided, you could have a file with multiple statements like:&lt;/P&gt;&lt;P&gt;SHOW CREATE TABLE mytable;&lt;/P&gt;&lt;P&gt;SHOW CREATE TABLE mytabl1;&lt;/P&gt;&lt;P&gt;SHOW CREATE TABLE mytabl2;&lt;/P&gt;&lt;P&gt;and then filter for lines that start with hdfs. I haven't found a way to get JUST the Location of a table.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:39:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-run-multiple-beeline-commands-in-a-script-without/m-p/207774#M169735</guid>
      <dc:creator>ricardo_larrana</dc:creator>
      <dc:date>2018-10-08T22:39:27Z</dc:date>
    </item>
  </channel>
</rss>

