Hi Shin,

Try %DECLARE TIME_STAMP `date "+%y-%m-%d %H%M%S"`

or, alternatively, -param TIME_STAMP=`date "+%y-%m-%d %H%M%S"` when you
call the script (just make sure there are no spaces around the "=" sign and
"" around the format.

At least that's how we are doing it, and seems to be working..

Dan F.

On Thu, Apr 19, 2012 at 2:39 AM, Shin Chan <[email protected]> wrote:

> Hello All
>
>  If i give following variable from command line it does not work
>
>  -param TIMESTAMP = 'date +%c'
>
>  It gives error
>
>  java.lang.RuntimeException: Encountered unexpected arguments on command
> line - please check the command line
>
>  But if i enter something like
>
>  TIMESTAMP=`date +%Y-%m-%d` it works , but i want full date including time
> (2012-04-14 11:24 etc) , how to set this.
>
>  I want to capture time stamp at which pig script was started inside the
> output of that script
>
> Thanks and Regards ,
>

Reply via email to