ClickHouse Ingest Access
Creating a ClickHouse User for Netra Ingest
Please run these commands in your ClickHouse query editor. You will need administrator privileges.
For Read-Only Live Queries
This is the most secure and restrictive option. It creates a user that can only read from a single, specified table.
1. Create a Sync Role
This role will have read access and the ability to create temporary tables.
CREATE ROLE netra_integration_sync_role;
2. Grant Necessary Permissions
Grant SELECT
on the specific table and CREATE TEMPORARY TABLE
on the database.
-- Replace 'customer_db' and 'logs' with your actual database and table name.
GRANT SELECT ON replace_with_your_database.replace_with_your_table TO netra_integration_sync_role;
-- This permission is required by the remote() function for data transfer.
-- Replace 'customer_db' with your actual database name.
GRANT CREATE TEMPORARY TABLE ON replace_with_your_database.* TO netra_integration_sync_role;
3. Create the Integration User
Create a new user with a strong password.
-- Replace 'another_strong_password' with a secure, generated password.
CREATE USER netra_integration_sync_user IDENTIFIED WITH sha256_password BY 'another_strong_password';
4. Assign the Role to the User
GRANT netra_integration_sync_role TO netra_integration_sync_user;
5. Share the Credentials
On your Netra dashboard securely add the following credentials:
- User:
netra_integration_sync_user
- Password: The secure password you generated.
- Database:
replace_with_your_database
- Table:
replace_with_your_table
Updated 9 days ago