I am using it in Group BY. Also, I tried with empty pig script by just touching a file called test.pig and tried to run. I got same error. The error is pasted below:
java.lang.RuntimeException: You can only run one pig script at a time from the command line.
Please find below script and the way I am firing it at command line:
raw = LOAD '/user/ppallavi/' USING PigStorage('\t') ;
clickAggr = GROUP raw by ($0, '$date') PARALLEL 10;
clickCounts = FOREACH clickAggr GENERATE FLATTEN(group), COUNT($1);
distinctclickCounts = DISTINCT clickCounts;
STORE distinctclickCounts INTO '/somelocation/ClickCounts/' using PigStorage('\t');
Here is how I am calling this script from command line:
bin/pig -param date="2009-06-01 01" test.pig
If I don't use space, it is working perfectly fine. I am using hadoop-18.2 and the pig checked out from types branch.
----- Original Message -----
From: "Alan Gates" <firstname.lastname@example.org>
Sent: Tuesday, June 2, 2009 6:05:08 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: issue with space in command line arguments for pig script
Can you give an example of your script. I tried passing a space to
PigStorage for the column separator and it worked fine. Are you
passing this to an EvalFunc or a LoadFunc?
On Jun 1, 2009, at 3:00 AM, Palleti, Pallavi wrote:
I have a requirement where I need to pass an argument to pig script
which has space in it. I found that pig script is failing to parse
kind of parameters as it is breaking at the space. This is happening
even after I surround each parameter value using quotes. So, the
option that I am thinking is to use a special character while
input parameter and replace it with space in pig script. So, can
please let me know if there is a simpler way of doing it?