<?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: Can't delete rows in Hive table + complex hive request in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154930#M28824</link>
    <description>&lt;P&gt;Works great. Thanks &lt;A rel="user" href="https://community.cloudera.com/users/216/ravi.html" nodeid="216"&gt;@Ravi Mutyala&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2016 15:51:28 GMT</pubDate>
    <dc:creator>lubinlemarchand</dc:creator>
    <dc:date>2016-05-19T15:51:28Z</dc:date>
    <item>
      <title>Can't delete rows in Hive table + complex hive request</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154928#M28822</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to get rid of some duplicates in my Hive table. The duplicates differs by the variable DateExtraction.&lt;/P&gt;&lt;P&gt; DateExtraction is a date formated as "yyyy/MM/dd". In case of duplicate i would like to keep the most recent observation.&lt;/P&gt;&lt;P&gt;Any clues are most welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the query i used to create my table:&lt;/P&gt;&lt;PRE&gt;DROP TABLE IF EXISTS netodb.oneTable;
CREATE EXTERNAL TABLE IF NOT EXISTS netodb.oneTable(
  Entreprise string,Industrie string,Source string,Type string,Auteur string,
  Id string,Texte string,DateCreation string,Likes bigint,Partages bigint,
  ObjetParent string,Users_mentionned string,Hashtags_uses string,View_count string,
  Dislike_count string,Comment_count string,DateExtraction date) 
ROW FORMAT DELIMITED
FIELDS TERMINATED BY "|"
LOCATION "/tmp/NetoDB/OneTable" 
TBLPROPERTIES("transactional"="true");&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2016 22:16:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154928#M28822</guid>
      <dc:creator>lubinlemarchand</dc:creator>
      <dc:date>2016-05-18T22:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't delete rows in Hive table + complex hive request</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154929#M28823</link>
      <description>&lt;P&gt;You can use either a selfjoin or rank to get only the latest extraction date. This can then either go into a view on top of your table or a new table that does not have duplicates. &lt;/P&gt;&lt;P&gt;Query for view/new table creation would use the below select. &lt;/P&gt;&lt;PRE&gt;SELECT
    &amp;lt;columns&amp;gt;
FROM
(SELECT *, RANK() over (partition by xyz,
order by DateExtraction desc) as rank
FROM onetable) ranked_data
WHERE ranked_data.rank=1;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2016 22:41:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154929#M28823</guid>
      <dc:creator>ravi1</dc:creator>
      <dc:date>2016-05-18T22:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't delete rows in Hive table + complex hive request</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154930#M28824</link>
      <description>&lt;P&gt;Works great. Thanks &lt;A rel="user" href="https://community.cloudera.com/users/216/ravi.html" nodeid="216"&gt;@Ravi Mutyala&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 15:51:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-t-delete-rows-in-Hive-table-complex-hive-request/m-p/154930#M28824</guid>
      <dc:creator>lubinlemarchand</dc:creator>
      <dc:date>2016-05-19T15:51:28Z</dc:date>
    </item>
  </channel>
</rss>

