ClickHouse
Integrate via Direct Connect
Steps
1. Create a User
- Go to the SQL Console
- Create a user named
KUBIT. The Kubit team will generate and share a strong password which you should use to create the user.
CREATE USER KUBIT IDENTIFIED WITH sha256_password BY '*****';2. Create Roles
- Create a role named
KUBIT_RCREATE ROLE OR REPLACE KUBIT_R; - Create a role named
KUBIT_WCREATE ROLE OR REPLACE KUBIT_W; - Set roles to user:
GRANT KUBIT_R TO KUBIT; GRANT KUBIT_W TO KUBIT;
3. Create a Database
Create a database named KUBIT_DB
CREATE DATABASE KUBIT_DB;4. Grant Permissions
- Grant
KUBIT_Wthe permissions to read and write fromKUBIT_DBdatabase. This will allow us to create any auxiliary tables or views there
GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,SHOW,CLUSTER ON KUBIT_DB.* TO KUBIT_W;- Add read-only (SELECT) permissions to the
KUBIT_Rrole to the intended tables/views andKUBIT_DB
GRANT SELECT ON KUBIT_DB TO KUBIT_R;
GRANT SELECT ON INFORMATION_SCHEMA.* TO KUBIT_R;
GRANT SELECT ON system.parts TO KUBIT_R;
GRANT SELECT ON table/view TO KUBIT_R;5. Setup IP Whitelisting
Here's the list of Kubit's IP addresses to allow.


Best PracticeCreate one more user, roles and service for development purposes in order to isolate the impact on the production environment and avoid accidents.
6. Setting up the connection in Kubit
When configuring the JDBC URL in Kubit you will need to pass on the &compress=0 parameter.
Updated 16 days ago
What’s Next
Did this page help you?
