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 >> modulize pig scripts via 'run'; pass param containing special chars


Copy link to this message
-
Re: modulize pig scripts via 'run'; pass param containing special chars
Does putting the parameters in a file using -param_file help?

Alan.

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
> calls:
>
> 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?
>
> Thanks
>
> Markus
>
>
>
>
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