{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Amazon Redshift Import Integration Using The CLI","description":"Amazon RedshiftからTreasure AIへのデータインポートを、Connector CLIを使用して簡単に実行する手順を解説します。設定方法とインポートプロセスを詳しく説明します。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"amazon-redshift-import-integration-using-the-cli","__idx":0},"children":["Amazon Redshift Import Integration Using The CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data Connector CLIを使用して、Amazon Redshift clusterからTreasure Dataに直接datasetを取得します。このガイドでは、toolbeltのセットアップ、connector設定の作成、アドホックとスケジュールされたインポートの両方の実行を順を追って説明し、RedshiftデータをTDと同期させる方法を学びます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"treasure-data-toolbeltのインストール","__idx":1},"children":["Treasure Data Toolbeltのインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ターミナルを開き、次のコマンドを実行して最新の",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td —version\n0.14.1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-file-configymlの作成","__idx":2},"children":["Configuration File (config.yml)の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定ファイルには、integrationからconnectorに入力されるものを指定するin:セクションと、connectorがTreasure Dataのdatabaseに出力するものを指定するout:セクションが含まれています。利用可能なoutモードの詳細については、Appendixを参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例に示すように、設定ファイル(例:config.yml)を準備します。Redshiftインスタンスのアクセス情報を提供します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例に示すように、master userとmaster passwordを使用して設定ファイル(例:load.yml)を準備します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: redshift\n  host: redshift_endpoint\n  port: 5439\n  user: master_user\n  password: master_password\n  database: dev\n  table: example\n  select: \"*\"\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この例では、table内のすべてのレコードをダンプします。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/embulk/embulk-input-jdbc/tree/master/embulk-input-redshift"},"children":["追加パラメータ"]},"を使用して、より詳細な制御を行うことができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Redshiftインスタンスのサイズによっては、次のエラーが発生する場合があります。エラーを解決するには、load.ymlでfetch_rowsを設定できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Error: 422: BulkLoad job preview failed: org.postgresql.util.PSQLException:\nERROR: Fetch size 10000 exceeds the limit of 1000 for a single node configuration.\nReduce the client fetch/cache size or upgrade to a multi node installation.\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"インポートするデータのプレビューオプション","__idx":3},"children":["インポートするデータのプレビュー(オプション)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:previewコマンドを使用して、インポートするデータをプレビューできます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:preview load.yml\n+---------+--------------+----------------------------------+------------+---------------------------+\n| id:long | name:string  | description:string               | price:long | created_at:timestamp      |\n+---------+--------------+----------------------------------+------------+---------------------------+\n| 1       | \"item name1\" | \"26e3c3625366591bc2ffc6e262976e\" | 2419       | \"2014-02-16 13:01:06 UTC\" |\n| 2       | \"item name2\" | \"3e9dd9474dacb78afd607f9e0a3366\" | 1298       | \"2014-05-24 13:59:26 UTC\" |\n| 3       | \"item name3\" | \"9b6c9e4a140284d3951681e9e047f6\" | 9084       | \"2014-06-21 00:18:21 UTC\" |\n| 4       | \"item name4\" | \"a11faf5e63c1b02a3d4c2b5cbb7331\" | 669        | \"2014-05-02 03:44:08 UTC\" |\n| 6       | \"item name6\" | \"6aa15471c373ddc8a6469e1c918f98\" | 3556       | \"2014-03-29 08:30:23 UTC\" |\n+---------+--------------+----------------------------------+------------+---------------------------+\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"load-jobの実行","__idx":4},"children":["Load Jobの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:issueを使用してjobを実行します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間でパーティション分割されているため、--time-columnオプションを指定することをお勧めします。オプションが指定されていない場合、data connectorは最初のlongまたはtimestampカラムをpartitioning timeとして選択します。--time-columnで指定されるカラムのタイプは、longまたはtimestampタイプのいずれかである必要があります(利用可能なカラム名とタイプを確認するには、Preview結果を使用します。一般的に、ほとんどのデータタイプにはlast_modified_dateカラムがあります)。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データにtimeカラムがない場合は、add_timeフィルターオプションを使用してカラムを追加できます。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/add_time-filter-function"},"children":["add_time filter"]},"プラグインを参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["load jobを送信します。データサイズによっては、数時間かかる場合があります。データが保存されるdatabaseとtableを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:issueコマンドを使用してimport jobを送信します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column created_at\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["前のコマンドは、*database(td_sample_db)",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["と"]},"table(td_sample_table)*がすでに作成されていることを前提としています。databaseまたはtableがTDに存在しない場合、このコマンドは成功しないため、databaseとtableを手動で作成するか、td connector:issueコマンドで--auto-create-tableオプションを使用してdatabaseとtableを自動作成します:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column created_at --auto-create-table\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["timeというフィールドがある場合、--time-columnオプションを指定する必要はありません。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental_columnsとlast_recordオプションを使用してtable内のカラムを指定することにより、レコードを段階的にロードできます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: redshift\n  host: redshift_endpoint\n  port: 5439\n  user: master_user\n  password: master_password\n  database: devlp\n  table: example\n  incremental: true\n  incremental_columns: [id, sub_id]\n  last_record: [10000, 300]\nout:\n  mode: append\n  exec: {}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["connectorは、queryとソート値を内部的に自動的に再作成します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"# when last_record wasn't given\nSELECT * FROM(\n    ...original query is here\n)\nORDER BY id, sub_id\n\n::: terminal\n# when last_record was given\nSELECT * FROM(\n    ...original query is here\n)\nWHERE id > 10000 OR (id = 10000 AND sub_id > 300)\nORDER BY id, sub_id\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/scheduling-jobs-using-td-console"},"children":["scheduled execution"]},"を使用している場合、connectorは自動的にlast_recordを生成し、内部的に保持します。次にスケジュールされた実行で使用できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental_columnsとして、strings、timestamp、integersのみがサポートされています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental: true"]},"を設定すると、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["query"]},"オプションは使用できません。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: redshift\n  ...\nout:\n  ...\n\nConfig Diff\n---\nin:\n  last_record:\n  - 20000\n  - 400\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"scheduled-execution","__idx":5},"children":["Scheduled Execution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["定期的なintegrationインポートのために、定期的なdata connector実行をスケジュールできます。高可用性を確保するために、schedulerを慎重に設定しています。この機能を使用することで、ローカルデータセンターでcron daemonを必要としなくなります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールされたインポートの場合、integrationのdata connectorは、指定されたターゲットに一致するすべてのオブジェクトをインポートします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled executionは、integrationからデータを取得する際のdata connectorの動作を制御する追加の設定パラメータをサポートしています:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental この設定は、各オブジェクトに関連付けられたネイティブtimestampフィールドの1つに基づいて、data connectorがintegrationからデータを取得する方法を管理するload modeを制御するために使用されます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental: true(デフォルト)"," ","このモードでは、data connectorは、connectorの前回の実行以降に更新された指定されたintegrationオブジェクトタイプのレコードのみを取得します。このモードは、ユーザーが前回のスケジュールされた実行以降に変更されたオブジェクトターゲットのみを取得したい場合に便利です。このモードは通常、'append'モードを使用してデータを宛先tableに書き込むことと組み合わせて使用されます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["incremental_columns(必須)"," ","このオプションは、integrationから必要なデータのみをロードするために、incrementalモードで必要です。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental: false"," ","このモードでは、data connectorは、最後に更新されたタイミングに関係なく、指定されたintegrationオブジェクトタイプのすべてのレコードを取得します。このモードは、'replace'モードを使用してデータを宛先tableに書き込むことと組み合わせるのが最適です。"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["columns この設定は、Treasure Dataにインポートするデータのカスタムschemaを定義するために使用されます。ここでは関心のあるカラムのみを定義できますが、取得しているオブジェクトに存在することを確認してください。それ以外の場合、これらのカラムは結果で使用できません。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["last_record この設定は、前回のload jobからの最後のレコードを制御するために使用されます。オブジェクトには、カラム名のkeyとカラムの値の値が含まれている必要があります。keyは、integrationカラム名と一致する必要があります。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次は、出力に'append'モードと組み合わせたincrementalモードを使用したseedファイルの例です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: redshift\n  host: redshift_endpoint\n  port: 5439\n  user: master_user\n  password: master_password\n  database: dev\n  table: example\n  incremental: true\n  incremental_columns: [id]\n  last_record: [10000]\nout:\n  mode: append\n  exec: {}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental\\_columns:"]},"オプションを最適に使用するには、フルtableスキャンを回避するために関連するカラムにSORTKEYを設定します。この例では、次のindexを作成する必要があります:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"CREATE TABLE dev (...) sortkey(id);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["connectorは自動的にqueryとソート値を作成します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"# when last_record wasn't given\nSELECT * FROM(\n    ...original query is here\n)\nORDER BY id\n\n::: terminal\n# when last_record was given\nSELECT * FROM(\n    ...original query is here\n)\nWHERE id > 10000\nORDER BY id\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["connectorは自動的にlast_recordを生成し、次のスケジュールされた実行で使用します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: redshift\n  ...\nout:\n  ...\n\nConfig Diff\n---\nin:\n  last_record:\n  - 20000\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"scheduleの作成","__idx":6},"children":["Scheduleの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:createコマンドを使用して新しいscheduleを作成できます。scheduleの名前、cron形式のschedule、データが保存されるdatabaseとtable、およびdata connector設定ファイルが必要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]},"パラメータは、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@monthly"]},"のオプションを受け入れます。"]},{"$$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":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["デフォルトでは、scheduleはUTC timezoneで設定されます。-tまたは--timezoneオプションを使用して、timezoneでscheduleを設定できます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--timezone"]},"オプションは、'Asia/Tokyo'、'America/Los_Angeles'などの拡張timezone形式のみをサポートします。PST、CSTなどのtimezone略語は*サポートされておらず*、予期しないscheduleにつながる可能性があります。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"schedulesのリスト表示","__idx":7},"children":["Schedulesのリスト表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:listで現在スケジュールされているエントリのリストを確認できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:list\n+-----------------------+-------------+----------+-------+--------------+-----------------+----------------------------+\n| Name                  | Cron        | Timezone | Delay | Database     | Table           | Config                     |\n+-----------------------+-------------+----------+-------+--------------+-----------------+----------------------------+\n| daily_redshift_import | 10 0 * * *  | UTC      | 0     | td_sample_db | td_sample_table | {\"type\"=>\"redshift\", ... } |\n+-----------------------+-------------+----------+-------+--------------+-----------------+----------------------------+\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"schedulesの設定と履歴の表示","__idx":8},"children":["Schedulesの設定と履歴の表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:showは、scheduleエントリの実行設定を表示します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"% td connector:show daily_redshift_import\nName     : daily_redshift_import\nCron     : 10 0 * * *\nTimezone : UTC\nDelay    : 0\nDatabase : td_sample_db\nTable    : td_sample_table\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:historyは、scheduleエントリの実行履歴を表示します。個々の実行の結果を調査するには、td job jobidを使用します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"% td connector:history daily_redshift_import\n+--------+---------+---------+--------------+-----------------+----------+---------------------------+----------+\n| JobID  | Status  | Records | Database     | Table           | Priority | Started                   | Duration |\n+--------+---------+---------+--------------+-----------------+----------+---------------------------+----------+\n| 578066 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-18 00:10:05 +0000 | 160      |\n| 577968 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-17 00:10:07 +0000 | 161      |\n| 577914 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-16 00:10:03 +0000 | 152      |\n| 577872 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-15 00:10:04 +0000 | 163      |\n| 577810 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-14 00:10:04 +0000 | 164      |\n| 577766 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-13 00:10:04 +0000 | 155      |\n| 577710 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-12 00:10:05 +0000 | 156      |\n| 577610 | success | 10000   | td_sample_db | td_sample_table | 0        | 2015-04-11 00:10:04 +0000 | 157      |\n+--------+---------+---------+--------------+-----------------+----------+---------------------------+----------+\n8 rows in set\n\n\n% td job:show xxxxx\nJobID       : 24903\nStatus      : success\nType        : bulkload\nDatabase    : td_sample_db\nUse '-v' option to show detailed messages.\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"scheduleの削除","__idx":9},"children":["Scheduleの削除"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:deleteはscheduleを削除します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:delete daily_redshift_import\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"data-extensionsのincremental-loading","__idx":10},"children":["Data ExtensionsのIncremental Loading"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataは、dateフィールドを持つ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Extensions"]},"のincremental loadingをサポートしています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["incremental: trueが設定されている場合、data connectorは、指定されたdateフィールドのfrom_dateとfetch_daysによって指定された範囲に従ってレコードをロードします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"appendix","__idx":11},"children":["Appendix"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"out-pluginのモード","__idx":12},"children":["Out Pluginのモード"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-modes","__idx":13},"children":["Import Modes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["load.ymlファイルのoutセクションでファイルimportモードを指定できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["out:セクションは、データがTreasure Data tableにインポートされる方法を制御します。"," ","例えば、Treasure Dataの既存のtableにデータを追加したり、データを置き換えたりすることができます。"]},{"$$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":"Mode"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mode"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Examples"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Examples"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Append"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["レコードはターゲットtableに追加されます。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in:   ... out:   mode: append"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always Replace"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ターゲットtableのデータを置き換えます。ターゲットtableに加えられた手動のschema変更はそのまま残ります。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in:   ... out:   mode: replace"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Replace on new data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["インポートする新しいデータがある場合にのみ、ターゲットtableのデータを置き換えます。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in:   ... out:   mode: replace_on_new_data"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のリストは、使用可能なすべてのオプションの詳細を提供します:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database name:"]}," データを転送するdatabaseの名前。(例:your_database_name)"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use custom SELECT query?:"]}," シンプルなSELECT (columns) FROM table WHERE (condition)以上のものが必要な場合に使用します。"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema:"]}," データを転送するschema。"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SELECT columns:"]}," データを取得したい特定のカラムのみがある場合は、ここにリストします。それ以外の場合、すべてのカラムが転送されます。"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table:"]}," データをインポートするtable。"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["WHERE condition:"]}," tableから取得したデータに追加の特定性が必要な場合は、WHERE句の一部としてここで指定できます。"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ORDER BY:"]}," 特定のフィールドでレコードを並べ替える必要がある場合に指定します。"]}]},"headings":[{"value":"Amazon Redshift Import Integration Using The CLI","id":"amazon-redshift-import-integration-using-the-cli","depth":1},{"value":"Treasure Data Toolbeltのインストール","id":"treasure-data-toolbeltのインストール","depth":1},{"value":"Configuration File (config.yml)の作成","id":"configuration-file-configymlの作成","depth":2},{"value":"インポートするデータのプレビュー(オプション)","id":"インポートするデータのプレビューオプション","depth":2},{"value":"Load Jobの実行","id":"load-jobの実行","depth":2},{"value":"Scheduled Execution","id":"scheduled-execution","depth":2},{"value":"Scheduleの作成","id":"scheduleの作成","depth":3},{"value":"Schedulesのリスト表示","id":"schedulesのリスト表示","depth":3},{"value":"Schedulesの設定と履歴の表示","id":"schedulesの設定と履歴の表示","depth":3},{"value":"Scheduleの削除","id":"scheduleの削除","depth":3},{"value":"Data ExtensionsのIncremental Loading","id":"data-extensionsのincremental-loading","depth":2},{"value":"Appendix","id":"appendix","depth":1},{"value":"Out Pluginのモード","id":"out-pluginのモード","depth":2},{"value":"Import Modes","id":"import-modes","depth":3}],"frontmatter":{"seo":{"title":"Amazon Redshift Import Integration Using The CLI","description":"Amazon RedshiftからTreasure AIへのデータインポートを、Connector CLIを使用して簡単に実行する手順を解説します。設定方法とインポートプロセスを詳しく説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/amazon-redshift-import-integration-using-the-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}