Hi

Thanks for the replay.

> If you want to load file test.txt into hive table, you can create table
> with properties that is suitable format of file.

I should create a RCFILE before load it into hive ?
Do you know how to create a RCFILE to be compressed?

I tried to using the Insert statement to create RCFILE, but it is not be
compressed.
I did the step by step.

1.create table raw_test(c1 int ,c2 string) 
   ROW FORMAT DELIMITED
   FIELDS TERMINATED BY ','
   Stored as textfile;

2.load text file to textfile table
Hive > LOAD DATA LOCAL INPATH 'test.txt.gz' INTO TABLE raw_test;

3.create rcfile table and data
Hive > create table rcfile_test stored by rcfile as select * from raw_test;

The RCFILE were created success, But it is not be compressed.

Can you give me any advice? thanks.

> -----Original Message-----
> From: trang van anh [mailto:anh...@vtc.vn]
> Sent: Wednesday, November 02, 2011 7:23 PM
> To: user@hive.apache.org
> Subject: Re: problem with load data from local file system into RCFILE
table
> 
> hi ,
> 
> "LOAD DATA LOCAL INPATH 'test.txt' INTO TABLE text" that is actual copy
> text.txt file to folder in hdfs so that HIVE throws invalid format
exception.
> 
> If you want to load file test.txt into hive table, you can create table
> with properties that is suitable format of file.
> 
> 
> 
> On 11/2/2011 3:43 PM, weimin zhu wrote:
> > Hi
> >
> > I have problem with loading data into RCFILE table from local file
system.
> > I am using hive 0.7.1 of cloudera's distribution.
> >
> > 1.create table
> > create table test(c1 int,c2 string)
> > ROW FORMAT DELIMITED
> > FIELDS TERMINATED BY ','
> > Stored as RCFILE;
> >
> > 2.load text file into table
> > LOAD DATA LOCAL INPATH 'test.txt' INTO TABLE text;
> >
> > Hive command line throwing errors as the following:
> >
> > Loading data to table default.test
> > Failed with exception Wrong file format. Please check the file's format.
> > FAILED: Execution Error, return code 1 from
> > org.apache.hadoop.hive.ql.exec.MoveTask
> >
> > Can you give me any idea.
> >
> > thanks
> >
> >
> >
> >



Reply via email to