{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Treasure Data Data Exchange 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":"treasure-data-data-exchange-export-integration","__idx":0},"children":["Treasure Data Data Exchange Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataコネクタを使用して、ジョブ結果をTreasure Dataデータベースに書き込むことができます。通常、このコネクタは、あるTreasure アカウントからTreasure アカウントにデータをエクスポートするために使用されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["あるTreasure アカウントから別のTreasure アカウントへのジョブ結果の書き込みに関するサンプルワークフローについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/tree/master/td/another_td"},"children":["Treasure Boxes"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アカウント内のあるテーブルから同じアカウント内の別のテーブルにデータを書き込むためにこのコネクタを使用することは強くお勧めしません。代わりに、最高のパフォーマンスを得るために「INSERT INTO」クエリまたは「INSERT OVERWRITE/CREATE TABLE AS SELECT」クエリを使用してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Presto：「CREATE TABLE AS SELECT」または「INSERT INTO」"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Hive：「INSERT INTO/OVERWRITE」"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Toolbelt"]},"を含むTreasure Dataの基本的な知識。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["もしエクスポート元とエクスポート先でTreasure アカウントのリージョンが異なり、かつ本機能の設定で利用するAPI Keyを所有するユーザーのアクセスがIP Allowlist機能によって制限されている場合、IP Allowlistでエクスポート元のTreasure Dataリージョンが利用するIPアドレスを登録する必要があります。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/ip-addresses-integrations-result-workers"},"children":["ドキュメント"]},"を確認し、エクスポート元リージョンのIPアドレス表においてExport Integrations列に記載されているIPアドレスをIP Allowlistに登録してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"基本的な使用方法","__idx":2},"children":["基本的な使用方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールまたはCLIから接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールで接続を作成する","__idx":3},"children":["Treasure コンソールで接続を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソール内から接続を設定できます。アカウント間転送を完了するには、ターゲットのTreasure アカウントから開始します。ターゲットアカウントプロファイルからAPI Key情報をコピーする必要があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-key情報を取得する","__idx":4},"children":["API Key情報を取得する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure コンソール"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["My Settings"]},"に移動します。管理者権限が必要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-172241.5c1fd8360e6e917db074642a3c64e44eebb8437b573de805f2af6aab6c90ba6c.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Keys"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-173834.f0a0fc83c7c560d2b61b90a7aaf744608ec66e1f1fbfbaece53dbcd901f601b8.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要に応じてアクセスを検証します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-174119.f2995567ec7192e1ab7645862385a7a8fe781aa209d90f43e7e627c6e199047b.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["検証が完了してプロファイルに戻ると、マスターキーと書き込み専用キーの両方が表示されます。Write-only API keyをハイライトします。それを選択すると、自動的にクリップボードにコピーされます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-175122.921f399aea98b7b9799edd4a696979114197fa1a4f0d412398cba5c67e70d4f6.e4e4f55a.png","alt":""},"children":[]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-174543.be19e382e9fe1cb13dd26b549030fecc822723c49fdf29b22685cdb03e4c41d4.e4e4f55a.png","alt":""},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データ転送がmode=replaceなどで既存のデータを更新する場合は、書き込み専用キーの代わりにマスターキーを使用する必要があります。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい認証を作成する","__idx":5},"children":["新しい認証を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データ接続を設定する際、統合にアクセスするための認証を提供します。Treasure Dataでは、認証を設定してからソース情報を指定します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure コンソール"]},"を開きます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"に移動します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataタイルを検索して選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-180817.290d16ad023e623f4ac349d5101008c4111197c95ea0d544bd9c79869ca49733.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"を選択します。ターゲットアカウントから書き込み専用",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Key"]},"を入力します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Hostname"]},"には、エクスポートに使用するサーバーを入力します。フィールドを空白のままにして、リージョンのデフォルトサーバーを使用できます。または、次のいずれかの値を入力できます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["US: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://api.treasuredata.com"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["api.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["JP: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://api.treasuredata.co.jp"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["api.treasuredata.co.jp"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["EU01: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://api.eu01.treasuredata.com"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["api.eu01.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AP02 (Korea): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://api.api02.treasuredata.com"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["api.api02.treasuredata.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-181011.db17ca82046db3cfa4bac40094e86d1336f22cde90ac6f6a70fb7e9e9f628944.e4e4f55a.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択します。接続に名前を付けて",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Connectionを選択します。"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["あるリージョンから別のリージョンにデータを書き込む場合、例えばAWS USからAWS JPの場合、API Hostnameフィールドは必須です。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"treasure-data-connectorで出力を指定する","__idx":6},"children":["Treasure Data Connectorで出力を指定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送を作成するには、データ接続を設定するクエリを作成または再利用します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure コンソール"]},"を開きます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Workbench > Queriesに移動します。データをエクスポートするために使用する予定のクエリをハイライトします。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"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-20200513-203249.de106fdc17b785c33dca5a00b00d63e66453cd0b3fb074638715ead7768f4400.e4e4f55a.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT code, COUNT(1) FROM www_access GROUP BY code\n","lang":"sql"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Choose Integration"]},"ダイアログが開きます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200513-202807.858b6fbbfd044c51a986cc90474cf386233b53729ac171ff1189171d158b4cf1.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Existing Integration"]},"を選択し、保存された認証の名前を検索します。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"パラメータの指定","__idx":7},"children":["パラメータの指定"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["認証を選択した後、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"ダイアログが開きます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/treasuredatadde.b223eeb60dde65c060f8a57a544233ba864ea1e02fb197c3e34507cbe90bfe03.e4e4f55a.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["パラメータを指定し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択します。"]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameters"},"children":["Parameters"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Database name (required)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["既存のデータベースの名前。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Table name (required)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["テーブル名。テーブルが存在しない場合は新しいテーブルが作成されます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mode (required)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["データをインポートするためのAppendまたはReplaceメソッドを選択します。",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]},"（デフォルト）-データインポート結果がテーブルに追加されます。テーブルが存在しない場合は作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace"]},"-既存のテーブルの全体の内容をクエリの結果出力で置き換えます。テーブルが存在しない場合は、新しいテーブルが作成されます。"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Time (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザー定義の時間値。クエリ結果に時間カラムがない場合に適用されます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File split size (KB)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ファイルサイズがこの値以上の場合にファイルを分割するために使用します（16MB-512MB）"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"オプション-query-export-ジョブをスケジュールする","__idx":8},"children":["(オプション) Query Export ジョブをスケジュールする"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled Jobs と Result Export を使用して、指定したターゲット宛先に出力結果を定期的に書き込むことができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data のスケジューラー機能は、高可用性を実現するために定期的なクエリ実行をサポートしています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2 つの仕様が競合するスケジュール仕様を提供する場合、より頻繁に実行するよう要求する仕様が優先され、もう一方のスケジュール仕様は無視されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば、cron スケジュールが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * 1'"]}," の場合、「月の日」の仕様と「週の曜日」が矛盾します。前者の仕様は毎月 1 日の午前 0 時 (00:00) に実行することを要求し、後者の仕様は毎週月曜日の午前 0 時 (00:00) に実行することを要求するためです。後者の仕様が優先されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"treasure-コンソール-を使用してジョブをスケジュールする","__idx":9},"children":["Treasure コンソール を使用してジョブをスケジュールする"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]}," に移動します"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいクエリを作成するか、既存のクエリを選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," の横にある None を選択します。"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-28-51.f1b242f6ecc7666a0097fdf37edd1682786ec11ef80eff68c66f091bc405c371.0f87d8d4.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ドロップダウンで、次のスケジュールオプションのいずれかを選択します:"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-29-47.45289a1c99256f125f4d887e501e204ed61f02223fde0927af5f425a89ace0c0.0f87d8d4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ドロップダウン値"},"children":["ドロップダウン値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom cron..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#custom-cron-details"},"children":["Custom cron... の詳細"]},"を参照してください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@daily (midnight)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["指定されたタイムゾーンで 1 日 1 回午前 0 時 (00:00 am) に実行します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@hourly (:00)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎時 00 分に実行します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["スケジュールなし。"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"custom-cron-の詳細","__idx":10},"children":["Custom cron... の詳細"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-30-23.0f94a8aa5f75ea03e3fec0c25b0640cd59ee48d1804a83701e5f2372deae466c.0f87d8d4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cron 値"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 * * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 時間に 1 回実行します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 日 1 回午前 0 時に実行します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 1 * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 1 日の午前 0 時に 1 回実行します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["スケジュールされた実行時刻のないジョブを作成します。"]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":" *    *    *    *    *\n -    -    -    -    -\n |    |    |    |    |\n |    |    |    |    +----- day of week (0 - 6) (Sunday=0)\n |    |    |    +---------- month (1 - 12)\n |    |    +--------------- day of month (1 - 31)\n |    +-------------------- hour (0 - 23)\n +------------------------- min (0 - 59)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の名前付きエントリを使用できます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Day of Week: sun, mon, tue, wed, thu, fri, sat."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各フィールド間には単一のスペースが必要です。各フィールドの値は、次のもので構成できます:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"fixed-table"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"35%","data-label":"フィールド値"},"children":["フィールド値 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"例"},"children":["例 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"45%","data-label":"例の説明"},"children":["例の説明 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["各フィールドに対して上記で表示された制限内の単一の値。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["フィールドに基づく制限がないことを示すワイルドカード"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]},"。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 1 日の午前 0 時 (00:00) に実行するようにスケジュールを設定します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["範囲 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2-5'"]}," ","フィールドの許可される値の範囲を示します。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1-10 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 1 日から 10 日までの午前 0 時 (00:00) に実行するようにスケジュールを設定します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["カンマ区切りの値のリスト ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,3,4,5'"]}," ","フィールドの許可される値のリストを示します。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 1,11,21 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 1 日、11 日、21 日の午前 0 時 (00:00) に実行するようにスケジュールを設定します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["周期性インジケータ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*/5'"]}," ","フィールドの有効な値の範囲に基づいて、"," ","スケジュールが実行を許可される頻度を表現します。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'30 */2 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 1 日、00:30 から 2 時間ごとに実行するようにスケジュールを設定します。"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 */5 * *'"]}," は、毎月 5 日から 5 日ごとに午前 0 時 (00:00) に実行するようにスケジュールを設定します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," ","ワイルドカードを除く上記の"," ","いずれかのカンマ区切りリストもサポートされています"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,*/5,8-10'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 5,*/10,25 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["毎月 5 日、10 日、20 日、25 日の午前 0 時 (00:00) に実行するようにスケジュールを設定します。"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(オプション) Delay execution を有効にすることで、クエリの開始時刻を遅延させることができます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"クエリを実行する","__idx":11},"children":["クエリを実行する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クエリに名前を付けて保存して実行するか、単にクエリを実行します。クエリが正常に完了すると、クエリ結果は指定された宛先に自動的にエクスポートされます。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定エラーにより継続的に失敗するスケジュールジョブは、複数回通知された後、システム側で無効化される場合があります。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(オプション) Delay execution を有効にすることで、クエリの開始時刻を遅延させることができます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"audience-studio-で-segment-をアクティベートする","__idx":12},"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":13},"children":["CLIからのオンデマンドジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オンデマンドジョブの場合は、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]},"コマンドに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを追加するだけです。ジョブが完了すると、結果は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["testdb"]},"データベース内の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["output_table"]},"に書き込まれます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td query --result 'td://@/testdb/output_table' \\\n  -w -d testdb \\\n  \"SELECT code, COUNT(1) FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールされたジョブの場合","__idx":14},"children":["スケジュールされたジョブの場合"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールされたジョブの場合は、ジョブをスケジュールするときに",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]},"オプションを追加するだけです。ジョブが実行されるたびに、結果は",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["output_table"]},"に書き込まれます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td result:create mydb td://@/testdb\n$ td sched:create hourly_count_example \"0 * * * *\" \\\n  -d testdb \"select count(*) from www_access\" \\\n  --result mydb:output_table\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データを変更する2つの方法","__idx":15},"children":["データを変更する2つの方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2つの方法でデータを追加または削除できます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["append"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["replace"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"td://@/testdb/output_table              # append\ntd://@/testdb/output_table?mode=append  # append\ntd://@/testdb/output_table?mode=replace # replace\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"append","__idx":16},"children":["Append"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これはデフォルトモードです。クエリ結果はテーブルに追加されます。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。この操作は冪等ではありません。同じ呼び出しを繰り返し行っても同じ結果を生成することはできません。このモードは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/glossary"},"children":["atomic"]},"ではありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"replace","__idx":17},"children":["Replace"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テーブルがすでに存在する場合、既存のテーブルの行はクエリ結果で置き換えられます。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の3つのステップを",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["単一のトランザクション"]},"で実行することにより、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/glossary"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["atomicity"]}]},"（テーブルの消費者が常に一貫したデータを持つように）を実現します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルを作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルに書き込みます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["既存のテーブルを一時テーブルでアトミックに置き換えます。"]}]}]},"headings":[{"value":"Treasure Data Data Exchange Export Integration","id":"treasure-data-data-exchange-export-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"基本的な使用方法","id":"基本的な使用方法","depth":2},{"value":"Treasure コンソールで接続を作成する","id":"treasure-コンソールで接続を作成する","depth":2},{"value":"API Key情報を取得する","id":"api-key情報を取得する","depth":3},{"value":"新しい認証を作成する","id":"新しい認証を作成する","depth":3},{"value":"Treasure Data Connectorで出力を指定する","id":"treasure-data-connectorで出力を指定する","depth":3},{"value":"パラメータの指定","id":"パラメータの指定","depth":3},{"value":"(オプション) Query Export ジョブをスケジュールする","id":"オプション-query-export-ジョブをスケジュールする","depth":3},{"value":"Treasure コンソール を使用してジョブをスケジュールする","id":"treasure-コンソール-を使用してジョブをスケジュールする","depth":4},{"value":"Custom cron... の詳細","id":"custom-cron-の詳細","depth":4},{"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":"データを変更する2つの方法","id":"データを変更する2つの方法","depth":3},{"value":"Append","id":"append","depth":4},{"value":"Replace","id":"replace","depth":4}],"frontmatter":{"seo":{"title":"Treasure Data Data Exchange Export Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/treasure-data-data-exchange-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}