pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Coveney <jcove...@gmail.com>
Subject Re: getting x records at position y?
Date Fri, 02 Dec 2011 16:10:06 GMT
When you say position y, what do you mean? IE, do you mean that you have
10000 records, and want records 1000 to 1010? ie y=1000 and x=10? Or
something else?

Keep in mind that unless there is a key to sort on, this is not a terribly
parallel process.

2011/12/2 Jie Li <jieli@cs.duke.edu>

> I think you can use LIMIT operator, for example,
>
> tmp = FOREACH input GENERATE $y;
> output = LIMIT tmp x;
>
> Jie
>
> On Fri, Dec 2, 2011 at 8:12 AM, Geert Van Landeghem <gvl@foundation.be
> >wrote:
>
> > Hello all,
> >
> > how to fetch x records at position y in a file with pig?
> >
> >
> >
> > --
> >
> >
> > --
> > *
> > kind regards,
> >
> > Van Landeghem Geert*
> > Managing Director
> > Foundation.be
> >
> > Hoekskensweg 12, 9290 Berlare
> > btw: BE 0872.859.349
> > gsm: +32 477 759533
> > web1: http://www.foundation.be
> > web2: http://www.relacss.com
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message