You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by 凯氏图腾 <t...@tengs.info> on 2012/04/04 14:35:42 UTC

help!!--Does Pig can be use in this way?!

Hello!
 I wonder if Pig can be use in this way:I have many records,each record content name and age,now I want to find out one person's age.I know it is easy to make it in Pig Latin, but I just wonder whether it is a good idea to select one record in this way or it can't be better than to make it in SQL?
 Thanks!!

Re: help!!--Does Pig can be use in this way?!

Posted by Jonathan Coveney <jc...@gmail.com>.
I would answer that yes, Pig can do this, but it's definitely overkill.
You're using a hammer to swat a fly. But as always, it depends on the size
of your data, how often you want to do this, etc. If it's a one off thing,
go crazy... unless it means firing up a ton of mappers and wasting cluster
resources.

2012/4/4 Dexin Wang <wa...@gmail.com>

> Or if it's simple like that, why not just "grep"?
>
> On Wed, Apr 4, 2012 at 7:07 AM, Corbin Hobus <co...@tynt.com> wrote:
>
> > If you are just finding the age of one person you are much better off
> > using a regular database and SQL or hbase of you need some kind of quick
> > random access.
> >
> > Hadoop/pig is for batch calculations where you need to sift through lots
> > of data.
> >
> > Sent from my iPhone
> >
> > On Apr 4, 2012, at 6:35 AM, "凯氏图腾" <t...@tengs.info> wrote:
> >
> > > Hello!
> > > I wonder if Pig can be use in this way:I have many records,each record
> > content name and age,now I want to find out one person's age.I know it is
> > easy to make it in Pig Latin, but I just wonder whether it is a good idea
> > to select one record in this way or it can't be better than to make it in
> > SQL?
> > > Thanks!!
> >
>

Re: help!!--Does Pig can be use in this way?!

Posted by Dexin Wang <wa...@gmail.com>.
Or if it's simple like that, why not just "grep"?

On Wed, Apr 4, 2012 at 7:07 AM, Corbin Hobus <co...@tynt.com> wrote:

> If you are just finding the age of one person you are much better off
> using a regular database and SQL or hbase of you need some kind of quick
> random access.
>
> Hadoop/pig is for batch calculations where you need to sift through lots
> of data.
>
> Sent from my iPhone
>
> On Apr 4, 2012, at 6:35 AM, "凯氏图腾" <t...@tengs.info> wrote:
>
> > Hello!
> > I wonder if Pig can be use in this way:I have many records,each record
> content name and age,now I want to find out one person's age.I know it is
> easy to make it in Pig Latin, but I just wonder whether it is a good idea
> to select one record in this way or it can't be better than to make it in
> SQL?
> > Thanks!!
>

Re: help!!--Does Pig can be use in this way?!

Posted by Corbin Hobus <co...@tynt.com>.
If you are just finding the age of one person you are much better off using a regular database and SQL or hbase of you need some kind of quick random access. 

Hadoop/pig is for batch calculations where you need to sift through lots of data.

Sent from my iPhone

On Apr 4, 2012, at 6:35 AM, "凯氏图腾" <t...@tengs.info> wrote:

> Hello!
> I wonder if Pig can be use in this way:I have many records,each record content name and age,now I want to find out one person's age.I know it is easy to make it in Pig Latin, but I just wonder whether it is a good idea to select one record in this way or it can't be better than to make it in SQL?
> Thanks!!