> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Zing Data is simple social business intelligence for ClickHouse, made for iOS, Android and the web.

# Connect Zing Data to ClickHouse

export const CommunityMaintainedBadge = () => {
  return <div className="CommunityMaintainedBadge">
            <div className="CommunityMaintainedIcon">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256">
                <path d="M244.8,150.4a8,8,0,0,1-11.2-1.6A51.6,51.6,0,0,0,192,128a8,8,0,0,1-7.37-4.89,8,8,0,0,1,0-6.22A8,8,0,0,1,192,112a24,24,0,1,0-23.24-30,8,8,0,1,1-15.5-4A40,40,0,1,1,219,117.51a67.94,67.94,0,0,1,27.43,21.68A8,8,0,0,1,244.8,150.4ZM190.92,212a8,8,0,1,1-13.84,8,57,57,0,0,0-98.16,0,8,8,0,1,1-13.84-8,72.06,72.06,0,0,1,33.74-29.92,48,48,0,1,1,58.36,0A72.06,72.06,0,0,1,190.92,212ZM128,176a32,32,0,1,0-32-32A32,32,0,0,0,128,176ZM72,120a8,8,0,0,0-8-8A24,24,0,1,1,87.24,82a8,8,0,1,0,15.5-4A40,40,0,1,0,37,117.51,67.94,67.94,0,0,0,9.6,139.19a8,8,0,1,0,12.8,9.61A51.6,51.6,0,0,1,64,128,8,8,0,0,0,72,120Z"></path>
            </svg>
        </div>
            Community Maintained
        </div>;
};

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

<a href="https://www.zingdata.com/" target="_blank">Zing Data</a> is a data exploration and visualization platform. Zing Data connects to ClickHouse using the JS driver provided by ClickHouse.

<h2 id="how-to-connect">
  How to connect
</h2>

1. Gather your connection details.

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**:

<Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/1oh4rjwfuHRS2yL2/images/_snippets/cloud-connect-button.png?fit=max&auto=format&n=1oh4rjwfuHRS2yL2&q=85&s=81c1524ac8ac2dac27e1558f13fcfd29" size="md" alt="ClickHouse Cloud service connect button" border width="998" height="932" data-path="images/_snippets/cloud-connect-button.png" />

Choose **HTTPS**. Connection details are displayed in an example `curl` command.

<Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/1oh4rjwfuHRS2yL2/images/_snippets/connection-details-https.png?fit=max&auto=format&n=1oh4rjwfuHRS2yL2&q=85&s=335e19954512afe36d735a736cd32be7" size="md" alt="ClickHouse Cloud HTTPS connection details" border width="1320" height="1184" data-path="images/_snippets/connection-details-https.png" />

If you're using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

2. Download or visit Zing Data

   * To use Clickhouse with Zing Data on mobile, download the Zing data app on [Google Play Store](https://play.google.com/store/apps/details?id=com.getzingdata.android) or the [Apple App Store](https://apps.apple.com/us/app/zing-data-collaborative-bi/id1563294091).

   * To use Clickhouse with Zing Data on the web, visit the [Zing web console](https://console.getzingdata.com/) and create an account.

3. Add a datasource

   * To interact with your ClickHouse data with Zing Data, you need to define a ***datasource***. On the mobile app menu in Zing Data, select **Sources**, then click on **Add a Datasource**.

   * To add a datasource on web, click on **Data Sources** on the top menu, click on **New Datasource** and select **Clickhouse** from the dropdown menu

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_01.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=4e2ef0e1d302f75b6bee671c5f0e37af" alt="Zing Data interface showing New Datasource button and ClickHouse option in the dropdown menu" border width="2420" height="278" data-path="images/integrations/data-visualization/zing_01.png" />

   <br />

4. Fill out the connection details and click on **Check Connection**.

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_02.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=d52e074295806f6d1121153d85e290dd" alt="ClickHouse connection configuration form in Zing Data with fields for server, port, database, username and password" border width="2242" height="2210" data-path="images/integrations/data-visualization/zing_02.png" />

   <br />

5. If the connection is successful, Zing will proceed you to table selection. Select the required tables and click on **Save**. If Zing can't connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here.</a>

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_03.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=34f3aee9e5229854fb299fcbd8417b63" alt="Zing Data table selection interface showing available ClickHouse tables with checkboxes" border width="2248" height="1232" data-path="images/integrations/data-visualization/zing_03.png" />

   <br />

6. Once the Clickhouse datasource is added, it will be available to everyone in your Zing organization, under the **Data Sources** / **Sources** tab.

<h2 id="creating-charts-and-dashboards-in-zing-data">
  Creating charts and dashboards in Zing Data
</h2>

1. After your Clickhouse datasource is added, click on **Zing App** on the web, or click on the datasource on mobile to start creating charts.

2. Click on a table under the table's list to create a chart.

   <Image size="sm" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_04.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=c8182c56b3c79fea1e98b3d8cc2a60fb" alt="Zing Data interface showing the table list with available ClickHouse tables" border width="836" height="422" data-path="images/integrations/data-visualization/zing_04.png" />

   <br />

3. Use the visual query builder to pick the desired fields, aggregations, etc., and click on **Run Question**.

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_05.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=eae1337dbb5fea4b45772fb236f82c18" alt="Zing Data visual query builder interface with field selection and aggregation options" border width="2624" height="1734" data-path="images/integrations/data-visualization/zing_05.png" />

   <br />

4. If you familiar with SQL, you can also write custom SQL to run queries and create a chart.

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_06.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=4bab0bd4e2c048c1e06e462ea2c4b05f" alt="SQL editor mode in Zing Data showing SQL query writing interface" border width="2636" height="140" data-path="images/integrations/data-visualization/zing_06.png" />

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_07.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=532d2524ab0eebf538721685ee64e201" alt="SQL query results in Zing Data with data displayed in tabular format" border width="2632" height="1030" data-path="images/integrations/data-visualization/zing_07.png" />

5. An example chart would look as follows. The question can be saved using the three-dot menu. You can comment on the chart, tag your team members, create real-time alerts, change the chart type, etc.

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_08.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=eb9f592aecc23708cff3113f346bf1ce" alt="Example chart visualization in Zing Data showing data from ClickHouse with options menu" border width="2634" height="1252" data-path="images/integrations/data-visualization/zing_08.png" />

   <br />

6. Dashboards can be created using the "+" icon under **Dashboards** on the Home screen. Existing questions can be dragged in, to be displayed on the dashboard.

   <Image size="md" img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/VxPq6MnE7EhcBNB1/images/integrations/data-visualization/zing_09.png?fit=max&auto=format&n=VxPq6MnE7EhcBNB1&q=85&s=0d126a32b7fb3745ebbe6ff569d641ff" alt="Zing Data dashboard view showing multiple visualizations arranged in a dashboard layout" border width="2606" height="764" data-path="images/integrations/data-visualization/zing_09.png" />

   <br />

<h2 id="related-content">
  Related content
</h2>

* [Documentation](https://docs.getzingdata.com/docs/)
* [Quick Start](https://getzingdata.com/quickstart/)
* Guide to [Create Dashboards](https://getzingdata.com/blog/new-feature-create-multi-question-dashboards/)
