Home | About | Sematext search-lucene.com search-hadoop.com
 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
burakkk 2013-12-14, 20:25
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>*