- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unable to import pyspark script for my into python script
Created 07-21-2020 02:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 07-21-2020 11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you follow the naming conventions for python modules specified in Python documentation? Is your module p1 in the same folder as module p2?
Created on 07-23-2020 12:45 AM - edited 07-23-2020 12:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.