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

StarRocks is the next-generation data platform designed to make data-intensive real-time analytics fast and easy. It delivers query speeds 5 to 10 times faster than other popular solutions. StarRocks can perform real-time analytics well while updating historical records. It can also enhance real-time analytics with historical data from data lakes easily. With StarRocks, you can get rid of the de-normalized tables and get the best performance and flexibility.

Prerequisites

Before proceeding, ensure the following prerequisites are met:

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

Implementation

This handler is implemented by extending the MySQL data handler.

The required arguments to establish a connection are as follows:

  • user is the database user.
  • password is the database password.
  • host is the host name, IP address, or URL.
  • port is the port used to make TCP/IP connection.
  • database is the database name.

Usage

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

CREATE DATABASE starrocks_datasource
WITH
  ENGINE = 'starrocks',
  PARAMETERS = {
    "host": "127.0.0.1",
    "user": "starrocks_user",
    "password": "password",
    "port": 8030,
    "database": "starrocks_db"
  };

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

SELECT *
FROM starrocks_datasource.demo_table
LIMIT 10;