1003 error (unable to find an operator for alias ) in group function in pig
<p>I have written a .pig file whose content is :</p>

<pre><code>register /home/tuhin/Documents/PigWork/pigdata/piggybank.jar;
define replace org.apache.pig.piggybank.evaluation.string.REPLACE();
define csvloader org.apache.pig.piggybank.storage.CSVLoader();
xyz = load '/pigdata/salaryTravelReport.csv' using csvloader();
x = foreach xyz generate $0 as name:chararray, $1 as title:chararray, replace($2, ',','')  as salary:bytearray, replace($3, ',', '') as travel:bytearray, $4 as orgtype:chararray, $5 as org:chararray, $6 as year:bytearray;
refined = foreach x generate name, title, (float)salary, (float)travel, orgtype, org, (int)year;
year2010 = filter refined by year == 2010;
byjobtitile = GROUP year2010 by title;
</code></pre>

<p>The purpose is to remove <code>','</code> in dollar value in 2 columns and then group the data by jobtitle. When I am running this using run command there is not error. Even dumping of year2010 is working fine. But dumping byjobtitiel is giving error:</p>

<p><a href="http://i.stack.imgur.com/7DZTk.jpg" rel="nofollow">error in dumping</a></p>

<p>The output of the log file is:</p>

<blockquote>
  <p>Pig Stack Trace
  --------------- ERROR 1003: Unable to find an operator for alias byjobtitle</p>
  
  <p>org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1003: Unable
  to find an operator for alias byjobtitle  at
  org.apache.pig.PigServer$Graph.buildPlan(PigServer.java:1544)     at
  org.apache.pig.PigServer.storeEx(PigServer.java:1029)     at
  org.apache.pig.PigServer.store(PigServer.java:997)    at
  org.apache.pig.PigServer.openIterator(PigServer.java:910)     at
  org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:754)
    at
  org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:376)
    at
  org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:230)
    at
  org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:205)
    at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:66)  at
  org.apache.pig.Main.run(Main.java:565)    at
  org.apache.pig.Main.main(Main.java:177)   at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)     at
  org.apache.hadoop.util.RunJar.run(RunJar.java:221)    at
  org.apache.hadoop.util.RunJar.main(RunJar.java:136)</p>
</blockquote>

<p>I am new to bigdata and dont have much knowledge. But it looks like there is a problem in data type. Can anyone help me out?</p>