---
title: Connect DataGrip to Tinybird
meta:
  description: This guide covers the steps to connect DataGrip to Tinybird using the ClickHouse database driver, enabling advanced SQL development and database management.
headingMaxLevels: 2
---

# Connect DataGrip to Tinybird

DataGrip can connect to Tinybird using the ClickHouse® database driver, taking advantage of Tinybird's ClickHouse® HTTP protocol compatibility. This enables you to use DataGrip's advanced SQL development features, including intelligent code completion, on-the-fly error detection, and powerful refactoring capabilities with your Tinybird data.

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

## Prerequisites

- DataGrip IDE (part of JetBrains IDEs)
- 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).

## Create a new data source

1. Open DataGrip and click the **+** icon in the Database Explorer
2. Select **Data Source** > **ClickHouse**
3. If prompted, install or update the ClickHouse driver

### General settings

Configure the main connection parameters in the **General** tab:

```bash
Host: {% user("clickhouseHost") %}
Port: 443  # For HTTPS connections
User: <WORKSPACE_NAME>  # Not used for authentication, for identification only
Password: <TOKEN>  # Your Tinybird Auth Token
```

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

{% image src="/img/data-grip-1.png" alt="DataGrip configuration" caption="DataGrip configuration" /%}


### SSH/SSL settings

1. Click the **SSH/SSL** tab
2. Check **Use SSL**
3. Leave all other SSL settings at their defaults (no custom certificates required)

{% image src="/img/data-grip-2.png" alt="DataGrip configuration" caption="DataGrip configuration" /%}



### Test and save

1. **Test Connection**: Click **Test Connection** to verify the setup
2. **Apply**: Click **Apply** and then **OK** to save the connection

## Explore your data

Once connected, you can:

1. **Browse databases**: Expand your data source to see available databases:
   - Your workspace database (`<WORKSPACE_NAME>`)
   - Service data sources (`tinybird`, `organization`)
   - System tables (`system`)

2. **View tables and schemas**: Navigate through your Data Sources and examine their structure

3. **Execute queries**: Right-click on your data source and select **New** > **Query Console** to start writing SQL

## Test the connection

Create a simple query to verify your connection:

1. Open a new Query Console for your Tinybird data source
2. Write a simple query to test the connection:

```sql
SELECT *
FROM system.tables
WHERE database = '<WORKSPACE_NAME>'
LIMIT 10
```

Replace `<WORKSPACE_NAME>` with your actual workspace name. If the connection is working, you should see a list of your Data Sources.

## Learn more

- [ClickHouse Interface overview](../clickhouse-interface)
- [Tinybird Auth Token management](/classic/administration/auth-tokens)
- [DataGrip documentation](https://www.jetbrains.com/help/datagrip/)
