there are some filter functions like this:
def filter1(x):
if broadcast_variable1.value[x] > 1:
return False
return True
def filter2(x):
if broadcast_variable2.value[x] < 1:
error_accumulator_variable.add(1)
return False
return True
these function are included in my main pyspark script. Now I want to split them into a module file for easier maintenance (I have two pyspark scripts for different use but they have the same filters. ), keep the rest in different files.
how to share these-like filter functions in different pyspark script?
Thanks for your generous help!