hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supriya Sahay <>
Subject Creating managed location with location
Date Tue, 25 Feb 2014 09:44:59 GMT

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.


View raw message