Dear Pig users,
I am trying to do simple joins by following an example on a Blog. Your help 
will be great.
 
UserDetails.txt
123456, Jim
456123, Tom
789123, Harry
789456, Richa

DeliveryDetails.txt
123456, 001
456123, 002
789123, 003
789456, 004

DeliveryStatusCodes.txt
001, Delivered
002, Pending
003, Failed
004, Resend

Expected o/p
Jim Delivered
.....



grunt> userdetails = load 'UserDetails.txt' as (mobile, username);

grunt> deliverydetails = load 'DeliveryDetails.txt' as (mobile , deliverycode);

grunt> userdeliverydetails = join userdetails BY mobile, deliverydetails BY 
mobile;

grunt> describe userdeliverydetails
userdeliverydetails: {userdetails::mobile: bytearray,userdetails::username: 
bytearray,deliverydetails::mobile: bytearray,deliverydetails::deliverycode: 
bytearray}

grunt> deliverystatuscodes = load 'DeliveryStatusCodes.txt' as (deliverycode, 
message);

grunt>  output = join userdeliverydetails by $3, deliverystatuscodes by $0;

2013-06-19 00:02:31,600 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
1200: <line 8, column 0>  mismatched input 'output' expecting EOF
Details at logfile: pig_1371623265656.log. I have copied the details here:
-:---F1  *scratch*      All L1     (Fundamental)-----------------------------
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser\
.java:739)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(Pig\
ScriptParser.java:626)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScrip\
tParser.java:323)
        at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.\
java:194)
        at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.\
java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisit\
or.java:583)
-uu-:---F1  pig_1371623265656.log   Top L1     (Fundamental)--------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.\
java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigS\
criptParser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScript\
Parser.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.j\
ava:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.j\
ava:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisito\
r.java:583)
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)---------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.j\
ava:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigSc\
riptParser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptP\
arser.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.ja\
va:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.ja\
va:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor\
.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:22\
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)----------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.jav\
a:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScri\
ptParser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptPar\
ser.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java\
:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java\
:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.j\
ava:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDept\
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java\
:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScrip\
tParser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptPars\
er.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:\
194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:\
170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.ja\
va:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepth\
FirstWalker.java:82)
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)-------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:7\
39)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptP\
arser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser\
.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:19\
4)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:17\
0)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java\
:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFi\
rstWalker.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWal\
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)---------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739\
)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptPar\
ser.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.j\
ava:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:5\
83)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirs\
tWalker.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalke\
r.java:66)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)-----------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser\
.java:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java\
:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirstWa\
lker.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalker.j\
ava:66)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
================================================================================
Pig Stack Trace
---------------
ERROR 1200: <line 8, column 0>  mismatched input 'output' expecting EOF
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)--------------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.j\
ava:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:3\
23)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirstWalk\
er.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalker.jav\
a:66)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
================================================================================
Pig Stack Trace
---------------
ERROR 1200: <line 8, column 0>  mismatched input 'output' expecting EOF

Failed to parse: <line 8, column 0>  mismatched input 'output' expecting EOF
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)----------------------------------
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.jav\
a:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:323\
)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirstWalker\
.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalker.java:\
66)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
================================================================================
Pig Stack Trace
---------------
ERROR 1200: <line 8, column 0>  mismatched input 'output' expecting EOF

Failed to parse: <line 8, column 0>  mismatched input 'output' expecting EOF
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:235)
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)------------------------------------
Loading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.java:\
626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.java:\
626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:323)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirstWalker.j\
ava:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalker.java:66\
)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
================================================================================
Pig Stack Trace
---------------
ERROR 1200: <line 8, column 0>  mismatched input 'output' expecting EOF

Failed to parse: <line 8, column 0>  mismatched input 'output' expecting EOF
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:235)
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:177)
        at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1571)
        at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1544)
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)--------------------------------------ading image...done
Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Exception

java.io.IOException: Exception
        at org.apache.pig.PigServer.getExamples(PigServer.java:1186)
        at 
org.apache.pig.tools.grunt.GruntParser.processIllustrate(GruntParser.java:739)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Illustrate(PigScriptParser.jav\
a:626)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:323\
)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.run(Main.java:538)
        at org.apache.pig.Main.main(Main.java:157)
Caused by: java.lang.RuntimeException: No (valid) input data found!
        at 
org.apache.pig.pen.AugmentBaseDataVisitor.visit(AugmentBaseDataVisitor.java:583)
        at 
org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:229)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.depthFirst(PreOrderDepthFirstWalker\
.java:82)
        at 
org.apache.pig.pen.util.PreOrderDepthFirstWalker.walk(PreOrderDepthFirstWalker.java:\
66)
        at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:52)
        at 
org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:180)
        at org.apache.pig.PigServer.getExamples(PigServer.java:1180)
        ... 8 more
================================================================================
Pig Stack Trace
---------------
ERROR 1200: <line 8, column 0>  mismatched input 'output' expecting EOF

Failed to parse: <line 8, column 0>  mismatched input 'output' expecting EOF
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:235)
        at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:177)
-uu-:---F1  pig_1371623265656.log   Top L1     
(Fundamental)------------------------------------
Loading image...donDelivered                                      

Reply via email to