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

MatrixOne is a future-oriented hyper-converged cloud and edge native DBMS that supports transactional, analytical, and streaming workloads with a simplified and distributed database engine, across multiple data centers, clouds, edges, and other heterogeneous infrastructures.

Prerequisites

Before proceeding, ensure the following prerequisites are met:

  1. Install MindsDB locally via Docker or use MindsDB Cloud.
  2. To connect MatrixOne to MindsDB, install the required dependencies following this instruction.
  3. Install or ensure access to MatrixOne.

Implementation

This handler is implemented using PyMySQL, a Python library that allows you to use Python code to run SQL commands on the MatrixOne database.

The required arguments to establish a connection are as follows:

  • user is the username associated with the database.
  • password is the password to authenticate your access.
  • host is the hostname or IP address of the database.
  • port is the port through which TCP/IP connection is to be made.
  • database is the database name to be connected.

There are several optional arguments that can be used as well.

  • ssl indicates whether SSL is enabled (True) or disabled (False).
  • ssl_ca is the SSL Certificate Authority.
  • ssl_cert stores the SSL certificates.
  • ssl_key stores the SSL keys.

Usage

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

CREATE DATABASE matrixone_datasource
WITH
    engine = 'matrixone',
    parameters = {
        "user": "dump",
        "password": "111",
        "host": "127.0.0.1",
        "port": 6001,
        "database": "mo_catalog"
    };

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

SELECT *
FROM Matrixone_datasource.demo;