|
|
-
Re: space in param values in command lineRaghu Angadi 2011-07-12, 20:33
are you using bin/pig? With bin/pig, it does not even go to substitution
stage. bin/pig joins all the arguments into one bash string. If I explicitly invoke pig java command (as printed with -secredDebugCmd) with the arguments it works. Btw, spaces before '=' also need to be escaped looks like. Raghu. On Tue, Jul 12, 2011 at 11:00 AM, Daniel Dai <[EMAIL PROTECTED]> wrote: > Seems space works for me. You can use -r to dry-run the parameter > substitution part to see what it results. > > Daniel > > On Mon, Jul 11, 2011 at 10:15 PM, Raghu Angadi <[EMAIL PROTECTED]> wrote: > > > On Mon, Jul 11, 2011 at 9:30 PM, Daniel Dai <[EMAIL PROTECTED]> > wrote: > > > > > It's not the space, it is the '=' character which is not allowed. Use \ > > to > > > do the escape, cond="x \=\= 1". > > > > > > This helps.. I was wondering why my test didn't work even when there > were > > no spaces. > > > > The space is still a problem. When there is a space it still causes > > "2011-07-12 05:10:48,496 [main] ERROR org.apache.pig.Main - ERROR 2999: > > Unexpected internal error. Encountered unexpected arguments on command > line > > - please check the command line." > > > > to summarize : > > "x == 1" : does not work > > "x==1" : doesn't > > "x\=\=1" : does > > "x \=\= 1" : doesn't > > > > Raghu. > > > > > Daniel > > > > > > On Mon, Jul 11, 2011 at 2:09 PM, Raghu Angadi <[EMAIL PROTECTED]> > > wrote: > > > > > > > I am not able to assign a value with spaces to param on command line. > > > > $ pig -p cond='x == 1' test.pig > > > > results in command line parser error. > > > > other attempts like 'pig -p cond='"x == 1"' test.pig' didn't help. > > > > > > > > Is there a work around? > > > > otherwise I will file a jira and look into a fix. > > > > > > > > thanks, > > > > Raghu. > > > > > > > > > > |