I used “CB 5.1” version and spark connector “2.2.0” and my spark session I added two buckets as below :
lazy val spark : SparkSession = {
SparkSession
.builder()
.master("local")
.appName("Demo")
.config("spark.couchbase.nodes", "127.0.0.1")
.config("spark.couchbase.username", "admin")
.config("spark.couchbase.password", "admin")
.config("spark.couchbase.bucket.test", "")
.config("spark.couchbase.bucket.test1", "")
.getOrCreate()
}
but when I run my code it show following error :
“Caused by: java.lang.IllegalStateException: The bucket name can only be inferred if there is exactly 1 bucket set on the config”