title: How to add jar to Spark in Pycharm
body: <p>I want to debug Spark code in PyCharm because it is easier to debug. But I need to add a <code>spark-redis.jar</code> otherwise <code>Failed to find data source: redis</code></p>
  
  <p>The code to connect to redis is </p>
  
  <pre><code>spark = SparkSession \
              .builder \
              .appName("Streaming Image Consumer") \
              .config("spark.redis.host", self.redis_host) \
              .config("spark.redis.port", self.redis_port) \
              .getOrCreate()
  </code></pre>
  
  <p>How to do fix it if using PyCharm?</p>
  
  <p>I have tried adding <code>spark.driver.extraClassPath</code> in <code>$SPARK_HOME/conf/spark-defaults.conf</code> but it does not work.</p>
  
  <p>I also tried adding environment variable <code>PYSPARK_SUBMIT_ARGS --jars ...</code> in run configuration but it raise other error</p>