hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ginzburg <ginz...@hotmail.com>
Subject Partitioning External table
Date Tue, 28 Dec 2010 14:41:59 GMT

Hi,
I am trying to test  creation of  an external table using partitions,
my files on hdfs are:

/user/training/partitions/dt=2/engine
/user/training/partitions/dt=2/engine

engine are sequence files which I have managed to create externally  and query from, when
I have not used partitions.

When I create with partitions using :
hive> CREATE EXTERNAL TABLE tpartitions(value STRING) PARTITIONED BY (dt STRING) STORED
AS INPUTFORMAT 'org.apache.hadoop.mapred.SequenceFileAsTextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/training/partitions';
OK
Time taken: 0.067 seconds

show partitions tpartitions;                                                             
     
OK
Time taken: 0.084 seconds
hive> select * from tpartitions;
OK
Time taken: 0.139 seconds

Can someone point to what am I doing wrong here?






 		 	   		  
Mime
View raw message