This is the implementation of the Couchbase data handler for MindsDB.

Couchbase is an open-source, distributed multi-model NoSQL document-oriented database software package optimized for interactive applications. These applications may serve many concurrent users by creating, storing, retrieving, aggregating, manipulating and presenting data.


This handler is implemented using the couchbase library, the Python driver for Couchbase.

The required arguments to establish a connection are as follows:

  • host is the host name or IP address of the Couchbase server.
  • bucket is the port to use when connecting with the Couchbase server.
  • user is the user to authenticate with the Couchbase server.
  • password is the password to authenticate the user with the Couchbase server.
  • scope is the scope to use for making queries based on a scoped context (equivalent to schema in MySQL). Defaults to _default.

If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/couchbase_handler) and run this command: pip install -r requirements.txt.


In order to make use of this handler and connect to the Couchbase server in MindsDB, the following syntax can be used:

CREATE DATABASE couchbase_datasource
    engine = 'couchbase',
    parameters = {
        "host": "localhost",
        "bucket": "test-bucker",
        "user": "admin",
        "password": "password"

You can use this established connection to query your table as follows:

FROM couchbase_datasource.collection;