{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Web Server and HTTP Put Endpoint Export Integration","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"web-server-and-http-put-endpoint-export-integration","__idx":0},"children":["Web Server and HTTP Put Endpoint Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure DataからWebサーバーまたはPUTリクエストを受け入れるHTTP APIにジョブ結果を直接書き込むことができます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"を含むTreasure Dataの基本的な知識。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["PUTリクエストとしてクエリ結果を受け入れるように設定されたWebサーバー。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-data-integration-の静的-ip-アドレス","__idx":2},"children":["Treasure Data Integration の静的 IP アドレス"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["セキュリティポリシーで IP ホワイトリストが必要な場合は、接続を成功させるために Treasure Data の IP アドレスを許可リストに追加する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リージョンごとに整理された静的 IP アドレスの完全なリストは、次のリンクにあります:"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/ip-addresses-integrations-result-workers"},"children":["IP Addresses for Integrations"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用して接続を作成する","__idx":3},"children":["Treasure コンソールを使用して接続を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい接続を作成する","__idx":4},"children":["新しい接続を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TD Catalogに移動し、統合を検索して選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"webサーバー接続の詳細を取得する","__idx":5},"children":["Webサーバー接続の詳細を取得する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要に応じて、HTTPエンドポイントにアクセスするための認証情報を取得します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"クエリを記述する","__idx":6},"children":["クエリを記述する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールクエリエディタページに移動し、クエリをコンパイルします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"結果エクスポートの詳細を指定する","__idx":7},"children":["結果エクスポートの詳細を指定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クエリの設定が完了したら、クエリエディタの右上にある",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191107-200348.5827697cbd1a5c4160dab7ef09d1e1680b6e89e109d912cd2dc36c5dc3640399.f854537a.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Choose Integrationダイアログが開きます。検索ボックスに接続名を入力してフィルタし、接続を選択します。Create Integrationペインで、ドロップダウンメニューからHTTP PUTを選択します。該当する場合は、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Host、Port、ユーザー名とパスワード"]},"を含むすべての情報を編集します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191107-200437.4506a6e4c8f3917970e6779c816bc6cdec89aef7c4f88e10eb5c66c9d65b5e44.f854537a.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ポート番号が指定されていない場合、デフォルト値はHTTPの場合は80、HTTPSの場合は443です。ユーザー名とパスワードが指定されていない場合、認証は使用されません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save and Continue"]},"を選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"転送設定を設定する","__idx":8},"children":["転送設定を設定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続を設定した後、転送パラメータを設定します。エンドポイントのパスとパラメータ情報を入力します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191107-200517.7c6488d204aab972ee27a0349a4e91ed2d58f4f7f4cf07863987ba66e448e224.f854537a.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ドメインフィールド設定","__idx":9},"children":["ドメインフィールド設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["hostフィールドにはドメイン情報のみを入力します。hostフィールドにURLパスを含めないでください。次の例は、エンドポイントURLとそれぞれの値を示しています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイント例 #1:"]}," http://www.yourdomain.com:80/api/custom_resources/resources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Host"]},": www.yourdomain.com"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Port"]},": 80"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path & Params:"]}," /api/custom_resources/resources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイント例 #2:"]}," http://testapis.co/rest/api"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Host"]},":testapis.co"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path & Params:"]}," /rest/api"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイント例 #3:"]}," http://www.randomapi.com/rest/api?parameter1"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Host"]},":www.randomapi.com"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path & Params:"]}," /rest/api?parameter1"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"クエリを実行する","__idx":10},"children":["クエリを実行する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["名前を付けてクエリを保存して実行するか、クエリを実行するだけです。クエリが正常に完了すると、クエリ結果はPUTリクエストを使用して指定されたエンドポイントに自動的にエクスポートされます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"audience-studio-で-segment-をアクティベートする","__idx":11},"children":["Audience Studio で Segment をアクティベートする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audience Studio で activation を作成することで、segment データをターゲットプラットフォームに送信することもできます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience Studio"]}," に移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["parent segment を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ターゲット segment を開き、右クリックして、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Activation"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," パネルで、Activation 名を入力し、前述の Configuration Parameters のセクションに従って activation を設定します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output Mapping"]}," パネルで activation 出力をカスタマイズします。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ouput.b2c7f1d909c4f98ed10f5300df858a4b19f71a3b0834df952f5fb24018a5ea78.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attribute Columns",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export All Columns"]}," を選択すると、変更を加えずにすべての列をエクスポートできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," を選択して、エクスポート用の特定の列を追加します。Output Column Name には、Source 列名と同じ名前があらかじめ入力されます。Output Column Name を更新できます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," を選択し続けて、activation 出力用の新しい列を追加します。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String Builder",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add string"]}," を選択して、エクスポート用の文字列を作成します。次の値から選択します:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String: 任意の値を選択します。テキストを使用してカスタム値を作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timestamp: エクスポートの日時。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Id: segment ID 番号。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Name: segment 名。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audience Id: parent segment 番号。"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," を設定します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/snippet-output-connector-on-audience-studio-2024-08-28.a99525173709da1eb537f839019fa7876ffae95045154c8f2941b030022f792c.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["スケジュールを定義する値を選択し、オプションでメール通知を含めます。"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":7},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["batch journey の activation を作成する必要がある場合は、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/journey-orchestration/batch/creating-a-batch-journey-activation"},"children":["Creating a Batch Journey Activation"]}," を参照してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cliからの使用","__idx":12},"children":["CLIからの使用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HTTPエンドポイントへの結果エクスポートにCLIを使用することもできます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"オンデマンドジョブの場合","__idx":13},"children":["オンデマンドジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オンデマンドジョブの場合は、td queryコマンドに--resultオプションを追加するだけです。ジョブが完了すると、結果はPUTリクエストを介して指定されたURLに送信されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td query\n  --result 'web://domain.com/path'\n  -w -d testdb\n  \"SELECT code, COUNT(1) AS cnt FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["または、method=postクエリパラメータでPOSTリクエストを実行します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td query\n  --result 'web://domain.com/path?method=post'\n  -w -d testdb\n  \"SELECT code, COUNT(1) AS cnt FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["別のURL例を次に示します。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://en.wikipedia.org/wiki/Basic_access_authentication"},"children":["Basic HTTP認証"]},"とポート指定がサポートされています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"web://user:pass@domain.com:8080/path1/path2\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["プロトコルヘッダーとしてwebの代わりにwebsを使用すると、HTTPS経由の転送もサポートされます。例："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"webs://securedomain.com/path1/path2\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ポート番号が指定されていない場合、デフォルト値はHTTPの場合は80、HTTPSの場合は443です。ユーザー名とパスワードが指定されていない場合、認証は使用されません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストボディは、次のフィールドを持つJSONです：column_names、column_types、およびdata（クエリの結果）。上記のクエリが出力する可能性のある例を以下に示します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"column_names\": [ \"code\", \"cnt\" ],\n  \"column_types\": [ \"string\", \"long\" ],\n  \"data\": [ [ \"200\", 4981 ], [ \"500\", 2 ], [ \"404\", 17 ] ] }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最大行数は100,000です。結果が100,000行を超える場合、残りの行は破棄されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールされたジョブの場合","__idx":14},"children":["スケジュールされたジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールされたジョブの場合は、ジョブをスケジュールするときに--resultオプションを追加するだけです。ジョブが実行されるたびに、オンデマンドジョブと同じ方法でPUTリクエストを介して結果が送信されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td result:create myweb web://domain.com/\n$ td sched:create hourly_count_example \"0 * * * *\"\n  -d testdb\n  --result myweb:path\n  \"SELECT code, COUNT(1) AS cnt FROM www_access GROUP BY code\"\n"},"children":[]}]},"headings":[{"value":"Web Server and HTTP Put Endpoint Export Integration","id":"web-server-and-http-put-endpoint-export-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"Treasure Data Integration の静的 IP アドレス","id":"treasure-data-integration-の静的-ip-アドレス","depth":2},{"value":"Treasure コンソールを使用して接続を作成する","id":"treasure-コンソールを使用して接続を作成する","depth":2},{"value":"新しい接続を作成する","id":"新しい接続を作成する","depth":3},{"value":"Webサーバー接続の詳細を取得する","id":"webサーバー接続の詳細を取得する","depth":3},{"value":"クエリを記述する","id":"クエリを記述する","depth":3},{"value":"結果エクスポートの詳細を指定する","id":"結果エクスポートの詳細を指定する","depth":3},{"value":"転送設定を設定する","id":"転送設定を設定する","depth":3},{"value":"ドメインフィールド設定","id":"ドメインフィールド設定","depth":3},{"value":"クエリを実行する","id":"クエリを実行する","depth":3},{"value":"Audience Studio で Segment をアクティベートする","id":"audience-studio-で-segment-をアクティベートする","depth":2},{"value":"CLIからの使用","id":"cliからの使用","depth":2},{"value":"オンデマンドジョブの場合","id":"オンデマンドジョブの場合","depth":3},{"value":"スケジュールされたジョブの場合","id":"スケジュールされたジョブの場合","depth":3}],"frontmatter":{"seo":{"title":"Web Server and HTTP Put Endpoint Export Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/web-server-and-http-put-endpoint-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}