You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Nivetha K <ni...@gmail.com> on 2014/07/01 07:24:14 UTC

Query On Pig

Hi,


 Iam working with Pig.


I need to know some information on HBaseStorage.



B = LOAD 'hbase://sample' using
org.apache.pig.backend.hadoop.hbase.HBaseStorage('details:* details1:*
details2:*','-loadKey true -lte=123') as
(id:chararray,m1:map[],m2:map[],m3:map[]);


(i)   like lte ((ie) Less than Equalto) is there any option like equalto

(ii) Is there any possible to take the partial rowkey.

Re: Query On Pig

Posted by Pradeep Gollakota <pr...@gmail.com>.
i. That's correct.
ii. If the key partial match is at the beginning of the row key, then what
you're looking for is the -gte and -lt/-lte flags. If you want to start
with 123, you just specify -gte 123 -lt 124. This would have the same
affect as a partial starts with match. If what you're looking for is more
complex, trunk has a new feature of HBaseStorage which adds the -regex
flag. You can use this to do more complex matching.


On Mon, Jun 30, 2014 at 11:43 PM, Nivetha K <ni...@gmail.com> wrote:

> (i) There is no direct way to take exact match
>
> (ii) Partial row key means....
>
>          consider my rowkeys are
> 123456,123678,123678,124789,124789.......... i need to take the rowkeys
> starts with 123
>
> On 1 July 2014 11:36, Pradeep Gollakota <pr...@gmail.com> wrote:
>
> > i. Equals can be mimicked by specifying both >= and <= (i.e. -lte=123
> > -gte=123)
> > ii. What do you mean by taking a partial rowkey? the lte and gte are
> > "partial" matches.
> >
> >
> > On Mon, Jun 30, 2014 at 10:24 PM, Nivetha K <ni...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > >
> > >  Iam working with Pig.
> > >
> > >
> > > I need to know some information on HBaseStorage.
> > >
> > >
> > >
> > > B = LOAD 'hbase://sample' using
> > > org.apache.pig.backend.hadoop.hbase.HBaseStorage('details:* details1:*
> > > details2:*','-loadKey true -lte=123') as
> > > (id:chararray,m1:map[],m2:map[],m3:map[]);
> > >
> > >
> > > (i)   like lte ((ie) Less than Equalto) is there any option like
> equalto
> > >
> > > (ii) Is there any possible to take the partial rowkey.
> > >
> >
>

Re: Query On Pig

Posted by Nivetha K <ni...@gmail.com>.
(i) There is no direct way to take exact match

(ii) Partial row key means....

         consider my rowkeys are
123456,123678,123678,124789,124789.......... i need to take the rowkeys
starts with 123

On 1 July 2014 11:36, Pradeep Gollakota <pr...@gmail.com> wrote:

> i. Equals can be mimicked by specifying both >= and <= (i.e. -lte=123
> -gte=123)
> ii. What do you mean by taking a partial rowkey? the lte and gte are
> "partial" matches.
>
>
> On Mon, Jun 30, 2014 at 10:24 PM, Nivetha K <ni...@gmail.com>
> wrote:
>
> > Hi,
> >
> >
> >  Iam working with Pig.
> >
> >
> > I need to know some information on HBaseStorage.
> >
> >
> >
> > B = LOAD 'hbase://sample' using
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('details:* details1:*
> > details2:*','-loadKey true -lte=123') as
> > (id:chararray,m1:map[],m2:map[],m3:map[]);
> >
> >
> > (i)   like lte ((ie) Less than Equalto) is there any option like equalto
> >
> > (ii) Is there any possible to take the partial rowkey.
> >
>

Re: Query On Pig

Posted by Pradeep Gollakota <pr...@gmail.com>.
i. Equals can be mimicked by specifying both >= and <= (i.e. -lte=123
-gte=123)
ii. What do you mean by taking a partial rowkey? the lte and gte are
"partial" matches.


On Mon, Jun 30, 2014 at 10:24 PM, Nivetha K <ni...@gmail.com> wrote:

> Hi,
>
>
>  Iam working with Pig.
>
>
> I need to know some information on HBaseStorage.
>
>
>
> B = LOAD 'hbase://sample' using
> org.apache.pig.backend.hadoop.hbase.HBaseStorage('details:* details1:*
> details2:*','-loadKey true -lte=123') as
> (id:chararray,m1:map[],m2:map[],m3:map[]);
>
>
> (i)   like lte ((ie) Less than Equalto) is there any option like equalto
>
> (ii) Is there any possible to take the partial rowkey.
>