I’m writing an embedded pig script in python, and I’d like to pass arguments like this:
$ pig myscript.py arg1 arg2
I’d expect sys.argv to be ['myscript.py', 'arg1', 'arg2'], but it’s empty.
Any idea how I can pass command-line arguments to an embedded pig script?
sys.argvshould include the name of the executable, so it’d probably be['myscript.py', 'arg1', 'arg2'], but it looks like this was an open issue that was fixed in a recent version of Pig: https://issues.apache.org/jira/browse/PIG-2548.Perhaps check that you’re using something newer than 0.10.0.