<?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 get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169963#M41823</link>
    <description>&lt;P&gt;Yess.. Thanks Ayub&lt;/P&gt;</description>
    <pubDate>Mon, 03 Oct 2016 17:10:15 GMT</pubDate>
    <dc:creator>lsundar19</dc:creator>
    <dc:date>2016-10-03T17:10:15Z</dc:date>
    <item>
      <title>How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169960#M41820</link>
      <description>&lt;P&gt;How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 20:45:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169960#M41820</guid>
      <dc:creator>lsundar19</dc:creator>
      <dc:date>2016-09-26T20:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169961#M41821</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1842/lsundar19.html" nodeid="1842"&gt;@Sundar Lakshmanan&lt;/A&gt;&lt;P&gt;I guess you can use something like&lt;/P&gt;&lt;PRE&gt;SELECT vax_num, rowid FROM (SELECT vax_num, ROW_NUMBER() OVER() AS rowid FROM &amp;lt;table_name&amp;gt;) &amp;lt;temporary_table_name&amp;gt; WHERE vax_num=0006756423&lt;/PRE&gt;&lt;P&gt;To give an example for the above:&lt;/P&gt;&lt;PRE&gt;SELECT id, rowid FROM (SELECT id, row_number() over() AS rowid FROM id_table) id_table_temp WHERE id=17;
INFO  : Session is already open
INFO  : Dag name: select id, rowid FROM (select id,...id=17(Stage-1)
INFO  :


INFO  : Status: Running (Executing on YARN cluster with App id application_1474453714086_0008)


INFO  : Map 1: 0/1	Reducer 2: 0/2
INFO  : Map 1: 0(+1)/1	Reducer 2: 0/2
INFO  : Map 1: 0(+1)/1	Reducer 2: 0/2
INFO  : Map 1: 0(+1)/1	Reducer 2: 0/2
INFO  : Map 1: 1/1	Reducer 2: 0/2
INFO  : Map 1: 1/1	Reducer 2: 0(+1)/1
INFO  : Map 1: 1/1	Reducer 2: 1/1
+------+--------+--+
| id  | rowid  |
+------+--------+--+
| 17   | 5      |
+------+--------+--+
1 row selected (12.202 seconds)
&lt;/PRE&gt;&lt;P&gt;Please refer to: &lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics&lt;/A&gt; and &lt;A href="https://books.google.co.in/books?id=ufjJDAAAQBAJ&amp;amp;pg=PA122&amp;amp;lpg=PA122&amp;amp;dq=hive+row_number+function&amp;amp;source=bl&amp;amp;ots=WhArkrDyv-&amp;amp;sig=K-dY_rHe5axwLjObCf-0bY8nGBc&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ved=0ahUKEwjNmYPLrK3PAhWIKY8KHUXGCvE4ChDoAQhDMAY#v=onepage&amp;amp;q=hive%20row_number%20function&amp;amp;f=false"&gt;Apache Hive Cookbook&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 22:51:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169961#M41821</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2016-09-26T22:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169962#M41822</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1842/lsundar19.html" nodeid="1842"&gt;@Sundar Lakshmanan&lt;/A&gt;&lt;P&gt;Is this issue resolved?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 13:18:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169962#M41822</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2016-10-03T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169963#M41823</link>
      <description>&lt;P&gt;Yess.. Thanks Ayub&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 17:10:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169963#M41823</guid>
      <dc:creator>lsundar19</dc:creator>
      <dc:date>2016-10-03T17:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the row number for particular values from hive table: For example i have column name with VAX_NUM and one of the values for this column is 0006756423. I want know the row number for this value. Do the needful. Thanks</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169964#M41824</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1842/lsundar19.html" nodeid="1842"&gt;@Sundar Lakshmanan&lt;/A&gt; If "Yess", can you please accept Ayub's answer to help us manage answered questions. Tnx! &lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 17:40:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-the-row-number-for-particular-values-from-hive/m-p/169964#M41824</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-10-03T17:40:20Z</dc:date>
    </item>
  </channel>
</rss>

