Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Unable to use import in the python script


Copy link to this message
-
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