{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"KARTE Import 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":"karte-import-integration","__idx":0},"children":["KARTE Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/karte-export-integration"},"children":["KARTE Export Integrationについて詳しく知る"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["KARTE Data Connectorを使用して、Google Cloud Storage (GCS) バケットに保存されている*.tsvおよび*.csvファイルの内容をTreasure Dataにインポートできます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataの基本知識"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["既存のGoogle Service Account"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.cloud.google.com/apis/credentials"},"children":["Google Developers Console"]},"からJSONキーファイルを生成して取得する必要があります。詳細については、Google Cloud Platformのドキュメントの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/storage/docs/authentication#generating-a-private-key"},"children":["サービスアカウント認証情報の生成"]},"セクションを参照してください。"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"treasure-コンソールを使用した接続の作成","__idx":2},"children":["Treasure コンソールを使用した接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"新しい接続の作成","__idx":3},"children":["新しい接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"に移動して検索します。KARTEを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-135955.548637f02320160279902e01534c80bff33d9c46d6aeafd70b1275e532f0228a.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"新しいkarte-connectorの作成","__idx":4},"children":["新しいKARTE Connectorの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のダイアログが開きます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140011.c17b6968f44c52e7afef9b09add1e5bf17ce82550831495eb039462783ab109c.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要な認証情報を入力します。Treasure コンソールでは、JSONキーファイルのみを使用して認証できます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON key file:"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.developers.google.com/projectselector/apis/dashboard?pli=1&supportedpurview=project&project=&folder=&organizationId="},"children":["Google Developers Console"]},"から生成されたJSONキーファイルの内容をこのフィールドにコピー&ペーストします。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Application Name:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["KARTE"]},"がデフォルト値です。KARTEは、このコネクタに対してTreasure Dataが選択した名前です。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データコネクタの名前を指定し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"を選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-dataへのkarteデータのインポート","__idx":5},"children":["Treasure DataへのKARTEデータのインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Connectionsページが表示されます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Transfer"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140058.8c2c0aa361e2430417c046015e0fc83e6b87bfa47834ce0b757a5f530a1f7aa5.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のセクションでは、フェッチ、プレビュー、転送、スケジュール、および詳細の確認に関する手順を説明します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"fetch-from","__idx":6},"children":["Fetch from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["取り込みたい情報を登録する必要があります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bucket"]},". Google Cloud Storageバケット名(例: ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["your_bucket_name"]},")。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path Prefix"]},". ターゲットキーのプレフィックス(例: ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["logs/data_"]},")。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path Regex"]},". ファイルパスにマッチする正規表現を指定します。ファイルパスがこのパターンにマッチしない場合、そのファイルはスキップされます(例: ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[".csv$"]}," の場合、パスがこのパターンにマッチしないファイルはスキップされます)。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start after path"]},". last_pathパラメータを挿入して、最初の実行でこのパスより前のファイルをスキップします(例: logs/data_20170101.csv)。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental"]},". インクリメンタルローディングを有効にします。インクリメンタルローディングが有効な場合、次の実行のconfig diffにはlast_pathパラメータが含まれ、次の実行ではそのパスより前のファイルがスキップされます。それ以外の場合、last_pathは含まれません。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["例"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Amazon CloudFrontは、静的および動的Webコンテンツの配信を高速化するWebサービスです。CloudFrontを設定して、CloudFrontが受信するすべてのユーザーリクエストに関する詳細情報を含むログファイルを作成できます。ロギングを有効にすると、次のようなCloudFrontログファイルを保存できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[your_bucket] - [logging] - [E231A697YXWD39.2017-04-23-15.a103fd5a.gz]\n[your_bucket] - [logging] - [E231A697YXWD39.2017-04-23-15.b2aede4a.gz]\n[your_bucket] - [logging] - [E231A697YXWD39.2017-04-23-16.594fa8e6.gz]\n[your_bucket] - [logging] - [E231A697YXWD39.2017-04-23-16.d12f42f9.gz]\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この場合、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fetch from"]},"の設定は次のようになります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bucket"]},": your_bucket"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path Prefix"]},": logging/"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Path Regex"]},": ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[".gz$"]}," (必須ではありません)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start after path"]},": logging/E231A697YXWD39.2017-04-23-15.b2aede4a.gz (2017-04-23-16からログファイルをインポートしたい場合)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental"]},": true (このジョブをスケジュールしたい場合)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"preview","__idx":7},"children":["Preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データのプレビューが表示されます。データプレビューの仕組みの詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/about-data-preview"},"children":["About Data Preview"]},"を参照してください。"," ","指定したカラム名の設定などの変更を行う場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Advanced Settings"]},"を選択します。それ以外の場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140127.8ce28e8252806bedbc3a1e227e7110284f61c67830baff1d7203d2bd6878fb5b.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"advanced-settings","__idx":8},"children":["Advanced Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Advanced Settingsでは、プロパティを編集できます。以下のプロパティが利用可能です。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default timezone"]},". 値自体にタイムゾーンが含まれていない場合、timestampカラムのタイムゾーンを変更します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Columns"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},". カラムの名前を変更します。カラム名は小文字のアルファベット、数字、および\"_\"のみをサポートします。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},". 指定されたタイプとして値を解析し、TreasureDataスキーマに変換した後でそのタイプを保存します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["long"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["timestamp"]},": TreasureDataではstring型としてインポートされます(例: 2017-04-01 00:00:00.000)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["double"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["json"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Total file count limit"]},". 読み取るファイルの最大数(オプション)。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transfer-to","__idx":9},"children":["Transfer to"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポート用の既存のデータベースとテーブルを選択するか、新しいものを作成します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mode"]},": AppendまたはReplace。既存のテーブルにレコードを追加するか、既存のテーブルを置き換えるかを選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Partition Key Seed"]},": パーティショニング時間としてlongまたはtimestampカラムを選択します。デフォルトの時間カラムとして、add_timeフィルタを使用したupload_timeを使用します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140144.651aa572e865bc7573686c420447667aed867478fccb900fe2e2a7a7f9f0c1f6.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when","__idx":10},"children":["When"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1回限りの転送または自動的に繰り返される転送のスケジュールを指定できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のパラメータを使用してスケジュールを設定します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Once now"]},". ジョブを1回実行します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Repeat"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},". ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]},"の3つのオプション、およびカスタム",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]},"でスケジュールできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]},". 指定された実行時刻に遅延を追加します。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]},". 拡張タイムゾーン形式をサポートします(例: Asia/Tokyo)。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140158.2a798952d67f014f0c0fed2c52ca77642e32826d73528cdd28cc9ca6e2f58c49.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"details","__idx":11},"children":["Details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ソースの名前を作成し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DONE"]},"を選択してKARTE connectorを新しいソースとして保存します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140209.6b755a05b3d89734c08d69c3347b3068adcd567d403707c3078424d8ddaf88f7.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"my-input-transfers","__idx":12},"children":["My Input Transfers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["My Input Transfersで既存のジョブを編集します。このデータコネクタの以前の転送の詳細を表示するには、ジョブアイコンを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191002-140218.f38854126ff8ca4e9bcc4f49571d27ca0e949fc9848a556272a34459949e0261.028cedc9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cliを使用したコネクタの設定","__idx":13},"children":["CLIを使用したコネクタの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクタをセットアップする前に、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/installing-and-updating-td-toolbelt-and-treasure-agent"},"children":["Treasure Data Toolbelt"]},"をインストールしてください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"seed-config-file-seedymlの作成","__idx":14},"children":["Seed Config File (seed.yml)の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例とJSONキーファイルを使用して",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["seed.yml"]},"を準備します。バケットとターゲットファイル名（または複数ファイルの場合はプレフィックス）も指定する必要があります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: karte\n  bucket: sample_bucket\n  path_prefix: path/to/sample_file  # path the the *.csv or *.tsv file on your GCS bucket\n  auth_method: json_key\n  json_keyfile:\n    content: |\n      {\n        \"private_key_id\": \"1234567890\",\n        \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nABCDEF\",\n        \"client_id\": \"...\",\n        \"client_email\": \"...\",\n        \"type\": \"service_account\"\n      }\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Connector for KARTEは、指定されたプレフィックスに一致するすべてのファイルをインポートします。例：path_prefix: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_"]}," –> ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201501.csv.gz"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201502.csv.gz"]},", …, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201505.csv.gz"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["利用可能な",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["out"]},"モードの詳細については、下記の付録を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"フィールドの推測loadymlの生成","__idx":15},"children":["フィールドの推測（load.ymlの生成）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["connector:guess"]},"を使用します。このコマンドは、ターゲットファイルを自動的に読み取り、ファイル形式をインテリジェントに推測します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:guess seed.yml -o load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://load.yml.to"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["load.yml"]}]},"を開いて、ファイル形式、エンコーディング、カラム名、タイプなど、推測されたファイル形式定義を確認します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: karte\n  bucket: sample_bucket\n  path_prefix: path/to/sample_file\n  auth_method: json_key\n  json_keyfile:\n    content: |\n      {\n        \"private_key_id\": \"1234567890\",\n        \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nABCDEF\",\n        \"client_id\": \"...\",\n        \"client_email\": \"...\",\n        \"type\": \"service_account\"\n      }\n  decoders:\n  - {type: gzip}\n  parser:\n    charset: UTF-8\n    newline: CRLF\n    type: csv\n    delimiter: ','\n    quote: '\"'\n    escape: ''\n    skip_header_lines: 1\n    columns:\n    - name: id\n      type: long\n    - name: company\n      type: string\n    - name: customer\n      type: string\n    - name: created_at\n      type: timestamp\n      format: '%Y-%m-%d %H:%M:%S'\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["preview"]},"コマンドを使用して、システムがファイルをどのように解析するかをプレビューします。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:preview load.yml\n+-------+---------+----------+---------------------+\n| id    | company | customer | created_at          |\n+-------+---------+----------+---------------------+\n| 11200 | AA Inc. |    David | 2015-03-31 06:12:37 |\n| 20313 | BB Imc. |      Tom | 2015-04-01 01:00:07 |\n| 32132 | CC Inc. | Fernando | 2015-04-01 10:33:41 |\n| 40133 | DD Inc. |    Cesar | 2015-04-02 05:12:32 |\n| 93133 | EE Inc. |     Jake | 2015-04-02 14:11:13 |\n+-------+---------+----------+---------------------+\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["guessコマンドは、ソースデータから取得したサンプル行を使用してカラム定義を推測するため、ソースデータファイルに3行以上、2カラム以上が必要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["カラム名やカラムタイプが予期せず検出された場合は、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},"を直接修正して再度プレビューしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Connectorは、「boolean」、「long」、「double」、「string」、「timestamp」タイプの解析をサポートしています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["previewコマンドは、指定されたバケットから1つのファイルをダウンロードし、そのファイルの結果を表示します。これにより、previewコマンドとissueコマンドの結果に違いが生じる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ロードジョブの実行","__idx":16},"children":["ロードジョブの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最後に、ロードジョブを送信します。データのサイズに応じて、数時間かかる場合があります。ユーザーは、データが格納されるデータベースとテーブルを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間で分割されているため、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["--time-column"]},"オプションを指定することをお勧めします（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-partitioning-in-treasure-data"},"children":["data partitioning"]},"も参照）。このオプションを指定しない場合、Data Connectorは最初の",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["long"]},"または",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["timestamp"]},"カラムをパーティション分割時間として選択します。--time-columnで指定するカラムタイプは、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["long"]},"または",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["timestamp"]},"タイプである必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データに時間カラムがない場合は、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["add_time"]},"フィルターオプションを使用して追加してください。詳細については、add_timeフィルタープラグインを参照してください。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table \\\n  --time-column created_at\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記の例のコマンドは、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["database(td_sample_db)",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["と"]},"table(td_sample_table)",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["がすでに作成されていることを前提としています。データベースまたはテーブルがTreasure Dataに存在しない場合、このコマンドは成功しません。代わりに、データベースとテーブルを手動で作成するか、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td connector:issue"]},"コマンドで"]},"--auto-create-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":["Data Connectorは、サーバー側でレコードをソートしません。時間ベースのパーティショニングを効果的に使用するには、事前にファイル内のレコードをソートしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["time"]},"というフィールドがある場合は、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["--time-column"]},"オプションを指定する必要はありません。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"実行時間のスケジュール設定","__idx":17},"children":["実行時間のスケジュール設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["高可用性スケジューラを使用すると、増分KARTEファイルインポートのための定期的なData Connectorの実行をスケジュールできます。この機能を使用することで、ローカルデータセンターで",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]},"デーモンを使用する必要がなくなります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールされたインポートの場合、Data Connector for KARTEは、最初に指定されたプレフィックスに一致するすべてのファイル（例：path_prefix: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_"]}," –> ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201501.csv.gz"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201502.csv.gz"]},", …, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201505.csv.gz"]},"）をインポートし、次回の実行のために最後のパス（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201505.csv.gz"]},"）を記憶します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2回目以降の実行では、アルファベット順（辞書式順序）で最後のパスの後にあるファイルのみをインポートします。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/sample_201506.csv.gz"]},", …"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"スケジュールの作成","__idx":18},"children":["スケジュールの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td connector:create"]},"コマンドを使用して、新しいスケジュールを作成できます。以下が必要です："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["スケジュール名"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["cron形式のスケジュール"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データが保存されるデータベースとテーブル。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Data Connector設定ファイル。"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:create \\\n    daily_import \\\n    \"10 0 * * *\" \\\n    td_sample_db \\\n    td_sample_table \\\n    load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間で分割されているため、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["--time-column"]},"オプションを指定することをお勧めします(",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench"},"children":["アーキテクチャ"]},"も参照してください)。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:create \\\n    daily_import \\\n    \"10 0 * * *\" \\\n    td_sample_db \\\n    td_sample_table \\\n    load.yml \\\n    --time-column created_at\n"},"children":[]},{"$$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"]},"の3つの特別なオプションも受け付けます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトでは、スケジュールはUTCタイムゾーンで設定されます。-tまたは--timezoneオプションを使用してタイムゾーンでスケジュールを設定できます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--timezone"]},"オプションは、'Asia/Tokyo'、'America/Los_Angeles'などの拡張タイムゾーン形式のみをサポートしています。PST、CSTなどのタイムゾーン略語は",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["サポートされておらず"]},"、予期しないスケジュールにつながる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"スケジュールの一覧表示","__idx":19},"children":["スケジュールの一覧表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","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_import | 10 0 * * * | UTC      | 0     | td_sample_db | td_sample_table | {\"in\"=>{\"type\"=>\"karte\", ... |\n+--------------+------------+----------+-------+--------------+-----------------+----------------------------+\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"設定とスケジュール履歴の表示","__idx":20},"children":["設定とスケジュール履歴の表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td connector:show"]},"は、スケジュールエントリの実行設定を表示します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"% td connector:show daily_import\nName     : daily_import\nCron     : 10 0 * * *\nTimezone : UTC\nDelay    : 0\nDatabase : td_sample_db\nTable    : td_sample_table\nConfig\n---\nin:\n  type: karte\n  bucket: sample_bucket\n  path_prefix: path/to/sample_\n  auth_method: json_key\n  json_keyfile:\n    content: |\n      {\n        \"private_key_id\": \"1234567890\",\n        \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nABCDEF\",\n        \"client_email\": \"...\",\n        \"type\": \"service_account\"\n      }\n  decoders:\n  - type: gzip\n  parser:\n    charset: UTF-8\n    ...\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td connector:history"]},"は、スケジュールエントリの実行履歴を表示します。個々の実行の結果を調査するには、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td job jobid"]},"を使用します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"% td connector:history daily_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"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"スケジュールの削除","__idx":21},"children":["スケジュールの削除"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td connector:delete"]},"は、スケジュールを削除します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:delete daily_import\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"付録","__idx":22},"children":["付録"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ファイル名のルール","__idx":23},"children":["ファイル名のルール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["NFC は、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms"},"children":["この記事"]},"で説明されているように、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/storage/docs/gsutil/addlhelp/Filenameencodingandinteroperabilityproblems."},"children":["ファイル名のエンコードと相互運用性の問題"]},"を軽減するために、ファイル名に必要なユニコード正規化形式のタイプです。そうでない場合、path_match_patternまたはpath_prefixと比較するときに一致エラーが発生する可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"out-pluginのモード","__idx":24},"children":["Out Pluginのモード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["seed.ymlの",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["out"]},"セクションでファイルインポートモードを指定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"append-デフォルト","__idx":25},"children":["append (デフォルト)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これはデフォルトモードで、レコードがターゲットテーブルに追加されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  ...\nout:\n  mode: append\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"replace-td-01110以降","__idx":26},"children":["replace (td 0.11.10以降)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このモードは、ターゲットテーブルのデータを置き換えます。ターゲットテーブルに対して手動で行われたスキーマ変更は、このモードでもそのまま保持されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  ...\nout:\n  mode: replace\n"},"children":[]}]},"headings":[{"value":"KARTE Import Integration","id":"karte-import-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":1},{"value":"Treasure コンソールを使用した接続の作成","id":"treasure-コンソールを使用した接続の作成","depth":1},{"value":"新しい接続の作成","id":"新しい接続の作成","depth":2},{"value":"新しいKARTE Connectorの作成","id":"新しいkarte-connectorの作成","depth":2},{"value":"Treasure DataへのKARTEデータのインポート","id":"treasure-dataへのkarteデータのインポート","depth":2},{"value":"Fetch from","id":"fetch-from","depth":3},{"value":"Preview","id":"preview","depth":3},{"value":"Advanced Settings","id":"advanced-settings","depth":3},{"value":"Transfer to","id":"transfer-to","depth":3},{"value":"When","id":"when","depth":2},{"value":"Details","id":"details","depth":2},{"value":"My Input Transfers","id":"my-input-transfers","depth":2},{"value":"CLIを使用したコネクタの設定","id":"cliを使用したコネクタの設定","depth":1},{"value":"Seed Config File (seed.yml)の作成","id":"seed-config-file-seedymlの作成","depth":2},{"value":"フィールドの推測（load.ymlの生成）","id":"フィールドの推測loadymlの生成","depth":2},{"value":"ロードジョブの実行","id":"ロードジョブの実行","depth":2},{"value":"実行時間のスケジュール設定","id":"実行時間のスケジュール設定","depth":1},{"value":"スケジュールの作成","id":"スケジュールの作成","depth":2},{"value":"スケジュールの一覧表示","id":"スケジュールの一覧表示","depth":2},{"value":"設定とスケジュール履歴の表示","id":"設定とスケジュール履歴の表示","depth":3},{"value":"スケジュールの削除","id":"スケジュールの削除","depth":2},{"value":"付録","id":"付録","depth":1},{"value":"ファイル名のルール","id":"ファイル名のルール","depth":2},{"value":"Out Pluginのモード","id":"out-pluginのモード","depth":2},{"value":"append (デフォルト)","id":"append-デフォルト","depth":3},{"value":"replace (td 0.11.10以降)","id":"replace-td-01110以降","depth":3}],"frontmatter":{"seo":{"title":"KARTE Import Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/karte-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}