title: How to connect to Cloudand/CouchDB using SparkSQL in DataScience Experience?
body: <p>formerly CouchDB was supported via the cloudant connector:</p>
  
  <p><a href="https://github.com/cloudant-labs/spark-cloudant" rel="nofollow noreferrer">https://github.com/cloudant-labs/spark-cloudant</a></p>
  
  <p>But this project states that it is no longer active and that it moved to Apache Bahir:</p>
  
  <p><a href="http://bahir.apache.org/docs/spark/2.1.1/spark-sql-cloudant/" rel="nofollow noreferrer">http://bahir.apache.org/docs/spark/2.1.1/spark-sql-cloudant/</a></p>
  
  <p>So I've installed the JAR in a Scala notebook using the following command:</p>
  
  <blockquote>
    <p>%AddJar
    <a href="http://central.maven.org/maven2/org/apache/bahir/spark-sql-cloudant_2.11/2.1.1/spark-sql-cloudant_2.11-2.1.1.jar" rel="nofollow noreferrer">http://central.maven.org/maven2/org/apache/bahir/spark-sql-cloudant_2.11/2.1.1/spark-sql-cloudant_2.11-2.1.1.jar</a></p>
  </blockquote>
  
  <p>Then, from a python notebook, after restarting the kernel, I use the following code to test:</p>
  
  <pre><code>spark = SparkSession\
      .builder\
      .appName("Cloudant Spark SQL Example in Python using dataframes")\
      .config("cloudant.host","0495289b-1beb-4e6d-888e-315f36925447-bluemix.cloudant.com")\
      .config("cloudant.username", "0495289b-1beb-4e6d-888e-315f36925447-bluemix")\
      .config("cloudant.password","xxx")\
      .config("jsonstore.rdd.partitions", 8)\
      .getOrCreate()
  
  # ***1. Loading dataframe from Cloudant db
  df = spark.read.load("openspace", "org.apache.bahir.cloudant")
  df.cache()
  df.printSchema()
  df.show()
  </code></pre>
  
  <p>But I get:</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: org.apache.bahir.cloudant.DefaultSource</p>
  </blockquote>
  
  <p><a href="https://gist.github.com/romeokienzler/48320fd93d6973336aeb13a5f000e638" rel="nofollow noreferrer">(gist of full log)</a></p>