<?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 How to avoid duplicate row insertion in Hive? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-avoid-duplicate-row-insertion-in-Hive/m-p/286088#M212213</link>
    <description>&lt;P&gt;CREATE TABLE Test( recordId String,&lt;BR /&gt;Advertiser_id STRING ,&lt;BR /&gt;Advertiser_name STRING,&lt;BR /&gt;PRIMARY KEY (recordId) DISABLE NOVALIDATE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;insert into Test values('1','prakash','vtv');&lt;/P&gt;
&lt;P&gt;insert into Test values('1','prakash','vtv');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Test.recordid | Test.advertiser_id | Test.advertiser_name |&lt;BR /&gt;+-----------------------------+----------------------------------+------------------------------------+&lt;BR /&gt;| 1 | prakash | vtv |&lt;BR /&gt;| 1 | prakash | vtv |&lt;BR /&gt;+-----------------------------+----------------------------------+------------------------------------+&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As per RDBMS terms Primary key constraint shouldn't allow me to create duplicate record with the same value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to achieve this in Hive?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2019 14:22:40 GMT</pubDate>
    <dc:creator>Prakashcit</dc:creator>
    <dc:date>2019-12-20T14:22:40Z</dc:date>
  </channel>
</rss>

