-Re: Including a simple regex with -param
Thejas M Nair 2011-01-14, 21:26
Use single quotes around the param value so that shell does not interpret the "|" . (in case of bash shell)
$ cat t.pig
$ java -Xmx500m -cp pig.jar org.apache.pig.Main -dryrun -x local -param keyword='abc|def' t.pig
2011-01-14 13:23:56,670 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_comb2/trunk/pig_1295040236668.log
2011-01-14 13:23:56,699 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at t.pig.substituted
$ cat t.pig.substituted
On 1/14/11 9:28 AM, "Shane Eller" <[EMAIL PROTECTED]> wrote:
I'm having trouble finding a way to include a simple regex string with the -param flag.
Example: pig -f myscript.pig -param keyword=buy|price|sell|sale|discounts
I've tried a mix of quotes, escapes, etc and nothing seems to work. The corresponding line in my pig script looks something like
Any help or comments would be appreciated.