3

I recently used jars file to allow mongodb integration with spark, so i type:

pyspark --jars mongo-hadoop-spark-2.0.2.jar,mongo-java-driver-3.4.2.jar,mongo-hadoop-2.0.2.jar

wich let me interact with mongodb database from the pyspark shell.

Secondly i use jupyter notebook with the command line 'jupyter notebook' and write:

import findspark
findspark.init()
import pyspark
sc = pyspark.SparkContext()

to run pyspark command inside jupyter.

How could i tell Spark to automatically integrate my jars files as i did with the Shell ? Is there some config files i should fill inside the spark directory (in my $SPARK_HOME or can i do that from inside jupyter notebook ?

Thanks.

PS: I am a newby in info ;)

amous
  • 41
  • 6

0 Answers0