{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Dotdigital Export 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":"dotdigital-export-integration-cli","__idx":0},"children":["Dotdigital Export Integration CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can write job results export directly from Treasure Data to Dotdigital Marketing Solution service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic Knowledge of Treasure Data."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Dotdigital Unified Contacts"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-your-connection-from-the-command-line","__idx":2},"children":["Creating Your Connection from the Command Line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the CLI to configure your connection."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"td query --database your_database --result configuration query\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table identifies the configuration keys with descriptions."]},{"$$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":"Config Key"},"children":["Config Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$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":["Export type: dotdigital"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["region"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Available regions:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Europe: r1"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["North America: r2"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Asia Pacific: r3"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Site: https://{region}-api.dotdigital.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["username"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API user"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["password"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API password"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Mode. Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["transactional_email"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["bulk_contacts"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["unified_contacts"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_export_operation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["upload (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["delete"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_merge_option"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["overwrite (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["overwriteIfEmpty"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["overwriteIfNotEmpty"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_add_to_list"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["false (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["true"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_list_identifier_mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["id (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["name"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_list_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List id where contacts will be assigned to. Required when unified_cts_list_identifier_mode = id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_list_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List name where contacts will be assigned to. Required when unified_cts_list_identifier_mode = name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_create_when_not_found"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["false (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["true"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unified_cts_new_list_visibility"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["private (default)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["public"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ignore_invalid_records"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true, this will skip invalid records and continue uploading valid ones. If set to false (default), this will terminate the job when an invalid record is encountered."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example Query that Exports Unified Contacts: do not add contacts to list"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--query 'SELECT match_identifier, contact_id, email, mobile_number, channel_properties, consent_records, firstname, lastname FROM your_table' \\\n--type presto \\\n--result '{\n  \"type\":\"dotdigital\",\n  \"region\":\"r1\",\n  \"username\":\"{api user}\",\n  \"password\":\"{api password}\",\n  \"mode\":\"unified_contacts\",\n  \"unified_cts_export_operation\":\"upload\",\n  \"unified_cts_merge_option\":\"overwrite\",\n  \"unified_cts_add_to_list\":false,\n  \"ignore_invalid_records\":true\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example Query that Exports Unified Contacts: add contacts to list"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--query 'SELECT match_identifier, contact_id, email, mobile_number, channel_properties, consent_records, firstname, lastname FROM your_table' \\\n--type presto \\\n--result '{\n  \"type\":\"dotdigital\",\n  \"region\":\"r1\",\n  \"username\":\"{api user}\",\n  \"password\":\"{api password}\",\n  \"mode\":\"unified_contacts\",\n  \"unified_cts_export_operation\":\"upload\",\n  \"unified_cts_merge_option\":\"overwrite\",\n  \"unified_cts_add_to_list\":true,\n  \"unified_cts_list_identifier_mode\":\"id\",\n  \"unified_cts_list_id\":\"{list id}\",\n  \"ignore_invalid_records\":true\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example Query that Delete Unified Contacts"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query -d database -w \\\n--query 'SELECT match_identifier, contact_id, email, mobile_number FROM your_table' \\\n--type presto \\\n--result '{\n  \"type\":\"dotdigital\",\n  \"region\":\"r1\",\n  \"username\":\"{api user}\",\n  \"password\":\"{api password}\",\n  \"mode\":\"unified_contacts\",\n  \"unified_cts_export_operation\":\"delete\",\n  \"ignore_invalid_records\":true\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":3},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/scheduling-a-data-connector-job-execution-from-the-cli"},"children":["Scheduling Data Connector Job Execution from the CLI"]}]}]}]},"headings":[{"value":"Dotdigital Export Integration CLI","id":"dotdigital-export-integration-cli","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Creating Your Connection from the Command Line","id":"creating-your-connection-from-the-command-line","depth":2},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"title":"Dotdigital Export Integration CLI"}},"lastModified":"2025-11-07T03:08:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/dotdigital-export-integration-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}