I'm trying to import classes in external jar with PySpark, I'm running the spark-shell with --jars and the path to the jar that contains the classes I want to use.
However, when I import a class inside my code, the namespace is not found:
from io.warp10.spark import WarpScriptFilterFunction
The error:
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Traceback (most recent call last):
File "warp10-test.py", line 1, in <module>
from io.warp10.spark import WarpScriptFilterFunction
ImportError: No module named warp10.spark
You have to use a WarpScriptâ„¢ UDF if you want to run warpscript on Spark.
Here is an example:
For more information, see: https://www.warp10.io/content/05_Ecosystem/04_Data_Science/06_Spark/02_WarpScript_PySpark