> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> はじめての Kafka ClickPipe を作成するための手順を順を追って説明するガイド。

# はじめての Kafka ClickPipe の作成

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>;
};

> このガイドでは、はじめての Kafka ClickPipe を作成する手順を順を追って説明します。

Kafka ClickPipes は、ClickPipes UI を使用して手動でデプロイおよび管理できるほか、[OpenAPI](/docs/ja/integrations/clickpipes/programmatic-access/openapi) や [Terraform](/docs/ja/integrations/clickpipes/programmatic-access/terraform) を使用してプログラムからデプロイおよび管理することもできます。

<Steps>
  <Step title="データソースへ移動" id="1-load-sql-console">
    左側のメニューで `Data Sources` ボタンを選択し、"Set up a ClickPipe" をクリックします。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step0.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=fb04bb07245be43cb784fa68cee62287" alt="インポートを選択" size="md" width="2606" height="790" data-path="images/integrations/data-ingestion/clickpipes/cp_step0.webp" />
  </Step>

  <Step title="データソースを選択" id="2-select-data-source">
    一覧からKafkaのデータソースを選択します。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step1.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=43a323a7dbf7daf017f2b8498336363d" alt="データソースの種類を選択" size="md" width="2600" height="1890" data-path="images/integrations/data-ingestion/clickpipes/cp_step1.webp" />
  </Step>

  <Step title="データソースを設定する" id="3-configure-data-source">
    ClickPipe の名前、説明 (任意) 、認証情報、その他の接続情報を入力してフォームを完成させます。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step2.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=cf8eb2563de1c256e798ce9ffbef6056" alt="接続情報を入力" size="md" width="1896" height="1370" data-path="images/integrations/data-ingestion/clickpipes/cp_step2.webp" />
  </Step>

  <Step title="スキーマレジストリを設定する (任意)" id="4-configure-your-schema-registry">
    Avro および Protobuf のトピックでは、有効なスキーマが必要です。スキーマレジストリの設定方法について詳しくは、[スキーマレジストリ](/docs/ja/integrations/clickpipes/kafka/schema-registries) を参照してください。
  </Step>

  <Step title="リバース プライベート エンドポイントを設定する (任意)" id="5-configure-reverse-private-endpoint">
    ClickPipes が AWS PrivateLink 経由で Kafka クラスターに接続できるよう、リバース プライベート エンドポイントを設定します。
    詳細については、[AWS PrivateLink ドキュメント](/docs/ja/integrations/clickpipes/aws-privatelink)を参照してください。
  </Step>

  <Step title="SSH トンネリングを設定する (任意)" id="6-configure-ssh-tunneling">
    Kafka ブローカーにパブリックにアクセスできない場合は、SSH トンネリングを使用できます。ClickPipes は直接接続する代わりに、踏み台サーバー (ネットワーク内にあり、パブリックにアクセス可能なサーバー) への SSH 接続を確立し、その接続を経由してプライベートネットワーク上の Kafka ブローカーにトラフィックを転送します。

    1. "SSH Tunnel" トグルを有効にします。
    2. SSH 接続の詳細を入力します。
       * **SSH Host**: 踏み台サーバーのホスト名または IP アドレス。プライベートネットワークへのゲートウェイとして機能する、パブリックにアクセス可能なサーバーです。
       * **SSH Port**: 踏み台サーバーの SSH ポート (デフォルトは `22`) 。
       * **SSH User**: 踏み台サーバーで認証に使用するユーザー名。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_ssh_tunnel.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=15add529b235ff43067e385a09d92c4c" alt="SSH トンネル設定" size="md" width="1810" height="1510" data-path="images/integrations/data-ingestion/clickpipes/cp_ssh_tunnel.webp" />

    3. 鍵ベース認証を使用するには、"Revoke and regenerate key pair" をクリックして新しい鍵ペアを生成し、生成された公開鍵を SSH サーバーの `~/.ssh/authorized_keys` にコピーします。
    4. "Verify Connection" をクリックして接続を確認します。

    <Note>
      ClickPipes が SSH トンネルを確立できるように、SSH 踏み台サーバーのファイアウォールルールで [ClickPipes IP addresses](/docs/ja/integrations/clickpipes/home#list-of-static-ips) を許可してください。
    </Note>
  </Step>

  <Step title="トピックを選択" id="7-select-your-topic">
    トピックを選択すると、UI にそのトピックのサンプルドキュメントが表示されます。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step3.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=ddd05f6d893131c4d625e5f9d5dd9923" alt="トピックを選択" size="md" width="2380" height="1956" data-path="images/integrations/data-ingestion/clickpipes/cp_step3.webp" />
  </Step>

  <Step title="宛先テーブルを設定する" id="8-configure-your-destination-table">
    次のステップでは、データを新しい ClickHouse テーブルに取り込むか、既存のテーブルを再利用するかを選択できます。画面の案内に従って、テーブル名、スキーマ、設定を変更してください。上部のサンプルテーブルで、変更内容をリアルタイムでプレビューできます。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step4a.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=e0cdb9469f6867e897cc77541af7f59b" alt="テーブル、スキーマ、設定を指定する" size="md" width="2734" height="1328" data-path="images/integrations/data-ingestion/clickpipes/cp_step4a.webp" />

    用意されているコントロールを使用して、詳細設定をカスタマイズすることもできます。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_table_settings.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=71e36a5f059d6529ee2c81559a7a3a78" alt="詳細設定を行うためのコントロール" size="md" width="1592" height="338" data-path="images/integrations/data-ingestion/clickpipes/cp_table_settings.webp" />
  </Step>

  <Step title="権限を設定する" id="9-configure-permissions">
    ClickPipes は、宛先テーブルにデータを書き込むための専用ユーザーを作成します。この内部ユーザーには、カスタムロールまたは事前定義済みロールのいずれかを選択できます。

    * `Full access`: クラスターへのフルアクセス権を付与します。宛先テーブルで materialized view や Dictionary を使用する場合に便利です。
    * `Only destination table`: 宛先テーブルに対する `INSERT` 権限のみを付与します。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_step5.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=71ea5baaa2c38fcc83b160f4856264ab" alt="権限" size="md" width="2736" height="1318" data-path="images/integrations/data-ingestion/clickpipes/cp_step5.webp" />
  </Step>

  <Step title="セットアップを完了する" id="10-complete-setup">
    "Create ClickPipe" をクリックすると、ClickPipe が作成されて起動します。作成後は、Data Sources セクションに表示されます。

    <Image img="https://mintcdn.com/private-7c7dfe99/Rm4A9_kDxZf0ApeE/images/integrations/data-ingestion/clickpipes/cp_overview.webp?fit=max&auto=format&n=Rm4A9_kDxZf0ApeE&q=85&s=1ce91f5079842cfc66a4c88919f2e061" alt="概要を表示" size="md" width="3436" height="1076" data-path="images/integrations/data-ingestion/clickpipes/cp_overview.webp" />
  </Step>
</Steps>
