{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Apache Kafka And Confluent Cloud Integration","description":"Kafkaとconfluentクラウドを使用してTreasure AI CDPにデータをリアルタイムで取り込む方法を解説。ITチームとマーケターのためのデータ統合ソリューションを紹介。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"apache-kafka-and-confluent-cloud-integration","__idx":0},"children":["Apache Kafka And Confluent Cloud Integration"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"なぜtreasure-data-cdpとkafkaが重要なのか","__idx":1},"children":["なぜTreasure Data CDPとKafkaが重要なのか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Kafkaはリアルタイムデータストリーミングプラットフォームとして機能し、IT部門が様々なソースから膨大な量のデータを効率的に取り込み、処理、管理することを可能にします。TD CDPもリアルタイム機能を提供しています。しかし、KafkaとTD CDPを組み合わせることで、マーケターは既存の中央データストリーミングプラットフォームを活用し、リアルタイムの顧客行動に基づいてカスタマージャーニーを設計・実行できます。さらに、ITチームは異なるシステム、アプリケーション、データベース間でシームレスなデータ統合と同期を確保できます。これによりデータ管理プロセスが簡素化され、ITは顧客データの単一の信頼できる情報源を維持できるようになります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"kafkaとtdの統合方法","__idx":2},"children":["KafkaとTDの統合方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-7-29_8-15-42.acd9b8da093d311ef0e8933ec8282a07738217c246e7b8c3bf4ec12c1d103a2d.baa96da0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ConfluentはApache Kafkaを実行するためにConfluent Cloud(マネージドサービス)とConfluent Platform(オンプレミスサービス)を提供しています。これらのサービスはHTTPS経由でAPIとKafkaを統合するためのHTTP Sink Connectorを正式にサポートしています。例えば、このコネクタはKafkaから下流のREST APIへデータをプルするSink設定で利用できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confluentサービスを使用していない場合でも、Apache KafkaはAivenのOSS HTTP Sink Connectorでこのアプローチをサポートできます。これらのコネクタを使用することで、Ingestion API経由でTreasure Dataにほぼリアルタイムでレコードをプッシュできます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"http-sink-connectorとingestion-apiの統合方法","__idx":3},"children":["HTTP Sink ConnectorとIngestion APIの統合方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTP Sink connectorはKafkaトピックからレコードを消費し、各レコード値をAvro、JSONなどから",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["request.body.format=json"]},"でJSONに変換してから、設定された",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["http.api.url"]},"へのリクエストボディで送信します。このURLはオプションでレコードキーやトピック名を参照できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ingestion APIは変換されたJSONレコードを取得するためのPOSTリクエストをサポートしています。コネクタは設定された",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["batch.max.size"]},"までレコードをバッチ処理してからAPIへバッチリクエストを送信します。各レコードはrequest.body.format=jsonでJSON表現に変換され、batch.separatorで区切られます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下は、Ingestion APIへPOSTリクエストを送信するための設定ファイルにおけるHTTP Sink Connectorの一般的なパラメータです。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/streaming/importing-table-records-using-the-data-ingestion-api"},"children":["Importing Table Records Using the Data Ingestion API"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["単一"]},"のJSONリクエストのためにIngestion API用にレコードを変換するには、以下のパラメータを使用します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.api.url"]},": https://us01.records.in.treasuredata.com/DB/table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["request.method"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.authorization.type"]},": none"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.headers.content.type"]},": application/vnd.treasuredata.v1.single+json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.headers.additional"]},": \"Authorization: TD1 TD WRITE API KEY\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["batch.max.size"]},": 1"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["request.body.format"]},": json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://batch.json.as"},"children":["batch.json.as"]},".array"]},": false"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["高メッセージスループット環境の場合、リクエストごとに1つのJSONレコードに複数のレコードを取り込むことをお勧めします。このシナリオでは、Ingestion APIで複数レコードの取り込みをサポートするようにパラメータを変更します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.api.url"]},": https://us01.records.in.treasuredata.com/DB/table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["request.method"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.authorization.type"]},": none"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.headers.content.type"]},": application/vnd.treasuredata.v1+json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.headers.additional"]},": \"Authorization: TD1 TD WRITE API KEY\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["batch.max.size"]},": 2 (最大500)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["request.body.format"]},": json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://batch.json.as"},"children":["batch.json.as"]},".array"]},": true"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch prefix"]},": {\"records\":"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch suffix"]},": }"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch separator"]},": ,"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["KafkaとTreasure Data CDPを統合するための段階的なガイダンスについては、以下のチュートリアルを参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"confluent-cloudとtreasure-data-cdpのチュートリアル","__idx":4},"children":["Confluent CloudとTreasure Data CDPのチュートリアル"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confluent CloudはApache Kafkaをベースにしたマネージド型Kafkaサービスです。HTTP Sink Connectorを使用すると、Kafkaトピックからデータを取得し、外部HTTPエンドポイントとしてTreasure Dataに送信できます。このチュートリアルでは、Confluent CloudでHTTP Sink Connectorを設定する手順について説明します。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の手順は、最新のConfluence Cloudユーザーインターフェースとは異なる場合があります。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":5},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confluent Cloud有料アカウントとKafka Cluster"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confluent Cloudの基本的な理解"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Kafkaクラスタ内のトピックにメッセージがあること"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["本番データがない場合は、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.confluent.io/tutorials/kafka-connect-datagen/confluent.html"},"children":["このページ"]},"でダミーデータをテストしてください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-sink-connectorの設定","__idx":6},"children":["HTTP Sink Connectorの設定"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connectors"]},"セクションに移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Connector"]},"を選択して新しいコネクタを作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["利用可能なコネクタから",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Sink"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTP SinkとHTTP Sink Connectorの2つのHTTP Sinkコネクタが見つかる場合があります。Confluent Cloudを使用する場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Sink"]},"を選択してください。"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["要件に基づいて",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credentials and Access"]},"権限を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":7},"children":["Authentication"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"コネクタのauthenticationページで必要な設定を入力します","__idx":8},"children":["コネクタのAuthenticationページで、必要な設定を入力します:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP URL"]},": 例 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://us01.records.in.treasuredata.com/support/kafka\\_sample"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["フォーマットは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://us01.records.in.treasuredata.com/DatabaseName/TableName"]},"です"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/streaming/importing-table-records-using-the-data-ingestion-api"},"children":["Importing Table Records Using the Data Ingestion API"]},"を参照してください。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL Protocol"]},": TLSv1.2"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enable Host verification"]},": false"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Endpoint Authentication Type"]},": NONE"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Master APIKEYを使用する場合、ユーザーIP ホワイトリストにConfluent clusterの静的IPアドレスを使用できます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-8-7_14-59-8.f4d331fc77c4daaab640937f11ed69f92d1b13f26473dcb8285f43257054a387.baa96da0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration","__idx":9},"children":["Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の情報は、Treasure Data Ingestion APIの単一レコード用です。さらに、Treasure Dataには複数レコード用のパラメータも含まれています。続行する前に、どのユースケースが適切かを判断してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"単一レコード用のパラメータ","__idx":10},"children":["単一レコード用のパラメータ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input Kafka record value format"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["現在のトピック設定に基づいて適切な形式を選択してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Request Method"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Headers: Authorization:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TD1 XXXX/xxxxx|Content-Type:application/vnd.treasuredata.v1.single+json"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD1の後にTreasure API Keyを記述し、その後にスペースとTreasure API Key |Content-Type:application/vnd.treasuredata.v1.single+jsonを追加してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Headers Separator"]},": ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["|"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behavior for null valued records"]},": ignore"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behavior on errors"]},": fail",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["要件に応じて設定してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Report errors as"]},": error_string"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request Body Format"]},": json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch json as array"]},": false"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch max size"]},": 1"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"複数レコード用のパラメータ","__idx":11},"children":["複数レコード用のパラメータ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input Kafka record value format"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["現在のトピック設定に基づいて適切な形式を選択してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Request Method"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Headers: Authorization:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TD1 XXXX/xxxxx|Content-Type:application/vnd.treasuredata.v1+json"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD1の後にTreasure API Keyを記述し、その後にスペースとTreasure API Key |Content-Type:application/vnd.treasuredata.v1+jsonを追加してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Headers Separator"]},": ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["|"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behavior for null valued records"]},": ignore"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Behavior on errors"]},": fail",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["要件に応じて設定してください"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Report errors as"]},": error_string"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request Body Format"]},": json"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch json as array"]},": true"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch max size"]},": 500"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch prefix"]},": {\"records\":"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch suffix"]},": }"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-8-7_15-15-15.d04cb24b67385114d0a42635e85e385910b1aab0c01a356ee8fe7b5cbafdcba3.baa96da0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"データの検証","__idx":12},"children":["データの検証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定が完了すると、コネクタが自動的に起動します。トピックページで、success_nameで始まるレコードの数を確認してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-8-7_15-22-17.3bb1f180cb0f702370135ccbd5677c06b2cedf2cf8c0b0d9ea2d0080aa024b0a.baa96da0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-dataでのデータ可用性の確認","__idx":13},"children":["Treasure Dataでのデータ可用性の確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-8-7_15-25-1.0977c0dec67aedb46750cf5807323b75dd2670dd23726466b6cb40a4cf49d2e1.baa96da0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"confluent-platformとtreasure-data-cdpのチュートリアル","__idx":14},"children":["Confluent PlatformとTreasure Data CDPのチュートリアル"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apache Kafkaはオープンソースの分散イベントストリーミングプラットフォームであり、Confluent PlatformはKafkaの商用ディストリビューションで、企業向けにデプロイメントと管理を簡素化する追加機能とツールを提供しています。自社の環境に適したプラットフォームを使用してください。両方のプラットフォームはHTTP Sink Connectorをサポートしており、Kafkaトピックからデータを取得し、外部のHTTPエンドポイントとしてTreasure Dataに送信することができます。このチュートリアルでは、Confluent PlatformおよびApache KafkaでHTTP Sink Connectorをセットアップする手順について説明します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件-1","__idx":15},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confluent Platformの有料ライセンスまたはApache Kafkaクラスタ"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confluent PlatformではConfluentがサポートするHTTP Sink Connectorが必要です（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://confluent.cloud/environments/env-oqdr7y/clusters/lkc-gkjmv1/connectors/configure/kafka-connect-http"},"children":["リンク"]},"）"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apache KafkaではKafkaコミュニティが保守するAivenのHTTP Sink Connectorが必要です（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Aiven-Open/http-connector-for-apache-kafka"},"children":["リンク"]},"）"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataはこれらのコネクタに対する商用サポートを提供していません。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apache Kafkaの基本的な理解"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"kafka-connectフレームワークのインストール","__idx":16},"children":["Kafka Connectフレームワークのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Kafka Connectがインストールされていることを確認してください。このフレームワークは外部システムをKafkaに接続します。Confluent Platformを使用している場合、Kafka Connectはプリインストールされています。それ以外の場合は、別途ダウンロードしてインストールする必要があります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apache Kafka Connect ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://kafka.apache.org/documentation/#connect"},"children":["https://kafka.apache.org/documentation/#connect"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confluent Kafka Connect: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.confluent.io/platform/current/connect/index.html"},"children":["https://docs.confluent.io/platform/current/connect/index.html"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-sink-connectorプラグインのインストール","__idx":17},"children":["HTTP Sink Connectorプラグインのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTPエンドポイントにデータを送信するには、HTTP Sink Connectorプラグインが必要です。お使いのKafka Connectバージョンと互換性のある特定のプラグインバージョンについては、Confluent Hubまたは他のソースを確認してください。その後、ダウンロードしたHTTP Sink Connectorプラグイン（JARファイル）を適切なKafka Connectプラグインディレクトリに配置します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confluent Platform用にConfluent Hub経由でダウンロード: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.confluent.io/kafka-connectors/http/current/overview.html"},"children":["https://docs.confluent.io/kafka-connectors/http/current/overview.html"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apache Kafka用にGitHub経由でダウンロード: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Aiven-Open/http-connector-for-apache-kafka"},"children":["https://github.com/Aiven-Open/http-connector-for-apache-kafka"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-sink-connectorの設定-1","__idx":18},"children":["HTTP Sink Connectorの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTP Sink Connectorの設定を定義するための設定ファイル（JSONまたはproperties形式）を作成します。この設定ファイルには通常、以下のプロパティが含まれます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["name"]},": コネクタの一意の名前"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector.class"]},": HTTP Sink Connectorのクラス名（例：io.confluent.connect.http.HttpSinkConnector）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tasks.max"]},": コネクタに対して作成されるタスクの数（通常はKafkaパーティション数と同じ）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["topics"]},": データが消費され、HTTPエンドポイントに送信されるKafkaトピック"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.api.url"]},": データが送信されるHTTPエンドポイントのURL"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.api.method"]},": リクエストを行う際に使用するHTTPメソッド（例：POST、PUTなど）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.headers"]},": リクエストに含める追加のHTTPヘッダー"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["http.timeout.ms"]},": HTTPリクエストのタイムアウト"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["その他、使用ケースや要件に応じたオプションプロパティ。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これらの設定プロパティは、使用するKafka ConnectとHTTP Sink Connectorプラグインの特定のバージョンによって異なる場合があります。最新の情報と手順については、常に公式ドキュメントとプラグインのドキュメントを参照してください。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confluent Platform: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.confluent.io/kafka-connectors/http/current/connector_config.html"},"children":["https://docs.confluent.io/kafka-connectors/http/current/connector_config.html"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apache Kafka ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Aiven-Open/http-connector-for-apache-kafka/blob/main/docs/sink-connector-config-options.rst"},"children":["https://github.com/Aiven-Open/http-connector-for-apache-kafka/blob/main/docs/sink-connector-config-options.rst"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"confluent-platform","__idx":19},"children":["Confluent Platform"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTP Sink Connectorの設定を定義するための設定JSONファイルを作成します。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.confluent.io/kafka-connectors/http/current/connector_config.html#http-sink-connector-configuration-properties"},"children":["https://docs.confluent.io/kafka-connectors/http/current/connector_config.html#http-sink-connector-configuration-properties"]},"のコネクタガイドラインに従ってください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"単一行インジェストのjson例","__idx":20},"children":["単一行インジェストのJSON例"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"name\": \"tdsinglejsonHttpSink\",\n    \"config\":\n    {\n      \"topics\": \"rest-messages5\",\n      \"connector.class\": \"io.confluent.connect.http.HttpSinkConnector\",\n      \"http.api.url\": \"https://us01.records.in.treasuredata.com/database_name/table_name\",\n      \"request.method\": \"POST\",\n      \"headers\": \"Authorization:TD1 XXXXX/xxxxx|Content-Type:application/vnd.treasuredata.v1.single+json\",\n      \"header.separator\": \"|\",\n      \"report.errors.as\": \"error_string\",\n      \"request.body.format\": \"json\",\n      \"key.converter\": \"org.apache.kafka.connect.json.JsonConverter\",\n      \"value.converter\": \"org.apache.kafka.connect.json.JsonConverter\",\n      \"key.converter.schemas.enable\": \"false\",\n      \"value.converter.schemas.enable\": \"false\",\n      \"batch.prefix\":\"\",\n      \"batch.suffix\":\"\",\n      \"batch.max.size\": \"1\",\n      \"batch.json.as.array\": \"false\",\n      \"tasks.max\": \"1\",\n      \"confluent.topic.bootstrap.servers\": \"localhost:9092\",\n      \"confluent.topic.replication.factor\": \"1\",\n      \"reporter.bootstrap.servers\": \"localhost:9092\",\n      \"reporter.result.topic.name\": \"success-responses\",\n      \"reporter.result.topic.replication.factor\": \"1\",\n      \"reporter.error.topic.name\": \"error-responses\",\n      \"reporter.error.topic.replication.factor\": \"1\",\n      \"ssl.enabled\":\"true\",\n      \"https.ssl.protocol\":\"TLSv1.2\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"複数行取り込みjsonの例","__idx":21},"children":["複数行取り込みJSONの例"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"name\": \"tdBatchHttpSink\",\n    \"config\":\n    {\n      \"topics\": \"rest-messages5\",\n      \"connector.class\": \"io.confluent.connect.http.HttpSinkConnector\",\n      \"http.api.url\": \"https://us01.records.in.treasuredata.com/DB/TBL\",\n      \"request.method\": \"POST\",\n      \"headers\": \"Authorization:TD1 XXXX/xxxx|Content-Type:application/vnd.treasuredata.v1+json\",\n      \"header.separator\": \"|\",\n      \"report.errors.as\": \"error_string\",\n      \"request.body.format\": \"string\",\n      \"key.converter\": \"org.apache.kafka.connect.storage.StringConverter\",\n      \"value.converter\": \"org.apache.kafka.connect.storage.StringConverter\",\n      \"key.converter.schemas.enable\": \"false\",\n      \"value.converter.schemas.enable\": \"false\",\n      \"batch.prefix\":\"{\\\"records\\\":\",\n      \"batch.suffix\":\"}\",\n      \"batch.max.size\": \"500\",\n      \"batch.json.as.array\": \"true\",\n      \"tasks.max\": \"1\",\n      \"confluent.topic.bootstrap.servers\": \"localhost:9092\",\n      \"confluent.topic.replication.factor\": \"1\",\n      \"reporter.bootstrap.servers\": \"localhost:9092\",\n      \"reporter.result.topic.name\": \"success-responses\",\n      \"reporter.result.topic.replication.factor\": \"1\",\n      \"reporter.error.topic.name\": \"error-responses\",\n      \"reporter.error.topic.replication.factor\": \"1\",\n      \"ssl.enabled\":\"true\",\n      \"https.ssl.protocol\":\"TLSv1.2\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"apache-kafkaとtreasure-data-cdpのチュートリアル","__idx":22},"children":["Apache KafkaとTreasure Data CDPのチュートリアル"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTP Sink Connectorの設定を定義するための設定JSONファイルを作成します。コネクタのガイドラインについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Aiven-Open/http-connector-for-apache-kafka/blob/main/docs/sink-connector-config-options.rst"},"children":["https://github.com/Aiven-Open/http-connector-for-apache-kafka/blob/main/docs/sink-connector-config-options.rst"]},"を参照してください。Confluent HTTP Sink Connectorがサポートしていたものと同様のパラメータをサポートしています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"name\": \"tdCommunityHttpSink\",\n    \"config\":\n    {\n      \"topics.regex\": \"td-rest-messages1\",\n      \"connector.class\": \"io.aiven.kafka.connect.http.HttpSinkConnector\",\n      \"http.url\": \"https://us01.records.in.treasuredata.com/database_name/table_name\",\n      \"http.authorization.type\": \"none\",\n      \"http.headers.content.type\": \"application/vnd.treasuredata.v1.single+json\",\n      \"http.headers.additional\": \"Authorization: TD1 XXXX/xxxx\",\n      \"key.converter\": \"org.apache.kafka.connect.json.JsonConverter\",\n      \"value.converter\": \"org.apache.kafka.connect.json.JsonConverter\",\n      \"key.converter.schemas.enable\": \"false\",\n      \"value.converter.schemas.enable\": \"false\",\n      \"batching.enabled\": \"false\",\n      \"batch.max.size\": \"1\",\n      \"batch.prefix\":\"{\\\"records\\\":[\",\n      \"batch.suffix\":\"]}\",\n      \"batch.separator\": \"n\",\n      \"tasks.max\": \"1\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-sink-connectorの起動","__idx":23},"children":["HTTP Sink Connectorの起動"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定をKafka Connectに送信してHTTP Sink Connectorを起動します。confluentコマンドラインツールを使用するか、Kafka Connect REST APIへREST API呼び出しを行うことができます。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.confluent.io/courses/kafka-connect/rest-api/"},"children":["KAFKA CONNECT 101"]},"を参照してください。"]}]},"headings":[{"value":"Apache Kafka And Confluent Cloud Integration","id":"apache-kafka-and-confluent-cloud-integration","depth":1},{"value":"なぜTreasure Data CDPとKafkaが重要なのか?","id":"なぜtreasure-data-cdpとkafkaが重要なのか","depth":2},{"value":"KafkaとTDの統合方法","id":"kafkaとtdの統合方法","depth":1},{"value":"HTTP Sink ConnectorとIngestion APIの統合方法","id":"http-sink-connectorとingestion-apiの統合方法","depth":1},{"value":"Confluent CloudとTreasure Data CDPのチュートリアル","id":"confluent-cloudとtreasure-data-cdpのチュートリアル","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"HTTP Sink Connectorの設定","id":"http-sink-connectorの設定","depth":2},{"value":"Authentication","id":"authentication","depth":2},{"value":"コネクタのAuthenticationページで、必要な設定を入力します:","id":"コネクタのauthenticationページで必要な設定を入力します","depth":3},{"value":"Configuration","id":"configuration","depth":2},{"value":"単一レコード用のパラメータ","id":"単一レコード用のパラメータ","depth":3},{"value":"複数レコード用のパラメータ","id":"複数レコード用のパラメータ","depth":3},{"value":"データの検証","id":"データの検証","depth":2},{"value":"Treasure Dataでのデータ可用性の確認","id":"treasure-dataでのデータ可用性の確認","depth":2},{"value":"Confluent PlatformとTreasure Data CDPのチュートリアル","id":"confluent-platformとtreasure-data-cdpのチュートリアル","depth":1},{"value":"前提条件","id":"前提条件-1","depth":2},{"value":"Kafka Connectフレームワークのインストール","id":"kafka-connectフレームワークのインストール","depth":2},{"value":"HTTP Sink Connectorプラグインのインストール","id":"http-sink-connectorプラグインのインストール","depth":2},{"value":"HTTP Sink Connectorの設定","id":"http-sink-connectorの設定-1","depth":2},{"value":"Confluent Platform","id":"confluent-platform","depth":3},{"value":"単一行インジェストのJSON例","id":"単一行インジェストのjson例","depth":4},{"value":"複数行取り込みJSONの例","id":"複数行取り込みjsonの例","depth":4},{"value":"Apache KafkaとTreasure Data CDPのチュートリアル","id":"apache-kafkaとtreasure-data-cdpのチュートリアル","depth":1},{"value":"HTTP Sink Connectorの起動","id":"http-sink-connectorの起動","depth":2}],"frontmatter":{"seo":{"title":"Apache Kafka And Confluent Cloud Integration","description":"Kafkaとconfluentクラウドを使用してTreasure AI CDPにデータをリアルタイムで取り込む方法を解説。ITチームとマーケターのためのデータ統合ソリューションを紹介。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/apache-kafka-and-confluent-cloud-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}