You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by sagar naik <sn...@attributor.com> on 2010/03/22 20:31:22 UTC

Reading SequenceFile into external table

Hi Guys,

I am on  Hive 0.5.0 to create an external tablea base on a SequenceFile  and
Map File
These files are in hadoop dfs 18.
The keys and values are based on custom class.

I am not able to incorporate those in create table syntax


create EXTERNAL TABLE saved_seen  (key.field <object type> , key.field2
<object type>, value.field1 <object type> ) stored as SEQUENCEFILE LOCATION
'<location>'

what should be object type ?



Thanks,
-Sagar

Re: Reading SequenceFile into external table

Posted by Zheng Shao <zs...@gmail.com>.
Hi Sagar,

For custom key/value types, Hive needs a special SerDe for that.

Please take a look at the ThriftSerDe class in contrib directory.

Zheng

On Mon, Mar 22, 2010 at 12:31 PM, sagar naik <sn...@attributor.com> wrote:
> Hi Guys,
>
> I am on  Hive 0.5.0 to create an external tablea base on a SequenceFile  and
> Map File
> These files are in hadoop dfs 18.
> The keys and values are based on custom class.
>
> I am not able to incorporate those in create table syntax
>
>
> create EXTERNAL TABLE saved_seen  (key.field <object type> , key.field2
> <object type>, value.field1 <object type> ) stored as SEQUENCEFILE LOCATION
> '<location>'
>
> what should be object type ?
>
>
>
> Thanks,
> -Sagar



-- 
Yours,
Zheng