<?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 enable to create hive table with primary key constraint in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177320#M139570</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using HDP 2.5 in hortonworks sanbox. The HIVE version is 1.2.1. I am trying to create hive table with primary key constraint with below query:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE pk 
       (id1 int,id2 int,
        name string,
        dept string,
        primary key(id1,id2) 
        disable novalidate) 
        PARTITIONED BY (year string);&lt;/PRE&gt;&lt;P&gt;while executing this create table query it throws below error:&lt;/P&gt;&lt;PRE&gt; ParseException line 1:65 cannot recognize input near 'key' '(' 'id1' in column type&lt;/PRE&gt;&lt;P&gt;I am not getting what this error and how to resolve it. &lt;/P&gt;&lt;P&gt;Is constraints supported in HIVE 1.2.1 ?&lt;/P&gt;&lt;P&gt;can anyone help me out to resolve this issue ?&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 18:35:15 GMT</pubDate>
    <dc:creator>heta_desai</dc:creator>
    <dc:date>2018-08-30T18:35:15Z</dc:date>
    <item>
      <title>enable to create hive table with primary key constraint</title>
      <link>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177320#M139570</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using HDP 2.5 in hortonworks sanbox. The HIVE version is 1.2.1. I am trying to create hive table with primary key constraint with below query:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE pk 
       (id1 int,id2 int,
        name string,
        dept string,
        primary key(id1,id2) 
        disable novalidate) 
        PARTITIONED BY (year string);&lt;/PRE&gt;&lt;P&gt;while executing this create table query it throws below error:&lt;/P&gt;&lt;PRE&gt; ParseException line 1:65 cannot recognize input near 'key' '(' 'id1' in column type&lt;/PRE&gt;&lt;P&gt;I am not getting what this error and how to resolve it. &lt;/P&gt;&lt;P&gt;Is constraints supported in HIVE 1.2.1 ?&lt;/P&gt;&lt;P&gt;can anyone help me out to resolve this issue ?&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 18:35:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177320#M139570</guid>
      <dc:creator>heta_desai</dc:creator>
      <dc:date>2018-08-30T18:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: enable to create hive table with primary key constraint</title>
      <link>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177321#M139571</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/16744/hetadesai.html" nodeid="16744"&gt;@heta desai&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Based on this jira&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-13290" target="_blank"&gt;https://issues.apache.org/jira/browse/HIVE-13290&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the hive docs:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Constraints" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Constraints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is supported from hive 2.1.0 onwards only. &lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:20:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177321#M139571</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-08-30T20:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: enable to create hive table with primary key constraint</title>
      <link>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177322#M139572</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11048/falbani.html" nodeid="11048"&gt;@Felix Albani&lt;/A&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 13:50:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/enable-to-create-hive-table-with-primary-key-constraint/m-p/177322#M139572</guid>
      <dc:creator>heta_desai</dc:creator>
      <dc:date>2018-08-31T13:50:43Z</dc:date>
    </item>
  </channel>
</rss>

