You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by yogesh dhari <yo...@live.com> on 2012/10/11 19:48:35 UTC

Need Help in Hive storage format

Hi all,

If we run this query

insert overwrite local directory '/home/yogesh/Downloads/demoyy' select * from NYSE_LOCAL; 

{
( describe NYSE_LOCAL ;

 exchange    string    
symbol    string    
ddate    string    
open    float    
high    float    
low    float    
) }

ls /home/yogesh/Downloads/demoyy/

it shows the file name 000000_0

my Question is:

1) In which format does file 000000_0 is?
2) what is the delimiter between columns?

Please help 

Thanks & Regards
Yogesh Kumar


 		 	   		  

RE: Need Help in Hive storage format

Posted by yogesh dhari <yo...@live.com>.

Thanks All :-)

Its working now :-)

Regards
Yogesh Kumar

> CC: user@hive.apache.org
> From: abhishek.dodda1@gmail.com
> Subject: Re: Need Help in Hive storage format
> Date: Fri, 12 Oct 2012 08:47:41 -0400
> To: user@hive.apache.org
> 
> Hi Yogesh,
> 
> Try this PigStorage(' \u0001');
> 
> Thanks 
> Abhi
> 
> 
> Sent from my iPhone
> 
> On Oct 12, 2012, at 5:50 AM, MiaoMiao <li...@gmail.com> wrote:
> 
> > Hi Yogesh:
> > 
> > I think this may help.
> > 
> > https://pig.apache.org/docs/r0.10.0/api/org/apache/pig/builtin/PigStorage.html
> > 
> > Miao
> > 
> > On Fri, Oct 12, 2012 at 5:27 PM, yogesh dhari <yo...@live.com> wrote:
> >> Thanks Bejoy,
> >> 
> >> Now I want to store theses rows in Pig.
> >> 
> >> like
> >> 
> >> A = load '/Pig/000000_0' using PigStorage()
> >> as
> >> (id:INT, name:chararray, ddate, prim, ignore, ignorecase, activat);
> >> 
> >> What should be in the delimiter into PigStorage( )?
> >> I have tried PigStorage('/001') but its showing errors.
> >> What delimiter should we use.
> >> 
> >> Please help and Suggest.
> >> 
> >> 
> >> Thanks & Regards
> >> Yogesh Kumar
> >> 
> >> 
> >> 
> >> 
> >> 
> >> ________________________________
> >> Subject: Re: Need Help in Hive storage format
> >> To: user@hive.apache.org
> >> From: bejoy_ks@yahoo.com
> >> Date: Thu, 11 Oct 2012 17:53:12 +0000
> >> 
> >> 
> >> Hi Yogesh.
> >> 
> >> It should be a simple delimited file with ^A character as the field
> >> delimiter.
> >> Regards
> >> Bejoy KS
> >> 
> >> Sent from handheld, please excuse typos.
> >> ________________________________
> >> From: yogesh dhari <yo...@live.com>
> >> Date: Thu, 11 Oct 2012 23:18:35 +0530
> >> To: hive request<us...@hive.apache.org>
> >> ReplyTo: user@hive.apache.org
> >> Subject: Need Help in Hive storage format
> >> 
> >> Hi all,
> >> 
> >> If we run this query
> >> 
> >> insert overwrite local directory '/home/yogesh/Downloads/demoyy' select *
> >> from NYSE_LOCAL;
> >> 
> >> {
> >> ( describe NYSE_LOCAL ;
> >> 
> >> exchange    string
> >> symbol    string
> >> ddate    string
> >> open    float
> >> high    float
> >> low    float
> >> ) }
> >> 
> >> ls /home/yogesh/Downloads/demoyy/
> >> 
> >> it shows the file name 000000_0
> >> 
> >> my Question is:
> >> 
> >> 1) In which format does file 000000_0 is?
> >> 2) what is the delimiter between columns?
> >> 
> >> Please help
> >> 
> >> Thanks & Regards
> >> Yogesh Kumar
> >> 
> >> 
 		 	   		  

Re: Need Help in Hive storage format

Posted by Abhishek <ab...@gmail.com>.
Hi Yogesh,

Try this PigStorage(' \u0001');

Thanks 
Abhi


Sent from my iPhone

On Oct 12, 2012, at 5:50 AM, MiaoMiao <li...@gmail.com> wrote:

> Hi Yogesh:
> 
> I think this may help.
> 
> https://pig.apache.org/docs/r0.10.0/api/org/apache/pig/builtin/PigStorage.html
> 
> Miao
> 
> On Fri, Oct 12, 2012 at 5:27 PM, yogesh dhari <yo...@live.com> wrote:
>> Thanks Bejoy,
>> 
>> Now I want to store theses rows in Pig.
>> 
>> like
>> 
>> A = load '/Pig/000000_0' using PigStorage()
>> as
>> (id:INT, name:chararray, ddate, prim, ignore, ignorecase, activat);
>> 
>> What should be in the delimiter into PigStorage( )?
>> I have tried PigStorage('/001') but its showing errors.
>> What delimiter should we use.
>> 
>> Please help and Suggest.
>> 
>> 
>> Thanks & Regards
>> Yogesh Kumar
>> 
>> 
>> 
>> 
>> 
>> ________________________________
>> Subject: Re: Need Help in Hive storage format
>> To: user@hive.apache.org
>> From: bejoy_ks@yahoo.com
>> Date: Thu, 11 Oct 2012 17:53:12 +0000
>> 
>> 
>> Hi Yogesh.
>> 
>> It should be a simple delimited file with ^A character as the field
>> delimiter.
>> Regards
>> Bejoy KS
>> 
>> Sent from handheld, please excuse typos.
>> ________________________________
>> From: yogesh dhari <yo...@live.com>
>> Date: Thu, 11 Oct 2012 23:18:35 +0530
>> To: hive request<us...@hive.apache.org>
>> ReplyTo: user@hive.apache.org
>> Subject: Need Help in Hive storage format
>> 
>> Hi all,
>> 
>> If we run this query
>> 
>> insert overwrite local directory '/home/yogesh/Downloads/demoyy' select *
>> from NYSE_LOCAL;
>> 
>> {
>> ( describe NYSE_LOCAL ;
>> 
>> exchange    string
>> symbol    string
>> ddate    string
>> open    float
>> high    float
>> low    float
>> ) }
>> 
>> ls /home/yogesh/Downloads/demoyy/
>> 
>> it shows the file name 000000_0
>> 
>> my Question is:
>> 
>> 1) In which format does file 000000_0 is?
>> 2) what is the delimiter between columns?
>> 
>> Please help
>> 
>> Thanks & Regards
>> Yogesh Kumar
>> 
>> 

Re: Need Help in Hive storage format

Posted by MiaoMiao <li...@gmail.com>.
Hi Yogesh:

I think this may help.

https://pig.apache.org/docs/r0.10.0/api/org/apache/pig/builtin/PigStorage.html

Miao

On Fri, Oct 12, 2012 at 5:27 PM, yogesh dhari <yo...@live.com> wrote:
> Thanks Bejoy,
>
> Now I want to store theses rows in Pig.
>
> like
>
> A = load '/Pig/000000_0' using PigStorage()
> as
> (id:INT, name:chararray, ddate, prim, ignore, ignorecase, activat);
>
> What should be in the delimiter into PigStorage( )?
> I have tried PigStorage('/001') but its showing errors.
> What delimiter should we use.
>
> Please help and Suggest.
>
>
> Thanks & Regards
> Yogesh Kumar
>
>
>
>
>
> ________________________________
> Subject: Re: Need Help in Hive storage format
> To: user@hive.apache.org
> From: bejoy_ks@yahoo.com
> Date: Thu, 11 Oct 2012 17:53:12 +0000
>
>
> Hi Yogesh.
>
> It should be a simple delimited file with ^A character as the field
> delimiter.
> Regards
> Bejoy KS
>
> Sent from handheld, please excuse typos.
> ________________________________
> From: yogesh dhari <yo...@live.com>
> Date: Thu, 11 Oct 2012 23:18:35 +0530
> To: hive request<us...@hive.apache.org>
> ReplyTo: user@hive.apache.org
> Subject: Need Help in Hive storage format
>
> Hi all,
>
> If we run this query
>
> insert overwrite local directory '/home/yogesh/Downloads/demoyy' select *
> from NYSE_LOCAL;
>
> {
> ( describe NYSE_LOCAL ;
>
>  exchange    string
> symbol    string
> ddate    string
> open    float
> high    float
> low    float
> ) }
>
> ls /home/yogesh/Downloads/demoyy/
>
> it shows the file name 000000_0
>
> my Question is:
>
> 1) In which format does file 000000_0 is?
> 2) what is the delimiter between columns?
>
> Please help
>
> Thanks & Regards
> Yogesh Kumar
>
>

RE: Need Help in Hive storage format

Posted by yogesh dhari <yo...@live.com>.
Thanks Bejoy,

Now I want to store theses rows in Pig.

like 

A = load '/Pig/000000_0' using PigStorage() 
as 
(id:INT, name:chararray, ddate, prim, ignore, ignorecase, activat);

What should be in the delimiter into PigStorage( )?  
I have tried PigStorage('/001') but its showing errors.
What delimiter should we use.

Please help and Suggest.

Thanks & Regards
Yogesh Kumar





Subject: Re: Need Help in Hive storage format
To: user@hive.apache.org
From: bejoy_ks@yahoo.com
Date: Thu, 11 Oct 2012 17:53:12 +0000




Hi Yogesh. 

It should be a simple delimited file with ^A character as the field delimiter.
Regards
Bejoy KS

Sent from handheld, please excuse typos.From:  yogesh dhari <yo...@live.com>
Date: Thu, 11 Oct 2012 23:18:35 +0530To: hive request<us...@hive.apache.org>ReplyTo:  user@hive.apache.org
Subject: Need Help in Hive storage format

Hi all,

If we run this query

insert overwrite local directory '/home/yogesh/Downloads/demoyy' select * from NYSE_LOCAL; 

{
( describe NYSE_LOCAL ;

 exchange    string    
symbol    string    
ddate    string    
open    float    
high    float    
low    float    
) }

ls /home/yogesh/Downloads/demoyy/

it shows the file name 000000_0

my Question is:

1) In which format does file 000000_0 is?
2) what is the delimiter between columns?

Please help 

Thanks & Regards
Yogesh Kumar


 		 	   		   		 	   		  

Re: Need Help in Hive storage format

Posted by Bejoy KS <be...@yahoo.com>.
Hi Yogesh. 

It should be a simple delimited file with ^A character as the field delimiter.

Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: yogesh dhari <yo...@live.com>
Date: Thu, 11 Oct 2012 23:18:35 
To: hive request<us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: Need Help in Hive storage format


Hi all,

If we run this query

insert overwrite local directory '/home/yogesh/Downloads/demoyy' select * from NYSE_LOCAL; 

{
( describe NYSE_LOCAL ;

 exchange    string    
symbol    string    
ddate    string    
open    float    
high    float    
low    float    
) }

ls /home/yogesh/Downloads/demoyy/

it shows the file name 000000_0

my Question is:

1) In which format does file 000000_0 is?
2) what is the delimiter between columns?

Please help 

Thanks & Regards
Yogesh Kumar