PySpark Couchbase connection

Viewed 129

I'm trying to use PySpark to connect to our Couchbase server and query it. Essentially I'm trying to do is query Couchbase similar to the following Scala code but using Python (PySpark).

import com.couchbase.spark._
val query = “SELECT name FROM travel-sample WHERE type = ‘airline’ ORDER BY name ASC LIMIT 10”

sc
.couchbaseQuery(Query.simple(query))
.collect()
.foreach(println)

Does anyone have an example of doing this with Python code that they could post?

0 Answers
Related