ClickHouse

This guide provides step-by-step instructions for connecting Clickhouse to Unistream.

Prerequisites

You will need:

  • Access to your Clickhouse instance

  • Administrator privileges to create a new user (or existing user credentials)

  • Host address and port number

  • Unistream platform credentials


Step 1: Configure Access in Clickhouse

Before connecting to Unistream, you need to create a dedicated user in Clickhouse and grant appropriate permissions.

1.1 Create User

Connect to your Clickhouse instance (using clickhouse-client or another tool) and run the following commands:

-- Create a new user with password
CREATE USER <username> IDENTIFIED BY '<password>';

Replace:

  • <username> with your desired username

  • <password> with a secure password

1.2 Grant Permissions

Choose the appropriate permission level based on your needs:

Option A: Grant Access to Entire Database

Replace:

  • <database> with your database name

Option B: Grant Access to Specific Tables

Replace:

  • <database> with your database name

  • <table1>, <table2>, etc. with your table names

Option C: Grant Access to Specific Columns

Replace:

  • <database> with your database name

  • <table> with your table name

  • <column1>, <column2>, etc. with your column names

1.3 Example: Complete Setup

Here's a complete example for a database named sales:


Step 2: Connect to Unistream

2.1 Add Clickhouse Source

  1. In Unistream, navigate to Lake

  2. Click Add Source

  3. Select Clickhouse

2.2 Configure Connection

Fill in the General Fields:

  • Name: Enter a descriptive name for your connection (e.g., "Production Clickhouse")

  • Code: Enter a unique code identifier (e.g., "prod_clickhouse")

Fill in the Connection Details:

  • Host: Your Clickhouse server address (e.g., 192.168.1.100 or clickhouse.company.com)

  • Port: Clickhouse HTTP port (default: 8123)

  • Username: The username you created in Step 1 (e.g., unistream_user)

  • Password: The password you set in Step 1

  • (Optional) Database: The name of the database you want to connect to (e.g., sales)

  • SSL/TLS Connection: Check "SSL Disabled" if using SSL, or leave unchecked to disable SSL

2.3 Test and Save

  1. Click Test Connection to verify the connection is working

  2. If the connection is successful, you'll see a success message

  3. Click Add to save your connection

Need Help?

If you encounter any issues not covered in this guide, please contact Unistream support

Last updated