I use a spark-submit cmd to run a pyspark script. I have a module with all my utilities. I need to be able to import functions from this module, but I'm getting "module not found error". I have zipped my module and uploaded it using --archive in spark submit. I tried to use zipimport to extract the module from the zip but I'm still unable to read the module. How do I load functions from my module into my pyspark script?
importer = zipimport.zipimporter("module.zip")
mod = importer.load_module("model")
How do I access functions from "mod" object? Any alternatives to zipimport will also be highly appreciated