Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to import pyspark script for my into python script

Unable to import pyspark script for my into python script

New Contributor

Hi All,

 

I have pyspark script(p1) which have dataframes created and returns dataframe. the same is being imported into different python script(p2). when i run p1 directly script executes successfully however when i run p2 it failes saying "no module found p1". I have import p1 into p2 script.

 

Please advise.

2 REPLIES 2
Highlighted

Re: Unable to import pyspark script for my into python script

Expert Contributor

Did you follow the naming conventions for python modules specified in Python documentation? Is your module p1 in the same folder as module p2? 

Highlighted

Re: Unable to import pyspark script for my into python script

New Contributor

Yes They both are in same folder.

 

Just to let you know, scripts works if we do not have Spark commands in script which is being imported to other script. So it looks like i am missing something to include.

Don't have an account?
Coming from Hortonworks? Activate your account here