{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Elastic Cloud Export CLI","description":"Elastic Cloud Exportのためのコマンドラインインターフェースを使用してクエリ結果をエクスポートする方法を説明します。","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/"}}]},"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":"elastic-cloud-export-cli","__idx":0},"children":["Elastic Cloud Export CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLIを使用してクエリを実行し、結果を出力できます。以下の手順では、CLIを使用してクエリ出力結果をフォーマットする方法を説明します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このトピックには以下が含まれます:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-queryコマンドの使用方法","__idx":1},"children":["TD Queryコマンドの使用方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["単一のクエリの結果をElastic Cloudに出力するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]},"コマンドに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを追加します。ジョブが完了すると、結果はデータベースに書き込まれます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Nodes: ノードのカンマ区切りリスト"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use SSL? SSLを使用するかどうか"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Auth Method: BasicまたはNoneのいずれかを選択"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Username: Basic認証のユーザー名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Password: 上記ユーザーのパスワード"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Mode: insertまたはreplaceのいずれかを選択"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Index: インデックスの名前"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type: typeの名前"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ID: (オプション) IDカラムの名前"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Elastic Cloud用のTD queryコマンドフォーマットの例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query \\\n--result '{\"type\":\"elasticcloud\",\"mode\":\"insert\",\"nodes\":[{\"host\":\"host\",\"port\":port}],\n\"use_ssl\":true,\"auth_method\":\"basic\",\"user\":\"user\",\n\"index\":\"index\",\"index_type\":\"log\",\"bulk_actions\":1000,\n\"bulk_size\":5242880,\"fill_null_for_empty_column\":true,\n\"maximum_retries\":7,\"maximum_retry_interval_millis\":120000}'-w \\\n-d ivan_test_td \\\n\"SELECT column_name, COUNT(1) FROM table GROUP BY column\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"スケジュールされたジョブ","__idx":2},"children":["スケジュールされたジョブ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力を体系的にElastic Cloudに書き込むスケジュールクエリを作成するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td sched:create"]},"コマンドでスケジュールを作成する際に",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを追加します。ジョブが実行されるたびに、結果は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mytbl"]},"に書き込まれます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td result:create mydb elascloud://user:password@host/database\ntd sched:create hourly_count_example \"0 * * * *\" \\\n-d testdb \\\n\"select count(*) from www_access\" \\\n--result mydb:mytbl\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"結果出力urlフォーマット","__idx":3},"children":["結果出力URLフォーマット"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果出力ターゲットは、以下のフォーマットのURLで表されます:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n   \"type\":\"elasticcloud\",\n   \"mode\":\"mode\",\n   \"nodes\":[\n      {\n         \"host\":\"host\",\n         \"port\":\"port\"\n      }\n   ],\n   \"auth_method\":\"none\",\n   \"index\":\"index\",\n   \"index_type\":\"dump\",\n   \"bulk_actions\":1000,\n   \"bulk_size\":5242880\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["パラメータの説明:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["host"]},": ホスト名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["port"]},": ポート番号"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["modes: appendまたはreplaceを指定"]}]}]},"headings":[{"value":"Elastic Cloud Export CLI","id":"elastic-cloud-export-cli","depth":1},{"value":"TD Queryコマンドの使用方法","id":"td-queryコマンドの使用方法","depth":2},{"value":"スケジュールされたジョブ","id":"スケジュールされたジョブ","depth":2},{"value":"結果出力URLフォーマット","id":"結果出力urlフォーマット","depth":2}],"frontmatter":{"seo":{"title":"Elastic Cloud Export CLI","description":"Elastic Cloud Exportのためのコマンドラインインターフェースを使用してクエリ結果をエクスポートする方法を説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/elastic-cloud-export-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}