<?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: Ambari Hive View - User's Saved Queries Location in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133655#M47713</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/689/jonathanmmaestas.html"&gt;Jon Maestas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Saved queries tables name is different something like following you will find in your DB.   &lt;STRONG&gt; "ds_savedquery_55"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It should have the following column.&lt;/P&gt;&lt;PRE&gt;ds_id
ds_database
ds_owner
ds_queryfile 
ds_shortquery     =&amp;gt; Short query name
ds_title          =&amp;gt;   worksheet name
&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Dec 2016 23:57:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-12-01T23:57:09Z</dc:date>
    <item>
      <title>Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133650#M47708</link>
      <description>&lt;P&gt;In the Ambari Hive view, there is a "Saved Queries" tab, where are these queries saved? Are they in the Ambari DB? A local file on the Ambari node? HDFS?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:00:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133650#M47708</guid>
      <dc:creator>Jonathan_M_Maes</dc:creator>
      <dc:date>2016-12-01T23:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133651#M47709</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/689/jonathanmmaestas.html"&gt;Jon Maestas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please check the following directory in the HDFS.  Files with name&lt;STRONG&gt; "*.hql".   &lt;/STRONG&gt;More information about the metadata of those files you can find in the ambari DB. With tables starting with name &lt;STRONG&gt;"ds_jobimpl_*" .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;These tables ("ds_jobimpl_*") contains column like &lt;STRONG&gt;"ds_queryfile"&lt;/STRONG&gt; which contains the path of those queries.&lt;/P&gt;&lt;PRE&gt;/user/admin/hive/jobs/&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:04:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133651#M47709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-01T23:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133652#M47710</link>
      <description>&lt;P&gt;Also, is there a difference in location between, ambari-only users vs ambari/linux users? (Still referring to the hive view)&lt;/P&gt;&lt;P&gt;linux user = the user has an account on the linux box&lt;/P&gt;&lt;P&gt;ambari user = the user has an ambari account&lt;/P&gt;&lt;P&gt;We have a user that only had an ambari account. They seem to have lost their queries after we created a linux account for them. Both ambari and linux account names are the same. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:08:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133652#M47710</guid>
      <dc:creator>Jonathan_M_Maes</dc:creator>
      <dc:date>2016-12-01T23:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133653#M47711</link>
      <description>&lt;P&gt;The path  in HDFS will be different for different users who Created/Saved the scripts.&lt;/P&gt;&lt;P&gt;Like user1 may see something like:&lt;/P&gt;&lt;PRE&gt;/user/user1/hive/jobs/&lt;/PRE&gt;&lt;P&gt;This directory is in HDFS hence not directly related to linux user until you have linked linux users with the hdfs.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:24:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133653#M47711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-01T23:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133654#M47712</link>
      <description>&lt;P&gt;
	Thanks &lt;A rel="user" href="https://community.cloudera.com/users/3823/joysensharma.html" nodeid="3823"&gt;@jss&lt;/A&gt;! Which column in ds_jobimpl_* references that the query is a saved one?&lt;/P&gt;&lt;P&gt;The user doesn't have 2100+ saved queries. This looks more like job history.&lt;/P&gt;
&lt;PRE&gt;select count(*) from ds_jobimpl_6 where ds_owner = 'xxxxxxx';
2182
&lt;/PRE&gt;
&lt;PRE&gt; \d ds_jobimpl_6
 ds_id             | character varying(255)  | not null
 ds_applicationid  | character varying(3000) |
 ds_conffile       | character varying(3000) |
 ds_dagid          | character varying(3000) |
 ds_dagname        | character varying(3000) |
 ds_database       | character varying(3000) |
 ds_datesubmitted  | bigint                  |
 ds_duration       | bigint                  |
 ds_forcedcontent  | character varying(3000) |
 ds_globalsettings | character varying(3000) |
 ds_logfile        | character varying(3000) |
 ds_owner          | character varying(3000) |
 ds_queryfile      | character varying(3000) |
 ds_queryid        | character varying(3000) |
 ds_referrer       | character varying(3000) |
 ds_sessiontag     | character varying(3000) |
 ds_sqlstate       | character varying(3000) |
 ds_status         | character varying(3000) |
 ds_statusdir      | character varying(3000) |
 ds_statusmessage  | character varying(3000) |
 ds_title          | character varying(3000) |&lt;/PRE&gt;
&lt;PRE&gt;hdfs dfs -find /user/xxxxxxx -name *.hql | wc -l
2546&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:41:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133654#M47712</guid>
      <dc:creator>Jonathan_M_Maes</dc:creator>
      <dc:date>2016-12-01T23:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133655#M47713</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/689/jonathanmmaestas.html"&gt;Jon Maestas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Saved queries tables name is different something like following you will find in your DB.   &lt;STRONG&gt; "ds_savedquery_55"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It should have the following column.&lt;/P&gt;&lt;PRE&gt;ds_id
ds_database
ds_owner
ds_queryfile 
ds_shortquery     =&amp;gt; Short query name
ds_title          =&amp;gt;   worksheet name
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:57:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133655#M47713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-01T23:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View - User's Saved Queries Location</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133656#M47714</link>
      <description>&lt;P&gt;The user's saved queries weren't in this table. Which explains why they aren't seeing them. I opened one of our nightly pg dumps and pulled the user's query file location from the ds_savedquery_* table and cat'd them from hdfs and sent the output to the user. &lt;/P&gt;
&lt;PRE&gt;cat hdfs_files.out
/user/xxxxxxx/hive/jobs/hive-job-813-2016-07-28_11-46/query.hql
/user/xxxxxxx/hive/jobs/hive-job-1952-2016-10-18_09-31/query.hql
...
&lt;/PRE&gt;&lt;PRE&gt;for f in `cat hdfs_files.out`;do
&amp;gt; hdfs dfs -cat $f &amp;gt;&amp;gt; saved_queries.hql
&amp;gt; echo &amp;gt;&amp;gt; saved_queries.hql
&amp;gt; echo &amp;gt;&amp;gt; saved_queries.hql
&amp;gt; done
&lt;/PRE&gt;&lt;P&gt;
	Thanks &lt;A rel="user" href="https://community.cloudera.com/users/3823/joysensharma.html" nodeid="3823"&gt;@jss&lt;/A&gt; for your help with this.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 01:03:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Hive-View-User-s-Saved-Queries-Location/m-p/133656#M47714</guid>
      <dc:creator>Jonathan_M_Maes</dc:creator>
      <dc:date>2016-12-02T01:03:41Z</dc:date>
    </item>
  </channel>
</rss>

