I just started with pig and a simple line of code that is supposed to read in data from a file called mary-
input = load 'mary' as (line);
is not working for me. I have this file in the folder from where I ran pig and this is the error I get -
Grunt - ERROR 1200: <line 1, column 0> mismatched input 'input' expecting EOF
This piece of code was taken from the first example of the book Programming_Pig.
Using the name input for a relation does not work as it is a reserved keyword in pig. Use another name for the relation such as
A = load 'mary' as (line);
and it will work.
My guess is that the version that was used for "Programming Pig" did not yet have this reserved keyword or it is simply wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With