hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mapred Learn <mapred.le...@gmail.com>
Subject Loading seq file into hive
Date Mon, 27 Jun 2011 22:43:32 GMT
Hi,
I have seq files with key as line number and value is ctrl B delimited text.
a sample value is:
45454^B567^Brtrt^B-7.8
56577^B345^Bdrtd^B-0.9

when I create a table like:
create table temp_seq (no. int, code string, rank string, amt string)
row format delimited fields terminated by '\002' lines terminated by '\n'
stored as sequencefile;

It creates the table.

When I load a file as:

load data inpath '/tmp/test' into table temp_seq;

even this succeeds.

But when I try to select *, I don't see the fields that were loaded as
delmiited text and I see it separated as some weird boundaries and some
fields in text of seq file combined in select * output and rest all fields
at the end, coming as NULL, as follows:

 45454567  rtrt-7.8 NULL NULL
 56577345 drtd-0.9 NULL NULL.

how can I get this data to correspond to the exact fields in Seq File Values
output ?

Thanks in advance,
-JJ

Mime
View raw message