Grokbase Groups Pig user January 2013
FAQ
Ok, I was a bit to quick. I'm able to answer to my own question now.


from org.apache.pig.scripting import ScriptPigContext

ctx = ScriptPigContext.get()

params = ctx.getPigContext().getParams()

paramFiles = ctx.getPigContext().getParamFiles()


getParamFiles() will give me the path to the file, do I have to read the
properties by myself or is there a better way?





--
regards,
pozdrawiam,
Jakub Glapa

On Wed, Jan 23, 2013 at 1:57 PM, Jakub Glapa wrote:

Hi, is there a way to get access to the params passed with the pig command
in the python code?

pig -p param1=val1 -param_file=filepath script.py


Based on this: https://issues.apache.org/jira/browse/PIG-2165 I know that
those params will be automatically bound.
Is there a way access those parameters from within the python code?

--
regards,
pozdrawiam,
Jakub Glapa

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupuser @
categoriespig, hadoop
postedJan 23, '13 at 1:57p
activeJan 23, '13 at 2:07p
posts2
users1
websitepig.apache.org

1 user in discussion

Jakub Glapa: 2 posts

People

Translate

site design / logo © 2021 Grokbase