how to write a custom decorator in pyspark which will register any python function and execute in pyspark which is being called outside of a class

Viewed 53

Python classes and functions:

class a: def init: def funct(self, df): return a+b class b: def init: def funct(self,df): return c*d Main.py is pyspark file In main.py how can I write a custom decorator which will read funct() from each class and define respective decorator and execute in pyspark dynamically calling funct() method of each classes and pass respective parameters required for individual functions from spark data frame df

0 Answers
Related