Goal
In this guide, you will connect Chartbrew to ClickHouse, run a SQL query, and create a visualization. By the end, your dashboard may look something like this:
- Gather your connection details
To connect to ClickHouse with HTTP(S) you need this information:
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console.
Select a service and click Connect:
Choose HTTPS. Connection details are displayed in an example
curl command.
If you’re using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.
- Connect Chartbrew to ClickHouse
- Log in to Chartbrew and go to the Connections tab.
- Click Create connection and select ClickHouse from the available database options.
-
Enter the connection details for your ClickHouse database:
- Display Name: A name to identify the connection in Chartbrew.
- Host: The hostname or IP address of your ClickHouse server.
- Port: Typically
8443for HTTPS connections. - Database Name: The database you want to connect to.
- Username: Your ClickHouse username.
- Password: Your ClickHouse password.
- Click Test connection to verify that Chartbrew can connect to ClickHouse.
- If the test is successful, click Save connection. Chartbrew will automatically retrieve the schema from ClickHouse.
- Create a dataset and run a SQL query
- Click on the Create dataset button or navigate to the Datasets tab to create one.
- Select the ClickHouse connection you created earlier.
uk_price_paid dataset:
- Create a visualization
- Define a metric (numerical value) and dimension (categorical value) for your visualization.
- Preview the dataset to ensure the query results are structured correctly.
- Choose a chart type (e.g., line chart, bar chart, pie chart) and add it to your dashboard.
- Click Complete dataset to finalize the setup.
- Automate data updates
To keep your dashboard up-to-date, you can schedule automatic data updates:
- Click the Calendar icon next to the dataset refresh button.
- Configure the update interval (e.g., every hour, every day).
- Save the settings to enable automatic refresh.