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

> Hashboard is a robust analytics platform that can be easily integrated with ClickHouse for real-time data analysis.

# Connecting ClickHouse to Hashboard

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 = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

[Hashboard](https://hashboard.com) is an interactive data exploration tool that enables anyone in your organization to track metrics and discover actionable insights. Hashboard issues live SQL queries to your ClickHouse database and is particularly useful for self-serve, ad hoc data exploration use cases.

<Image size="md" img="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/jCcMIFRXeNsMw8EN/images/integrations/data-visualization/hashboard_01.webp?fit=max&auto=format&n=jCcMIFRXeNsMw8EN&q=85&s=4c0b36bf949315cd8835f597685cff6b" alt="Hashboard data explorer interface showing interactive query builder and visualization" border width="1653" height="801" data-path="images/integrations/data-visualization/hashboard_01.webp" />

<br />

This guide will walk you through the steps to connect Hashboard with your ClickHouse instance. This information is also available on Hashboard's [ClickHouse integration documentation](https://hashboard.com/docs/database-connections/clickhouse).

<h2 id="pre-requisites">
  Pre-requisites
</h2>

* A ClickHouse database either hosted on your own infrastructure or on [ClickHouse Cloud](https://clickhouse.com/).
* A [Hashboard account](https://hashboard.com/getAccess) and project.

<h2 id="steps-to-connect-hashboard-to-clickhouse">
  Steps to connect Hashboard to ClickHouse
</h2>

<Steps>
  <Step title="Gather your connection details" id="1-gather-your-connection-details">
    To connect to ClickHouse with native TCP you need this information:

    | Parameters                | Description                                                                                                   |
    | ------------------------- | ------------------------------------------------------------------------------------------------------------- |
    | `HOST` and `PORT`         | Typically, the port is 9440 when using TLS, or 9000 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 the service that you will connect to and click **Connect**:

    <div className="ch-image-md">
      <Frame>
        <img src="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/cTIaEq6k6KYDgBI1/images/_snippets/cloud-connect-button.webp?fit=max&auto=format&n=cTIaEq6k6KYDgBI1&q=85&s=dd441fc2272e292760011d48e81d43d4" alt="ClickHouse Cloud service connect button" width="998" height="932" data-path="images/_snippets/cloud-connect-button.webp" />
      </Frame>
    </div>

    Choose **Native**, and the details are available in an example `clickhouse-client` command.

    <div className="ch-image-md">
      <Frame>
        <img src="https://mintcdn.com/private-7c7dfe99-postgresql-tls-support/cTIaEq6k6KYDgBI1/images/_snippets/connection-details-native.webp?fit=max&auto=format&n=cTIaEq6k6KYDgBI1&q=85&s=2381d6bd68786f5d4d558cb9f79d1aa4" alt="ClickHouse Cloud Native TCP connection details" width="1290" height="1176" data-path="images/_snippets/connection-details-native.webp" />
      </Frame>
    </div>

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

  <Step title="Add a new database connection in Hashboard" id="2-add-a-new-database-connection-in-hashboard">
    1. Navigate to your [Hashboard project](https://hashboard.com/app).
    2. Open the Settings page by clicking the gear icon in the side navigation bar.
    3. Click `+ New Database Connection`.
    4. In the modal, select "ClickHouse."
    5. Fill in the **Connection Name**, **Host**, **Port**, **Username**, **Password**, and **Database** fields with the information gathered earlier.
    6. Click "Test" to validate that the connection is configured successfully.
    7. Click "Add"

    Your ClickHouse database is now be connected to Hashboard and you can proceed by building [Data Models](https://hashboard.com/docs/data-modeling/add-data-model), [Explorations](https://hashboard.com/docs/visualizing-data/explorations), [Metrics](https://hashboard.com/docs/metrics), and [Dashboards](https://hashboard.com/docs/dashboards). See the corresponding Hashboard documentation for more detail on these features.
  </Step>
</Steps>

<h2 id="learn-more">
  Learn more
</h2>

For more advanced features and troubleshooting, visit [Hashboard's documentation](https://hashboard.com/docs).
