PDA

View Full Version : Pig script unable to find stream script in ship spesification.



ehsan.haq
07-15-2013, 01:00 PM
Hi,
I am using pentaho kettle 4.4 and have an ETL which contains a pig script. The pig script uses a streaming script, however during the execution the script is not found. Where should I put the script in order to be found by the pig script executor.
This is my pig script.

lines = load 'filename' as (line:chararray);
DEFINE my_stream `my_script.py` SHIP (my_script.py');
A = STREAM lines THROUGH my_stream;
store A into 'output_path' using PigStorage(' ');

Following is the error:
Script Executor - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Error during parsing. Pig script failed to parse:
2013/07/15 18:45:18 - Pig Script Executor - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : <line 2, column 21> Failed to generate logical plan. Nested exception: java.io.IOException: Invalid ship specification: 'my_script.py' does not exist!
2013/07/15 18:45:18 - Pig Script Executor - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Pig script failed to parse:
2013/07/15 18:45:18 - Pig Script Executor - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : <line 2, column 21> Failed to generate logical plan. Nested exception: java.io.IOException: Invalid ship specification: 'my_script.py' does not exist!
2013/07/15 18:45:18 - Pig Script Executor - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1607)

Thanks
Ehsan

ehsan.haq
07-16-2013, 11:04 AM
My bad, I had the wrong directory setup, which was the main reason, fixing the path of the script properly fixed the problem.