Connecting Astrato to ClickHouse

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/integrations/data-visualization/community_integrations/astrato-and-clickhouse.md)

Community Maintained

Astrato uses Pushdown SQL to query ClickHouse Cloud or on-premise deployments directly. This means you can access all of the data you need, powered by the industry-leading performance of ClickHouse.

## Connection data required[​](#connection-data-required "Direct link to Connection data required")

When setting up your data connection, you'll need to know:

- Data connection: Hostname, Port
- Database Credentials: Username, Password

To connect to ClickHouse with HTTP(S) you need this information:

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Parameter(s) Description|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | `HOST` and `PORT` Typically, the port is 8443 when using TLS or 8123 when not using TLS.|  |  |  |  | | --- | --- | --- | --- | | `DATABASE NAME` Out of the box, there is a database named `default`, use the name of the database that you want to connect to.| `USERNAME` and `PASSWORD` Out of the box, the username is `default`. Use the username appropriate for your use case. | | | | | | | |

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.

## Creating the data connection to ClickHouse[​](#creating-the-data-connection-to-clickhouse "Direct link to Creating the data connection to ClickHouse")

- Select **Data** in the sidebar, and select the **Data Connection** tab
  (or, navigate to this link: <https://app.astrato.io/data/sources>)
  ​
- Click on the **New Data Connection** button in the top right side of the screen.

- Select **ClickHouse**.

- Complete the required fields in the connection dialogue box

- Click **Test Connection**. If the connection is successful, give the data connection a **name** and click **Next.**
- Set the **user access** to the data connection and click **connect.**

- A connection is created and a dataview is created.

Note

if a duplicate is created, a timestamp is added to the data source name.

## Creating a semantic model / data view[​](#creating-a-semantic-model--data-view "Direct link to Creating a semantic model / data view")

In our Data View editor, you will see all of your Tables and Schemas in ClickHouse, select some to get started.

Now that you have your data selected, go to define the **data view**. Click define on the top right of the webpage.

In here, you're able to join data, as well as, **create governed dimensions and measures** - ideal for driving consistency in business logic across various teams.

**Astrato intelligently suggests joins** using your meta data, including leveraging the keys in ClickHouse. Our suggested joins make it easy for you to gets started, working from your well-governed ClickHouse data, without reinventing the wheel. We also show you **join quality** so that you have the option to review all suggestions, in detail, from Astrato.

## Creating a dashboard[​](#creating-a-dashboard "Direct link to Creating a dashboard")

In just a few steps, you can build your first chart in Astrato.

1. Open visuals panel
2. Select a visual (lets start with Column Bar Chart)
3. Add dimensions
4. Add measures

### View generated SQL supporting each visualization[​](#view-generated-sql-supporting-each-visualization "Direct link to View generated SQL supporting each visualization")

Transparency and accuracy are at the heart of Astrato. We ensure that every query generated is visible, letting you keep full control. All compute happens directly in ClickHouse, taking advantage of its speed while maintaining robust security and governance.

### Example completed dashboard[​](#example-completed-dashboard "Direct link to Example completed dashboard")

A beautiful complete dashboard or data app isn't far away now. To see more of what we've built, head to our demo gallery on our website. <https://astrato.io/gallery>

- [Connection data required](#connection-data-required)- [Creating the data connection to ClickHouse](#creating-the-data-connection-to-clickhouse)- [Creating a semantic model / data view](#creating-a-semantic-model--data-view)- [Creating a dashboard](#creating-a-dashboard)
        - [View generated SQL supporting each visualization](#view-generated-sql-supporting-each-visualization)- [Example completed dashboard](#example-completed-dashboard)

Was this page helpful?