{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"PostgreSQL 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":"postgresql-export-integration","__idx":0},"children":["PostgreSQL Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataからジョブ結果を既存のPostgreSQLインスタンスにエクスポートできます。PostgreSQLデータのインポートについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/postgresql-import-integration"},"children":["PostgreSQL Import Integration"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このトピックには以下が含まれます:"]},{"$$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":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PostgreSQLインスタンス"]},"。"]}]},{"$$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":"Heading","attributes":{"level":3,"id":"新しい接続の作成","__idx":4},"children":["新しい接続の作成"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["新しい接続を作成するために、以下のフィールド値を設定します。"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postgresql-export-integration-2024-07-26.55b61de5bfe82f4f7a3cac20923331fca9118744d7cff08100fc6a21535a4ade.272a20fd.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Host"]},": ソースデータベースのホスト情報（IPアドレスなど）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User"]},": ソースデータベースに接続するためのユーザー名。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Password"]},": ソースデータベースに接続するためのパスワード。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use SSL"]},": SSLを使用して接続する場合はこのボックスにチェックを入れます",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Require a valid SSL certificate?:"]}," 接続時に有効なSSL証明書の提示を要求します。"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"postgresqlインスタンスへの結果エクスポートの設定","__idx":5},"children":["PostgreSQLインスタンスへの結果エクスポートの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataからのエクスポートはクエリを使用します。クエリは新規作成することも、既存のものを再利用することもできます。クエリ内でデータ接続を設定します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/export/creating-a-destination-integration"},"children":["Creating a Destination Integration"]},"の手順を完了します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]},"に移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データをエクスポートしたいクエリを選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クエリを実行して結果セットを検証します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["既存の統合認証を選択します。"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postgresql-export-integration-2024-08-13-1.976a84340b2212cab5deded4fdbd2313767ee9357fc1800030b207f9fc1a3afd.272a20fd.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["追加のExport Resultsの詳細を定義します。エクスポート統合の内容で、統合パラメータを確認してください。"," ","例えば、Export Results画面が異なる場合や、入力する追加の詳細がない場合があります:"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postgresql-export-integration-2024-08-13-2.cb87c5dd29a338e49ba6b46f2d4046dc95f4cd912a038417158d84f305510c64.272a20fd.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クエリを実行します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["指定した宛先にデータが移動したことを検証します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-resultパラメータの設定","__idx":6},"children":["Export Resultパラメータの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postgresql-export-integration-2024-07-26-1.169ea3b63d2f08e8e6288aff3e9c8723312703e71198ea92889ee6ea3510be19.272a20fd.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database name"]},": データを転送するデータベースの名前。(例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["your_database_name"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]},": データをエクスポートしたいテーブル。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output mode"]},": データをアップロードするための異なる方法。",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]}," (デフォルト): ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["append"]},"モードは、URLにモードオプションが指定されていない場合に使用される",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["デフォルト"]},"モードです。このモードでは、クエリ結果がテーブルに追加されます。テーブルが存在しない場合は作成されます。このモードはアトミックです。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["replace"]},"モードは、既存のテーブルの全コンテンツをクエリの結果出力で置き換えます。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。replaceモードは、以下の3つのステップを",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["単一のトランザクション"]},"で実行することで",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アトミック性"]},"（テーブルの消費者が常に一貫したデータを持つこと）を実現します:",{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルを作成する"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルに書き込む"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ALTER TABLE RENAMEを使用して既存のテーブルを一時テーブルで置き換える"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Truncate:"]}," システムはまず既存のテーブルをtruncateし、その後クエリ結果を挿入します。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。このモードはアトミックです。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update:"]}," \"unique\"パラメータで指定された列に重複値が発生しない限り、行が挿入されます。重複する場合は、代わりに更新が実行されます。updateモードを使用する場合、\"unique\"パラメータが必要です。このモードはアトミックです。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Insert Method"]},": このオプションは、データがPostgresテーブルにどのように書き込まれるかを制御します。デフォルトの方法は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["copy"]},"で、ほとんどの状況で推奨されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Copy"]},"(デフォルト): データはまずサーバー上の一時ファイルに保存され、その後",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://www.postgresql.org/docs/8.1/static/sql-copy.html"},"children":["COPY"]},"トランザクションを使用してPostgresに書き込まれます。この方法はINSERTよりも高速なので、大量のデータを処理する際に便利です。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Insert"]},": データは'INSERT'ステートメントを使用してPostgresに書き込まれます。これは最も信頼性が高く互換性のある方法で、ほとんどの状況で推奨されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema"]},": ターゲットテーブルが配置されているスキーマを定義します。指定されていない場合は、デフォルトのスキーマが使用されます。デフォルトのスキーマはユーザーの\"search_path\"設定によりますが、通常は\"public\"です。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Foreign Data Wrapper"]},": このオプションは、データの保存にデータラッパーを使用するかどうかを制御します。デフォルトはnoneで、ほとんどのインスタンスで機能するはずです。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["None"]}," (デフォルト) - foreign-data wrapperなし。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cstore"]}," - 宛先テーブルでカラムナストレージが必要/有効になっている場合に使用されます。"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"オプション-query-export-ジョブをスケジュールする","__idx":7},"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":8},"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":9},"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":10},"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":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":["Treasure コンソールが利用できない場合、またはニーズを満たさない場合は、CLIを使用してクエリを発行し、結果を出力できます。以下の手順では、CLIを使用してクエリ出力結果をフォーマットする方法を示します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"td-query-コマンドの使用方法","__idx":13},"children":["td query コマンドの使用方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["単一クエリの結果を Postgres サーバーに出力するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td query"]}," コマンドに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]}," オプションを追加します。ジョブが完了すると、結果がデータベースに書き込まれます:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query -w -d testdb \\\n--result 'postgresql://user:password@host/database/table' \\\n\"SELECT code, COUNT(1) FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力が体系的に Postgres に書き込まれるスケジュールクエリを作成するには、td sched:create コマンドでスケジュールを作成する際に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--result"]}," オプションを追加します:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td sched:create hourly_count_example \"0 * * * *\" \\\n-d testdb \\\n--result 'postgresql://user:password@host/database/table' \\\n\"SELECT COUNT(*) FROM www_access\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"結果出力-url-フォーマット","__idx":14},"children":["結果出力 URL フォーマット"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果出力先は、次のフォーマットの URL で表されます:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql:``//username:password@hostname:port/database/table"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各項目の説明:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["postgresql"]}," は Postgres への結果出力を識別します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["username"]}," と ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["password"]}," は Postgres サーバーへの認証情報です"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["hostname"]}," は Postgres サーバーのホスト名です"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["port"]}," は Postgres サーバーにアクセスするためのポート番号です。「:」はオプションであり、デフォルトでは 5432 と見なされます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["database"]}," は宛先データベースの名前です"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["table"]}," は上記のデータベース内のテーブル名です。クエリ出力が実行される時点で存在しない場合は、指定された名前のテーブルがユーザーのために作成されます"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"オプション","__idx":15},"children":["オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Postgres への結果出力は、オプションの URL パラメータとして指定できる様々なオプションをサポートしています。これらのオプションは互いに互換性があり、組み合わせることができます。該当する場合、デフォルトの動作が示されています。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ssl-オプション","__idx":16},"children":["SSL オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ssl"]}," オプションは、Postgres サーバーへの接続に SSL を使用するかどうかを決定します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data から Postgres サーバーへの接続に SSL を使用します。Postgres サーバーは ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://www.postgresql.org/docs/current/static/ssl-tcp.html"},"children":["SSL 接続を受け入れるように設定されている"]}," 必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?ssl=true"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data から Postgres サーバーへの接続に SSL を使用しません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?ssl=false"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"schema-オプション","__idx":17},"children":["Schema オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["対象テーブルが配置されているスキーマを制御します。指定されていない場合は、デフォルトのスキーマが使用されます。デフォルトのスキーマはユーザーの「search_path」設定に依存しますが、通常は「public」です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?schema=target_schema"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-mode-オプション","__idx":18},"children":["Update Mode オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データベースデータを変更する様々な方法を制御します。サポートされている 4 つのモードはすべて",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アトミック"]},"です。これは、宛先テーブルの変更を試みる前に、一時テーブルを使用して受信データを保存するためです:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Append"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Truncate"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Update"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modeappend-デフォルト","__idx":19},"children":["mode=append (デフォルト)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["append"]}," モードはデフォルトで、URL にモードオプションが指定されていない場合に使用されます。このモードでは、クエリ結果がテーブルに追加されます。テーブルが存在しない場合は、テーブルが作成されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mode=append"]}," がデフォルトの動作であるため、次の 2 つの URL は同等です:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["postgresql://user:password@host/database/table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["postgresql://user:password@host/database/table?mode=append"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modereplace","__idx":20},"children":["mode=replace"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["replace"]}," モードは、既存のテーブルの内容全体をクエリの出力結果で置き換えます。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。replace モードは、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["単一トランザクション"]},"内で以下の3つのステップを実行することにより、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["原子性"]},"を実現します(テーブルの利用者が常に一貫したデータを持つことを保証します)。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルを作成します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一時テーブルに書き込みます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ALTER TABLE RENAME を使用して、既存のテーブルを一時テーブルで置き換えます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?mode=replace"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modetruncate","__idx":21},"children":["mode=truncate"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["truncate"]}," モードでは、システムはまず既存のテーブルをトランケートし、その後クエリ結果を挿入します。テーブルがまだ存在しない場合は、新しいテーブルが作成されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?mode=truncate"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["replace とは異なり、truncate モードではテーブルのインデックスが保持されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"modeupdate","__idx":22},"children":["mode=update"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["update"]}," モードでは、挿入される行が \"unique\" パラメータで指定された列に重複する値を引き起こす場合を除き、行が挿入されます。そのような場合は、挿入の代わりに行の更新が実行されます。update モードを使用する場合は、\"unique\" パラメータが必要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://...?mode=update&unique=col1"]},"        # 単一のユニーク列"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://...?mode=update&unique=[col1,col2]"]}," # 複数のユニーク列"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"write-method-オプション","__idx":23},"children":["Write method オプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["method"]}," オプションは、データが Postgres テーブルに書き込まれる方法を制御します。以下を使用できます:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["method=insert"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["method=copy"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトのメソッドは ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["insert"]}," で、ほとんどの状況で推奨される方法です。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"methodinsert-デフォルト","__idx":24},"children":["method=insert (デフォルト)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["insert"]}," メソッドでは、データは 'INSERT' ステートメントを使用して Postgres に書き込まれ、最も信頼性が高く互換性のある方法です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["method=insert"]}," はデフォルトの動作であるため、以下の2つの URL は同等です:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?method=insert"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"methodcopy","__idx":25},"children":["method=copy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["copy"]}," メソッドを使用すると、データはまずサーバー上の一時ファイルに保存され、その後 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://www.postgresql.org/docs/8.1/static/sql-copy.html"},"children":["COPY"]}," トランザクションを使用して Postgres に書き込まれます。このメソッドは INSERT よりも高速であるため、大量のデータを処理する場合に便利です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postgresql://user:password@host/database/table?method=copy"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"オプション-ワークフローでのエクスポート結果の設定","__idx":26},"children":["(オプション) ワークフローでのエクスポート結果の設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure ワークフロー 内で、このデータコネクタを使用してデータを出力することを指定できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"timezone: UTC\n\n_export:\n  td:\n    database: sample_datasets\n\n+td-result-output-postgresql:\n  td>: queries/sample.sql\n  result_connection: your_connections_name\n  result_settings:\n   database: database_name\n   table: table_name\n   mode: append\n   set_role: new_role\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows/exporting-data-with-parameters"},"children":["ワークフロー内でデータコネクタを使用してデータをエクスポートする方法"]},"についてお読みください。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/workflow-examples/tree/master/td/postgresql"},"children":["ワークフローの例"]},"をご覧ください。"]}]},"headings":[{"value":"PostgreSQL Export Integration","id":"postgresql-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":"PostgreSQLインスタンスへの結果エクスポートの設定","id":"postgresqlインスタンスへの結果エクスポートの設定","depth":3},{"value":"Export Resultパラメータの設定","id":"export-resultパラメータの設定","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":"td query コマンドの使用方法","id":"td-query-コマンドの使用方法","depth":3},{"value":"結果出力 URL フォーマット","id":"結果出力-url-フォーマット","depth":3},{"value":"オプション","id":"オプション","depth":3},{"value":"SSL オプション","id":"ssl-オプション","depth":3},{"value":"Schema オプション","id":"schema-オプション","depth":3},{"value":"Update Mode オプション","id":"update-mode-オプション","depth":3},{"value":"mode=append (デフォルト)","id":"modeappend-デフォルト","depth":4},{"value":"mode=replace","id":"modereplace","depth":4},{"value":"mode=truncate","id":"modetruncate","depth":4},{"value":"mode=update","id":"modeupdate","depth":4},{"value":"Write method オプション","id":"write-method-オプション","depth":3},{"value":"method=insert (デフォルト)","id":"methodinsert-デフォルト","depth":4},{"value":"method=copy","id":"methodcopy","depth":4},{"value":"(オプション) ワークフローでのエクスポート結果の設定","id":"オプション-ワークフローでのエクスポート結果の設定","depth":2}],"frontmatter":{"seo":{"title":"PostgreSQL Export Integration"}},"lastModified":"2026-06-01T09:47:58.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/postgresql-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}