I have one AWS glue pyspark script for example scriptA.py. In this script I have defined few generic functions like readSourceData()
def readSourceData(parameter1, parameter2):
//logic of function
Now I want to use this generic function in my secong glue pyspark script scriptB.py.
I have many such generic functions. How can I import these functions and use them in other scripts?
You can create modules with your generic functions and attach those external python modules to your glue jobs. More on this you can read up here.
Extensive answer:
Make sure that your Job Role has access to the location in S3.