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 Threaded View
Pig >> mail # user >> Adding days to Pig


Copy link to this message
-
Re: Adding days to Pig
Hi,
In Pig version 0.11 there is a CurrentTime function. But if you can't
upgrade, you can use parameter.

now = date "+%Y%m%d"
pig -param currenttime=${now} yourscript.pig

and in your pig code, currenttime+46 gives you get_date +46 days.

thanks
best regards...
On Sat, Dec 14, 2013 at 2:49 AM, Krishnan Narayanan <
[EMAIL PROTECTED]> wrote:

> Hi All ,
>
> I am trying to do something like (get_date +46 days) , how to achieve this
> in pig.
>
> I am using pig 0.10
> help much appreciated.
>
> Thanks
> Krishnan
>

--

*BURAK ISIKLI* | *http://burakisikli.wordpress.com
<http://burakisikli.wordpress.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