{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Sailthru Export Integration From The Command Line","description":"Treasure AIのCLIを使用してSailthruにデータをエクスポートする方法を解説する技術ドキュメントページです。接続設定と必要な手順を詳しく説明します。","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":"sailthru-export-integration-from-the-command-line","__idx":0},"children":["Sailthru Export Integration From The Command Line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLIを介して(TD Toolbelt)、Treasure DataからSailthruにクエリ結果データをエクスポートします。"]},{"$$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":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/td-toolbelt"},"children":["TD Toolbelt"]},"がインストールされていること。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sailthruの基本知識とアカウント。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コマンドラインを使用した接続の作成","__idx":2},"children":["コマンドラインを使用した接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLIを使用して接続を設定できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database your_database --result configuration query\n","lang":"bash"},"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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["sailthru"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"list\"または\"user\"のいずれか。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sailthruから提供されたAPIキー。確立された認証を使用した結果エクスポート(ConsoleのクエリResult Exportまたはワークフローを使用)とは異なり、CLIのパラメータでAPIキーを明示的に指定する必要があります。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sailthruから提供されたAPIシークレット。APIキーと同様に、APIシークレットも指定する必要があります。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]},": \"list\"の場合)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["送信先のリスト名。リストが存在しない場合は新しいリストが作成され、既存のリストが更新されます。Sailthruで",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://my.sailthru.com/lists"},"children":["リスト名を確認"]},"できます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PrimaryまたはSecondaryのいずれかを選択します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Primary"]},"リストは、定期的かつ周期的に送信するメインの購読者リストです。リストの成長を追跡したい場合は、プライマリとしてマークする必要があります。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Secondary"]},"リストは、成長レポートが不要なリストです。成長は追跡されないため、プライマリリストのレポートには表示されません。オプションが選択されている場合、既存のリストはこのタイプに更新されます。どちらも選択されていない場合、リストタイプは以前のままです。プライマリリストとセカンダリリストの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://getstarted.sailthru.com/audience/managing-lists/primary-and-secondary-lists/"},"children":["違いについては、Sailthruを参照"]},"してください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_public_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$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":["user_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user"]},"の場合)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},"列の対応するタイプを選択します – email、SMS、sid、extid。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_ignore_error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$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":["user_keys_columns"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$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":["user_keys_conflict_resolution"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"error\"は、競合が発生した場合(変更されたキーがSailthruデータベースに既に存在する別のキーと一致する場合)にジョブを終了します。\"merge\"は、現在の",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},"を持つユーザーと競合するユーザーの解決を試みます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_vars_column"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$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":["user_list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーが所属するリストを更新します。値は次の構文に準拠する必要があります: `\"List Name\": 0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_optout_templates"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_list"]},"設定と同様ですが、これはオプトアウトテンプレートからユーザーを追加/削除するためのものです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user"]},"の場合)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},"列の対応するタイプを選択します --email、SMS、sid、extid。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user_keys_columns"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_keys_columns"]},"と同様ですが、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target: bulk_user"]},"の場合。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user_vars_column"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_vars_columns"]},"と同様ですが、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target: bulk_user"]},"の場合。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user_lists"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_lists"]},"と同様ですが、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target: bulk_user"]},"の場合。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bulk_user_ignore_error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_ignore_error"]},"と同様ですが、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target: bulk_user"]},"の場合。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"例--メールをリストに出力","__idx":3},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["例"]},": メールをリストに出力"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--result '{\n           \"type\": \"sailthru\",\n           \"api_key\": \"xxx\"\n           \"api_secret\": \"yyy\"\n           \"target\": \"list\",\n           \"list_name\": \"My List\"\n         }' \\\n'SELECT email from your_table'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"例--ユーザーの出力","__idx":4},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["例"]},": ユーザーの出力"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--result '{\n    \"type\": \"sailthru\",\n    \"api_key\": \"xxx\",\n    \"api_secret\": \"yyy\",\n    \"target\": \"user\",\n    \"user_key\": \"email\",\n    \"user_keys_columns\": \"sms, extid\",\n    \"user_vars_columns\": \"name, address\",\n    \"user_lists\": \"\\\"My List\\\": 1, \\\"Other List\\\": 0\",\n    \"user_key_conflict_resolution\": \"merge\",\n    \"user_optout_templates\": \"\\\"My Template\\\": 1\",\n    \"user_ignore_error\": true\n  }' \\\n'SELECT email as id, sms, extid, name, address from your_table'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"例--ユーザーの一括出力","__idx":5},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["例"]},": ユーザーの一括出力"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--result '{\n    \"type\": \"sailthru\",\n    \"api_key\": \"xxx\",\n    \"api_secret\": \"yyy\",\n    \"target\": \"user\",\n    \"bulk_user_key\": \"email\",\n    \"bulk_user_keys_columns\": \"sms, extid\",\n    \"bulk_user_vars_columns\": \"name, address\",\n    \"bulk_user_lists\": \"\\\"My List\\\": 1, \\\"Other List\\\": 0\",\n    \"bulk_user_ignore_error\": true\n  }' \\\n'SELECT email as id, sms, extid, name, address from your_table'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"スケジュール実行","__idx":6},"children":["スケジュール実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細については、以下を参照してください。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/scheduling-a-data-connector-job-execution-from-the-cli"},"children":["CLIからのデータコネクタジョブ実行のスケジュール"]}]}]}]},"headings":[{"value":"Sailthru Export Integration From The Command Line","id":"sailthru-export-integration-from-the-command-line","depth":1},{"value":"前提条件","id":"前提条件","depth":1},{"value":"コマンドラインを使用した接続の作成","id":"コマンドラインを使用した接続の作成","depth":2},{"value":"例 : メールをリストに出力","id":"例--メールをリストに出力","depth":2},{"value":"例 : ユーザーの出力","id":"例--ユーザーの出力","depth":2},{"value":"例 : ユーザーの一括出力","id":"例--ユーザーの一括出力","depth":2},{"value":"スケジュール実行","id":"スケジュール実行","depth":2}],"frontmatter":{"seo":{"title":"Sailthru Export Integration From The Command Line","description":"Treasure AIのCLIを使用してSailthruにデータをエクスポートする方法を解説する技術ドキュメントページです。接続設定と必要な手順を詳しく説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/sailthru-export-integration-from-the-command-line","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}