Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
This one drove me batty.
I have two files file and file.right.
file:
WRONG!!!! This is file, not file.right.
file.right:
RIGHT!!!! This is file.right..
infile.pig:
A = load '$infile' using PigStorage();
dump A;
When I pass in file.right as the infile parameter value, the wrong file is read:
-bash-3.00$ pig -exectype local -param infile=file.right infile.pig USING: /grid/0/gs/pig/current 2009-04-05 23:18:36,291 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! 2009-04-05 23:18:36,292 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! (WRONG!!!! ) (This is file, not file.right.)
However, if I pass in infile as ./file.right, the script magically works.
-bash-3.00$ pig -exectype local -param infile=./file.right infile.pig USING: /grid/0/gs/pig/current 2009-04-05 23:20:46,735 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! 2009-04-05 23:20:46,736 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! (RIGHT!!!!) (This is file.right.)
I do not have this problem if I use the file name with a period in the script itself:
infile2.pig
A = load 'file.right' using PigStorage();
dump A;
-bash-3.00$ pig -exectype local infile2.pig USING: /grid/0/gs/pig/current 2009-04-05 23:22:47,022 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete! 2009-04-05 23:22:47,023 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!! (RIGHT!!!!) (This is file.right.)
I also experience similar problems when I try to pass in param outfile in a store statement.
Attachments
Issue Links
- depends upon
-
PIG-564 Parameter Substitution using -param option does not seem to work when parameters contain special characters such as +,=,-,?,' "
- Closed