Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect ClickHouse to MindsDB, install the required dependencies following this instruction.
Connection
Establish a connection to ClickHouse from MindsDB by executing the following SQL command and providing its handler name as an engine.host: is the hostname or IP address of the ClickHouse server.port: is the TCP/IP port of the ClickHouse server.user: is the username used to authenticate with the ClickHouse server.password: is the password to authenticate the user with the ClickHouse server.database: defaults todefault. It is the database name to use when connecting with the ClickHouse server.protocol: defaults tonative. It is an optional parameter. Its supported values arenative,httpandhttps.
Usage
The following usage examples utilize the connection to ClickHouse made via theCREATE DATABASE statement and named clickhouse_conn.
Retrieve data from a specified table by providing the integration and table name.