{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Gigya Import Integration CLI","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":"gigya-import-integration-cli","__idx":0},"children":["Gigya Import Integration CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLIを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"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":["Treasure Data Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ファイルの準備","__idx":2},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["load.yml"]},"ファイルの準備"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["load.ymlを準備します。in:セクションでは、GigyaからコネクタへのデータINPUTを指定し、out:セクションでは、コネクタからTreasure Dataのデータベースへのデータ出力を指定します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のようにGigyaアカウントのアクセス情報を提供します:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: gigya\n  data_center: US1\n  authentication_mode: key_secret\n  application_key: your_application_user_key\n  secret_key: your_application_secret_key\n  api_key: your_api_key\n  data_source: account\n  query: SELECT * FROM accounts\n  fields_to_exclude: \"XffFirstIp, httpReq\"\n  batch_size: 1000\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"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":["設定キー"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["タイプ"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["必須"]}]},{"$$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":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コネクタタイプ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_center"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["データセンターの場所を指定します (利用可能な値は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["US1, EU1, AU1, RU1, CN1"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["authentication_mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["認証方法、現在は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["key_secret"]}," のみサポート"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["application_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アプリケーションのユーザーキー"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["secret_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アプリケーションのシークレットキー"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["api_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["APIキー"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_source"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ターゲットデータソース (利用可能な値は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["account"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["profile"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_store"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["audit"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["カスタムGigyaクエリ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fields_to_exclude"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GigyaのAPI仕様上、SELECT文で取り込む列を指定することができません。このパラメータは不要な列を削除するために使用できます。"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["batch_size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1回のバッチでの最大レコード数"]}]}]}]}]},{"$$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"},"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を使用してジョブを実行します。データサイズによっては、処理に数時間かかる場合があります。以下が必要です:"]},{"$$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":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column created_at\ndaily_xxxx_import\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["上記のコマンドは、*database(td_sample_db)",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["と"]},"table(td_sample_table)*が既に作成されていることを前提としています。データベースまたはテーブルがTDに存在しない場合、このコマンドは成功しません。データベースとテーブルは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-management"},"children":["手動で"]},"作成するか、td connector:issueコマンドで--auto-create-tableオプションを使用してデータベースとテーブルを自動作成する必要があります:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","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","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataのストレージは時間でパーティション分割されているため、--time-columnオプションを指定することをお勧めします。このオプションが指定されていない場合、データコネクタは最初のlong型またはtimestamp型の列をパーティション分割時間として選択します。--time-columnで指定する列の型は、long型またはtimestamp型のいずれかである必要があります。利用可能な列名と型を確認するには、Preview resultsを使用してください。一般的に、ほとんどのデータ型にはlast_modified_date列があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力の最後に時間列が利用可能です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml --database td_sample_db --table td_sample_table\n--time-column created_at\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データに時間列がない場合は、add_timeフィルターを使用して追加できます。設定ファイルにadd_timeフィルターを追加することで、\"",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["time"]},"\"列を追加できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: xxxxx\n  ...\nfilters:\n- type: add_time\n  from_value:\n    mode: upload_time\n  to_column:\n    name: time\nout:\n  type: td\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/add_time-filter-function"},"children":["add_timeフィルタープラグイン"]},"を参照してください。"]},{"$$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":"Heading","attributes":{"level":2,"id":"スケジュール実行","__idx":5},"children":["スケジュール実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["定期的なGigyaインポートのために、定期的なデータコネクタ実行をスケジュールできます。高可用性を確保するため、スケジューラーを慎重に設定しています。この機能を使用することで、ローカルデータセンターにcronデーモンを配置する必要がなくなります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュールされたインポートでは、Gigya用データコネクタは指定されたターゲットに一致するすべてのオブジェクトをインポートします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["スケジュール実行では、各オブジェクトに関連付けられたネイティブのタイムスタンプまたは数値フィールドのいずれかに基づいて、Gigyaからデータを取得する際のデータコネクタの動作を制御する追加の設定パラメータがサポートされています。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["incremental この設定は、ロードモードを制御するために使用され、各オブジェクトに関連付けられたネイティブのタイムスタンプまたは数値フィールドのいずれかに基づいて、データコネクタがGigyaからデータを取得する方法を管理します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["incremental_columnn この設定は、Treasure Dataにインポートする基準列を定義するために使用されます。このフィールドには1つの列のみを定義できます。推奨値は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["created、createdTimestamp、updated、updatedTimestamp"]},"です"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下は、incrementalモードを使用したロードファイルの例です"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n\n  type: gigya\n\n  data_center: US1\n\n  authentication_mode: key_secret\n\n  application_key: your_application_user_key\n\n  secret_key: your_application_secret_key\n\n  api_key: your_api_key\n\n  data_source: account\n\n  batch_size: 1000\n\n  query: SELECT * FROM accounts\n\n  incremental: true\n\n  incremental_column: created\n\nfilters:\n\n- type: add_time\n\n  from_value:\n\n    mode: upload_time\n\n  to_column:\n\n    name: time\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["スケジュールの作成"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:create コマンドを使用して新しいスケジュールを作成できます。スケジュールの名前、cron形式のスケジュール、データが保存されるデータベースとテーブル、およびデータコネクタ設定ファイルが必要です。"]},{"$$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":"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":"p","attributes":{},"children":["td connector:create コマンドを使用して、毎日実行するインポート用のスケジュールジョブを作成できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"td connector:create connector_name @daily connector_database connector_table load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"プラグインのモード","__idx":6},"children":["プラグインのモード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["load.yml ファイルの out セクションでインポートモードを指定できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["out: セクションは、データが Treasure Data テーブルにどのようにインポートされるかを制御します。"," ","たとえば、Treasure Data の既存のテーブルにデータを追加するか、データを置き換えるかを選択できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["出力モードは、データが Treasure Data に配置されるときにデータを変更する方法です。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]},"（デフォルト）: レコードはターゲットテーブルに追加されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace"]},"（td 0.11.10 以降で利用可能）: ターゲットテーブルのデータを置き換えます。ターゲットテーブルに加えられた手動のスキーマ変更はそのまま残ります。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n\n  ...\n\nout:\n\n  mode: append\nin:\n\n  ...\n\nout:\n\n  mode: replace\n","lang":"yaml"},"children":[]}]},"headings":[{"value":"Gigya Import Integration CLI","id":"gigya-import-integration-cli","depth":1},{"value":"Treasure Data Toolbeltのインストール","id":"treasure-data-toolbeltのインストール","depth":2},{"value":"ファイルの準備","id":"ファイルの準備","depth":2},{"value":"インポートするデータのプレビュー","id":"インポートするデータのプレビュー","depth":2},{"value":"Load Jobの実行","id":"load-jobの実行","depth":2},{"value":"スケジュール実行","id":"スケジュール実行","depth":2},{"value":"プラグインのモード","id":"プラグインのモード","depth":1}],"frontmatter":{"seo":{"title":"Gigya Import Integration CLI"}},"lastModified":"2025-11-12T07:49:46.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/gigya-import-integration-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}