{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Mailpublisher Connector Via 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":"mailpublisher-connector-via-cli","__idx":0},"children":["Mailpublisher Connector Via CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要に応じて、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows/treasure-workflow-quick-start-using-td-toolbelt-in-a-cli"},"children":["Treasure CLI"]},"を使用してコネクタを使用できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ターミナルを開き、次のコマンドを実行して最新の",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"をインストールします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"設定ファイルの作成","__idx":1},"children":["設定ファイルの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定ファイルには、統合からコネクタに入力されるものを指定する in: セクションと、コネクタが Treasure Data のデータベースに出力するものを指定する out: セクションが含まれます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例に示すように、設定ファイル（例: config.yml）を準備します。統合アカウントのアクセス情報を提供してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"例-configyml","__idx":2},"children":["例 (config.yml)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mail_publisher_smart\n  site_id: mysite\n  login_id: foo\n  password: bar\n  data_type: list_status\n  file_ids: [1,2,3]\nfilters:\n- type: add_time\n  from_value:\n    mode: upload_time\n  to_column:\n    name: time\nout: type: td\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"認証","__idx":3},"children":["認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["site_id"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["login_id"]},"、および",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["password"]},"を指定します。認証情報は MailPublisher のコンソールから取得できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データタイプ","__idx":4},"children":["データタイプ"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"email-list-status","__idx":5},"children":["Email List Status"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_type"]},"に",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["list_status"]},"を設定し、ファイル ID のリストとして",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["file_ids"]},"を指定します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"article-status-and-click-count-status","__idx":6},"children":["Article Status and Click Count Status"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data_type"]},"に",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["article_status"]},"または",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["click_count_list"]},"を設定し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["start_date"]},"と",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["duration"]},"を指定します。増分読み込みを行いたい場合は",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["incremental"]},"を設定します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mail_publisher_smart\n  data_type: article_status\n  # data_type: click_count_list\n  start_date: 2018-10-01\n  duration: 1\n  incremental: true\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"オプション-プレビュー","__idx":7},"children":["(オプション) プレビュー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:preview コマンドを実行して、設定ファイルを検証します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:preview config.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データパーティションキー","__idx":8},"children":["データパーティションキー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクタセッションでは、データパーティションキーとして使用するために、結果データに少なくとも1つのタイムスタンプ列が必要であり、デフォルトでは最初のタイムスタンプ列がキーとして選択されます。MailPublisher コネクタの結果スキーマにはタイムスタンプ列がないため、次のようにフィルター設定を追加して「",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["time"]},"」列を追加します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: mail_publisher_smart\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":"Heading","attributes":{"level":2,"id":"新しいコネクタセッションの作成","__idx":9},"children":["新しいコネクタセッションの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:create を実行します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のコマンドを使用すると、MailPublisher コネクタを使用した日次インポートセッションが作成されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td connector:create daily_mail_publisher_import \\\n    \"10 0 * * *\" td_sample_db td_sample_table config.yml\n","lang":"bash"},"children":[]}]},"headings":[{"value":"Mailpublisher Connector Via CLI","id":"mailpublisher-connector-via-cli","depth":1},{"value":"設定ファイルの作成","id":"設定ファイルの作成","depth":2},{"value":"例 (config.yml)","id":"例-configyml","depth":3},{"value":"認証","id":"認証","depth":3},{"value":"データタイプ","id":"データタイプ","depth":3},{"value":"Email List Status","id":"email-list-status","depth":4},{"value":"Article Status and Click Count Status","id":"article-status-and-click-count-status","depth":4},{"value":"(オプション) プレビュー","id":"オプション-プレビュー","depth":2},{"value":"データパーティションキー","id":"データパーティションキー","depth":3},{"value":"新しいコネクタセッションの作成","id":"新しいコネクタセッションの作成","depth":2}],"frontmatter":{"seo":{"title":"Mailpublisher Connector Via CLI"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/mailpublisher-connector-via-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}