Markus Resch 2012-06-27, 16:02
-Re: modulize pig scripts via 'run'; pass param containing special chars
Alan Gates 2012-06-29, 16:56
Does putting the parameters in a file using -param_file help?
On Jun 27, 2012, at 9:02 AM, Markus Resch wrote:
> Hey everyone,
> we're still using CDH3u3 pig (0.8.1).
> As out pig scripts are growing we like to split them to modules and call
> them via run. the parameter substitution allows us to write very generic
> scripts and modify them while calling. This worked very well until we
> came to the point where we tried to pass a kind of complex stack of UDF
> run -param timestamp=$timestamp -param
> time_in_customers_timezone="(int)SUBSTRING(DATE_TIME(UnixToISO(((long)Our.TimeStamp)*1000), Timezone),11,13) AS Hour" our_script.pig
> This line created the following error message:
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during
> parsing. Lexical error at line 32, column 63. Encountered: "(" (40),
> after : ""
> We've desperately tried a lot of things (escaping, single/double quotes,
> storing it in a local string ...)
> Does anyone have a suggestion for us?