Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> SQL- WHILE in Pig


Copy link to this message
-
Re: SQL- WHILE in Pig
You could use while in your UDF.
On 14 November 2013 16:11, Ruslan Al-Fakikh <[EMAIL PROTECTED]> wrote:

> There is no such control logic in Pig.
>
> Maybe the FOREACH statement can help, but it's not a loop, but rather a
> processing operator.
> Also we may want to use Pig Embedding to launch pig from other languages.
>
> Thanks
>
>
> On Wed, Oct 30, 2013 at 11:45 AM, Murphy Ric <[EMAIL PROTECTED]
> >wrote:
>
> > I have a code in SQL to convert to Pig. I request for your help in
> > converting this code.
> >
> > WHILE @Dt1 <= @Dt2
> > BEGIN
> > INSERT INTO ( , , , )
> >                 SELECT , , , ,
> >                 WHERE X > Y
> > SELECT @Dt1 = SELECT DATEADD(MM,1,@Dt1))
> > END
> >
>