[ 
https://issues.apache.org/jira/browse/HIVE-12618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thejas M Nair resolved HIVE-12618.
----------------------------------
    Resolution: Invalid

As the error message says - "External table cannot overwrite existing table." . 
That is by design.
The error message can be improved to not talk about import spec issues, I 
believe [~sushanth] has a jira to track that.


> import external table fails if table is existing already
> --------------------------------------------------------
>
>                 Key: HIVE-12618
>                 URL: https://issues.apache.org/jira/browse/HIVE-12618
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 1.2.1
>            Reporter: Deepak Sharma
>            Assignee: Thejas M Nair
>            Priority: Critical
>
> import external table fails if table is already existing
> scenario :
> =======
> 1. create a table and insert the data into the table, & then export the data 
> to hdfs dir
> create table importtest(id Int, name String);
> insert into table tmporttest(5, 'hive');
> export table importtest to '/user/user5';
> 2. create a new table importest5 with same schema.
> create table importtest5(id Int, name String);
> 3. import the data into this new table
> import external table importtest5 from '/user/user5';
> ER: data should be imported successfully
> AR: getting following error:
> Error: Error while compiling statement: FAILED: SemanticException Error 
> 10120: The existing table is not compatible with the import spec. External 
> table cannot overwrite existing table. Drop existing table first. 
> (state=42000,code=10120)
> Note:
> 1. importtest5 table is empty
> 2. use the same schema in both the table



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to