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

> Guide to using the fully managed ClickHouse Connector Sinkon Confluent Cloud

# Integrating Confluent Cloud with ClickHouse

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

<div class="vimeo-container">
  <Frame>
    <iframe
      src="//www.youtube.com/embed/SQAiPVbd3gg"
      frameborder="0"
      allow="autoplay;
fullscreen;
picture-in-picture"
      allowfullscreen
    />
  </Frame>
</div>

<h2 id="prerequisites">
  Prerequisites
</h2>

We assume you're familiar with:

* [ClickHouse Connector Sink](/integrations/connectors/data-ingestion/kafka/kafka-clickhouse-connect-sink)
* Confluent Cloud

<h2 id="the-official-kafka-connector-from-clickhouse-with-confluent-cloud">
  The official Kafka connector from ClickHouse with Confluent Cloud
</h2>

<h4 id="create-a-topic">
  Create a Topic
</h4>

Creating a topic on Confluent Cloud is fairly simple, and there are detailed instructions [here](https://docs.confluent.io/cloud/current/client-apps/topics/manage.html).

<h4 id="important-notes">
  Important notes
</h4>

* The Kafka topic name must be the same as the ClickHouse table name. The way to tweak this is by using a transformer (for example [`ExtractTopic`](https://docs.confluent.io/platform/current/connect/transforms/extracttopic.html)).
* More partitions doesn't always mean more performance - see our upcoming guide for more details and performance tips.

<h4 id="gather-your-connection-details">
  Gather your connection details
</h4>

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-1d264819/MHkdUZsOmvf4n9sx/images/_snippets/cloud-connect-button.png?fit=max&auto=format&n=MHkdUZsOmvf4n9sx&q=85&s=a30dced5d5b1420a04848398613ed073" 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-1d264819/MHkdUZsOmvf4n9sx/images/_snippets/connection-details-https.png?fit=max&auto=format&n=MHkdUZsOmvf4n9sx&q=85&s=df43006bb5cf5246334693ad9abe41ca" 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.

<h4 id="install-connector">
  Install Connector
</h4>

Install the fully managed ClickHouse Sink Connector on Confluent Cloud following the [official documentation](https://docs.confluent.io/cloud/current/connectors/cc-clickhouse-sink-connector/cc-clickhouse-sink.html).

<h4 id="configure-the-connector">
  Configure the Connector
</h4>

During the configuration of the ClickHouse Sink Connector, you will need to provide the following details:

* hostname of your ClickHouse server
* port of your ClickHouse server (default is 8443)
* username and password for your ClickHouse server
* database name in ClickHouse where the data will be written
* topic name in Kafka that will be used to write data to ClickHouse

The Confluent Cloud UI supports advanced configuration options to adjust poll intervals, batch sizes, and other parameters to optimize performance.

<Info>
  ***

  On Confluent Cloud, adjustment of certain settings such as [fetch settings](/integrations/connectors/data-ingestion/kafka/kafka-clickhouse-connect-sink#fetch-settings) and [poll settings](/integrations/connectors/data-ingestion/kafka/kafka-clickhouse-connect-sink#poll-settings) requires opening a support case through Confluent Cloud.
</Info>

<h4 id="known-limitations">
  Known limitations
</h4>

* See the list of [Connectors limitations in the official docs](https://docs.confluent.io/cloud/current/connectors/cc-clickhouse-sink-connector/cc-clickhouse-sink.html#limitations)
