You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jerry Lam <ch...@gmail.com> on 2013/04/10 00:35:44 UTC

Unable to use import in the python script

Hi guys,

I'm having problems to use import in a python script. For example (copy
directly from the book "Programming in Pig"):

P1 = Pig.compile("initial", """ A = load 'input';
...
""")
P2 = Pig.compile(""" import 'initial';
B = load 'more_input'; ...
""")

It is expected that the 'initial' will be imported to P2 but I got an error
when I ran the script saying Unable to fetch macro file 'initial'.

Can anyone help me to understand the problem? Any solution to this issue?

Best Regards,

Jerry