Using SparkSQL with Couchbase from Java

Using SparkSQL from Java is possible because the Java API provides wrappers for both the DataFrameReader and DataFrameWriter APIs. All you need to do is wrap the ones that are returned by Spark and wrap them like in the following example to get access to all couchbase specific methods: