Spark Connector 2.1 - bucket username / pwd

Hi all,

In databricks I am trying to create a dataframe using the new spark 2.1 connector, connecting to a bucket in couchbase
(note the host is set as spark config for the cluster at startup)

val events =
spark.read
.format(“com.couchbase.spark.sql.DefaultSource”)
.option(“bucket”,“events”)
.option(“username”,“xxxxx”)
.option(“password”,“xxxxx”)
.load()

org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 3.0 failed 1 times, most recent failure: Lost task 0.0 in stage 3.0 (TID 3, localhost, executor driver): com.couchbase.client.java.error.InvalidPasswordException: Passwords for bucket “events” do not match.

Are these the right options? Any ideas?

Thanks

This is because the options are incorrect, please see our docs as linked in your other posting. (https://developer.couchbase.com/documentation/server/4.6/connectors/spark-2.1/getting-started.html)

You need to use

  .config("spark.couchbase.bucket.bucket1", "pw1")
  .config("spark.couchbase.bucket.travel-sample", "")
1 Like