Connect ClickHouse
Use this tested setup flow to connect ClickHouse to Skoot.
Prerequisites
- You have an existing ClickHouse user for Skoot, or permissions to create roles/users and grant privileges.
- You know which database(s) and tables to expose to Skoot.
- You have ClickHouse connection details for Skoot (
Host,HTTP Port,Username,Password, and optionalDatabase).
Step 1 — Create the Role
CREATE ROLE IF NOT EXISTS skoot_readonly_role;Step 2 — Grant Database and Table Access
Repeat grants for each database your users query.
GRANT SELECT ON default.* TO skoot_readonly_role;
-- GRANT SELECT ON other_db.* TO skoot_readonly_role;Step 3 — Grant Metadata Access
Skoot schema discovery needs metadata reads on system tables.
GRANT SELECT ON system.databases TO skoot_readonly_role;
GRANT SELECT ON system.tables TO skoot_readonly_role;
GRANT SELECT ON system.columns TO skoot_readonly_role;Step 4 — Configure Settings Profile for Timeout Control
This enables app-side query timeout control so Skoot can set a timeout for all queries.
CREATE SETTINGS PROFILE IF NOT EXISTS skoot_readonly_profile_dynamic
SETTINGS
readonly = 1,
max_execution_time = 30 MIN 1 MAX 120 CHANGEABLE_IN_READONLY
TO skoot_readonly_role;Step 5 — Create the User
CREATE USER IF NOT EXISTS skoot_readonly_user IDENTIFIED BY 'replace_with_strong_password';
GRANT skoot_readonly_role TO skoot_readonly_user;
SET DEFAULT ROLE skoot_readonly_role TO skoot_readonly_user;Step 6 — Optional: IP Whitelisting
This step is optional. Use it only if your ClickHouse host is in a private zone or protected by network allowlists.
If needed, allowlist Skoot public egress IP from Data Sources in your network/security layer.
Connect in Skoot App
After ClickHouse setup is complete:
- Open Data Sources .
- Click ClickHouse in Available Data Sources section ClickHouse Connection .
- Fill these fields exactly:
Connection NameHostHTTP PortDatabase (optional)UsernamePasswordUse SSL
- Save the connection.
- Confirm status is
Connected.
Related Pages
Last updated on