> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-fbfa8bee.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-mintlify-fbfa8bee/Qke-GQkmVyWEhvPu/images/_snippets/cloud-connect-button.png?fit=max&auto=format&n=Qke-GQkmVyWEhvPu&q=85&s=a41d53ce6c46ccccb2855331a8dcc841" 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-mintlify-fbfa8bee/Qke-GQkmVyWEhvPu/images/_snippets/connection-details-https.png?fit=max&auto=format&n=Qke-GQkmVyWEhvPu&q=85&s=0377c34215bd524b359c0d20dd96bed3" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_01.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=7fb5a2b7fd87172386ec50a50c8ee1e2" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_02.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=a7be494629d23d432a96b749c0e22566" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_03.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=f15734c9b26e823f8c396ec2eecb3e15" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_04.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=fe2c639c0a0f2c42bcf0a9cd871e3c66" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_05.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=1a6f9fe6c73999e8422a5d88745d3c55" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_06.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=68ad3961bfe1cf9ab2bbddc49ea0e60d" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_07.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=1740d0de0d38a74ecd3f21b94ffa48b2" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_08.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=dc6be47919f4cb9adcdf1cd90c5aed25" 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-mintlify-fbfa8bee/SuhGaqX11zhHEe0p/images/integrations/data-visualization/zing_09.png?fit=max&auto=format&n=SuhGaqX11zhHEe0p&q=85&s=98bd88e53ecc37204c4eef2f76aa50e2" 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/)
