apache pig - Use parameter values in Pig foreach -
is possible use parameter values in pig foreach generate?
maybe this:
*%default todays_date `date +%y/%m/%d`;
a = foreach lines generate line2, id, $todays_date
line2, id, today;*
or have create udf append current date schema instead?
this should work. $value substituted whatever value supply using -param
.
e.g.
pig -param todays_date=value myscript.pig
Comments
Post a Comment