[ https://issues.apache.org/jira/browse/PIG-2165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065725#comment-13065725 ]
Julien Le Dem commented on PIG-2165: ------------------------------------ I see two options: - One way would be to use the pig parameters and assign the values to global variables. {code}pig -p foo=bar myscript.py{code} and then in the script, the variable foo contains "bar" - The other would be to populate sys.argv with the command line parameters {code}sys.argv = [ "pig", "-p", "foo=bar", "myscript.py" ]{code} > Need a way to deal with params and param_file in embedded pig in python > ----------------------------------------------------------------------- > > Key: PIG-2165 > URL: https://issues.apache.org/jira/browse/PIG-2165 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.9.0 > Reporter: Supreeth > Fix For: 0.10 > > > I am using embedded pig in python and cannot pass param key value pairs to > the python script. The only way to pass params seem to be by passing it in > the bind command. > Is there a plan to have command line parameters to a pig embedded python > script? Similar needs for param_file and using the environment variables. > Thanks > Supreeth -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira