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?






                                          

Reply via email to