Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or use MindsDB Cloud.
- To connect ClickHouse to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to ClickHouse.
Implementation
This handler was implemented using the standardclickhouse-sqlalchemy library.
The required arguments to establish a connection are as follows:
hostis the hostname or IP address of the ClickHouse server.portis the TCP/IP port of the ClickHouse server.useris the username used to authenticate with the ClickHouse server.passwordis the password to authenticate the user with the ClickHouse server.databasedefaults todefault. It is the database name to use when connecting with the ClickHouse server.protocoldefaults tonative. It is an optional parameter. Its supported values arehttpandhttps.