You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Mapred Learn <ma...@gmail.com> on 2011/06/28 00:43:32 UTC
Loading seq file into hive
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