Created 05-01-2017 10:00 AM
hello,
i am new to hadoop.
i want to execute my pig script file from grunt shell.
Created 05-01-2017 01:57 PM
Hi @heta desai,
You can execute it via the exec command, for example:
grunt> cat myscript.pig a = LOAD 'student' AS (name, age, gpa); b = LIMIT a 3; DUMP b; grunt> exec myscript.pig (alice,20,2.47) (luke,18,4.00) (holly,24,3.27)
Created 05-02-2017 06:01 AM
cat test/script/test1-2017-05-02_11-14-06_999.pig
This works good.
but exec comman didn't worked.
exec /test/script/test1-2017-05-02_11-14-06_999.pig
it shows following error:
2017-05-02 05:59:55,487 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. File not found: /test/script/test1-2017-05-02_11-14-06_999.pig Details at logfile: /home/sshuser/pig_1493704766712.log
Created 05-02-2017 08:43 AM
Your script location is wrong, start grunt in the directory with the script or provide full path to the script in the exec command