You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Supriya Sahay <su...@datametica.com> on 2014/02/25 10:44:59 UTC

Creating managed location with location

Hi

I was trying to create an internal table specifying the location as well 
in the create table statement. This is what I used:

*create table test.employees(**
**name String comment 'Employee name',**
**salary float comment 'Employee salary',**
**subordinates array<string> comment 'Names of subordinates',**
**deductions map<string,float> comment 'Keys are deduction names, values 
are percentages',**
**address struct<street:string,city:string,state:string,zip:int> comment 
'Home address'**
**)**
**row format delimited**
**fields terminated by ' '**
**collection items terminated by ','**
**map keys terminated by ','**
**lines terminated by '\n'**
**stored as textfile**
**location '/tmp/intdata';**
*
My expectation was that after successful execution a directory for 
employees should have been created in test.db. This did not happen 
although Hive was creating a managed table(which I cross-checked with 
DESCRIBE EXTENDED). Also when I executed *DROP TABLE employees*, the 
table was dropped but the data in */tmp/intdata *still existed.*


*Please let me know whats going wrong.

Thanks
Supriya*
*