By default, Hive tables use LazySimpleSerDe, which requires that all the columns be stuffed into the sequence file's value, separated by delimiters.
From: Laurent Vaills [mailto:laurent.vai...@gmail.com] Sent: Wednesday, October 26, 2011 1:14 PM To: user@hive.apache.org Subject: External table over a SequenceFile Hi, I have a mapred that ends with an IntSumReducer that produces a SequenceFile<TextFormat, IntWritable> . I tried to create an external table over the sequence files with the following statement is : CREATE EXTERNAL TABLE IF NOT EXISTS foo(key string, value int) STORED AS SEQUENCE FILE LOCATION '/tmp/output' ; but I get this error : Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: class org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe: expects either BytesWritable or Text object! The sequence file is valid : I can read it with Pig ou "hadoop fs -text" . Does anyone has the correct syntax to create the external table ? Regards, Laurent