Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
Murphy Ric 2013-10-30, 07:45
+
Ruslan Al-Fakikh 2013-11-14, 05:11
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
> >
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB