ClickHouse Integration Guide
Guide to integrating with ClickHouse via Direct Connect.
Steps to Integrate via Direct Connect
-
Access the SQL Console
Navigate to the SQL Console to begin the setup process. -
Create a User
Establish a user namedKUBIT. The Kubit team will provide a secure password for this user.CREATE USER KUBIT IDENTIFIED WITH sha256_password BY '*****'; -
Define Roles
- Create a role named
KUBIT_R.CREATE ROLE OR REPLACE KUBIT_R; - Create another role named
KUBIT_W.CREATE ROLE OR REPLACE KUBIT_W;
- Create a role named
-
Set Up the Database
Create a database namedKUBIT_DB.CREATE DATABASE KUBIT_DB; -
Assign Permissions
Grant theKUBIT_Wrole permissions to read and write within theKUBIT_DBdatabase. This enables the creation of auxiliary tables or views.GRANT SELECT, INSERT, ALTER, CREATE, DROP, TRUNCATE, SHOW, CLUSTER ON KUBIT_DB.* TO KUBIT_W; -
Configure Read-Only Access
Provide theKUBIT_Rrole with read-only (SELECT) permissions for the necessary tables/views and theKUBIT_DBdatabase.GRANT SELECT ON KUBIT_DB TO KUBIT_R; GRANT SELECT ON table/view TO KUBIT_R; -
Set Up IP Address Filters
Configure IP address filters to include Kubit's IP addresses. You can find the list of IPs to safelist here.
Best Practice
Consider creating additional users, roles, and services for development purposes. This helps isolate production environments and prevent accidental impacts.
Updated 7 days ago