Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> space in param values in command line


Copy link to this message
-
Re: space in param values in command line
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.
> >
>