<?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 Error while creating a table with 'LIKE' clause in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111444#M74292</link>
    <description>&lt;P&gt;I am trying this &lt;/P&gt;&lt;P&gt;create table emp1 LIKE emp CLUSTERED BY () INTO 4 BUCKETS STORED AS ORC;&lt;/P&gt;&lt;P&gt;Its giving a parse exception : &lt;/P&gt;
&lt;PRE&gt;&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;rg.apache.ambari.view.hive.client.HiveInvalidQueryException:Errorwhile compiling statement: FAILED:ParseException line 4:42 missing EOF at 'CLUSTERED' near 'emp'[ERROR_STATUS]&lt;/LI&gt;&lt;LI&gt;org.apache.ambari.view.hive.client.HiveInvalidQueryException:Errorwhile compiling statement: FAILED:ParseException line 4:42 missing EOF at 'CLUSTERED' near 'emp'[ERROR_STATUS]&lt;/LI&gt;&lt;LI&gt;	at org.apache.ambari.view.hive.client.Utils.verifySuccess(Utils.java:46)&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Fri, 22 Apr 2016 17:00:32 GMT</pubDate>
    <dc:creator>sanjeevanmahaja</dc:creator>
    <dc:date>2016-04-22T17:00:32Z</dc:date>
    <item>
      <title>Error while creating a table with 'LIKE' clause</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111444#M74292</link>
      <description>&lt;P&gt;I am trying this &lt;/P&gt;&lt;P&gt;create table emp1 LIKE emp CLUSTERED BY () INTO 4 BUCKETS STORED AS ORC;&lt;/P&gt;&lt;P&gt;Its giving a parse exception : &lt;/P&gt;
&lt;PRE&gt;&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;rg.apache.ambari.view.hive.client.HiveInvalidQueryException:Errorwhile compiling statement: FAILED:ParseException line 4:42 missing EOF at 'CLUSTERED' near 'emp'[ERROR_STATUS]&lt;/LI&gt;&lt;LI&gt;org.apache.ambari.view.hive.client.HiveInvalidQueryException:Errorwhile compiling statement: FAILED:ParseException line 4:42 missing EOF at 'CLUSTERED' near 'emp'[ERROR_STATUS]&lt;/LI&gt;&lt;LI&gt;	at org.apache.ambari.view.hive.client.Utils.verifySuccess(Utils.java:46)&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 22 Apr 2016 17:00:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111444#M74292</guid>
      <dc:creator>sanjeevanmahaja</dc:creator>
      <dc:date>2016-04-22T17:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating a table with 'LIKE' clause</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111445#M74293</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2408/sanjeevanmahajan05.html" nodeid="2408"&gt;@sanjeevan mahajan&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I don't think you can define other attributes while creating table with "LIKE" option, in theory with "LIKE" it will copy the existing table definition and other attributes. Its better to use alter table after creating it with "LIKE". &lt;/P&gt;&lt;P&gt;EDITED: I think you can change no. of buckets with alter command if you already defined it previously.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 17:39:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111445#M74293</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-04-22T17:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating a table with 'LIKE' clause</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111446#M74294</link>
      <description>&lt;P&gt;You will need to specify the column you are clustering on, and then achieve it in multiple statements:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE emp1 LIKE emp;
ALTER TABLE emp1 SET FILEFORMAT ORC;
ALTER TABLE emp1 CLUSTERED BY (empId) INTO 4 BUCKETS;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2016 23:28:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-while-creating-a-table-with-LIKE-clause/m-p/111446#M74294</guid>
      <dc:creator>jpp</dc:creator>
      <dc:date>2016-04-22T23:28:42Z</dc:date>
    </item>
  </channel>
</rss>

