---
title: Connect Hex to Tinybird
meta:
  description: This guide covers the steps to connect Hex to Tinybird using the ClickHouse data source, enabling collaborative analytics and data science workflows.
headingMaxLevels: 2
---

# Connect Hex to Tinybird

Hex can connect to Tinybird using the ClickHouse® data source, taking advantage of Tinybird's ClickHouse® HTTP protocol compatibility. This enables you to use Tinybird data in Hex's collaborative analytics platform for notebooks, dashboards, and data applications.

{% callout type="info" %}
The ClickHouse® connection to Tinybird is read-only. You can use it to analyze and visualize data from your Tinybird data sources, but you cannot modify data through this connection.
{% /callout %}

## Prerequisites

- A Tinybird workspace with data sources
- A Tinybird Auth Token with scopes `WORKSPACE:READ_ALL` and optionally `ORG_DATASOURCES:READ`. See [how to create it](../clickhouse-interface#auth-token-requirements).

## Add Tinybird as a data source

1. **Navigate to Data browser**: In your Hex project, go to **Data browser** in the left sidebar
2. **Add a new connection**: In the **Warehouse** tab click **Add data  connection** 
3. **Select ClickHouse®**: Choose **ClickHouse®** from the list of available data connection
4. **Configure the connection** with these settings:

### Connection configuration

```bash
Name: Tinybird Production  # Choose a descriptive name
Host: {% user("clickhouseHost") %}
Port: 443
```

{% callout type="info" %}
See the list of [ClickHouse hosts](../clickhouse-interface#clickhouse-interface-hosts) to find the correct one for your region.
{% /callout %}

### Authentication settings

```bash
Username: <WORKSPACE_NAME>  # not used for auth, helps you identify the connection
Password: <TOKEN>  # Your Tinybird Auth Token
Enables SSL for ClickHouse: yes
```


5. **Save the connection**: Click **Create connection** to save the data source

{% image src="/img/hex-clickhouse-connection.png" alt="Hex ClickHouse® connection configuration" caption="Hex ClickHouse® connection configuration" /%}

## Test the connection

Once configured, test your connection by creating a simple query:

1. Add SQL query cell to your Notebook
2. Select your newly created data connection
3. Write a simple query to test the connection

If the connection is working, you should see the result.

## Learn more

- [ClickHouse Interface overview](../clickhouse-interface)
- [Tinybird Auth Token management](/classic/administration/auth-tokens)
