{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"FTP Server Export Integration","description":"Learn how to export job results to an FTP server using Treasure AI, with support for FTPS and FTPES protocols and step-by-step configuration guidance.","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/"}}]},"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":"ftp-server-export-integration","__idx":0},"children":["FTP Server Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/ftp-server-import-integration"},"children":["Learn more about FTP Server Import Integration"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This article explains how to send job results directly to your FTP server, with FTPS (explicit) or FTPES (implicit)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For sample workflows on how to export job results to your FTP server, view ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/tree/master/td/ftp"},"children":["Treasure Boxes"]},"."]},{"$$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, including the TD ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["toolbelt"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An FTP server"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191107-002705.3225b9cf7ce826079ba7e49654f973f710a0effb89859cfc933396812fbe8b22.9dee5338.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"static-ip-address-of-treasure-data-integration","__idx":2},"children":["Static IP Address of Treasure Data Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please find the complete list of static IP addresses, organized by region, at the following ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/ip-addresses-integrations-result-workers"},"children":["document"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-your-credential-for-your-ftps-server","__idx":3},"children":["Get your Credential for your FTP(S) Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Obtain your credential to access your FTP(S) server."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"write-the-query","__idx":4},"children":["Write the Query"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to the Treasure Console query editor page and compile your query."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"specify-the-result-export-target","__idx":5},"children":["Specify the Result Export target"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the same window, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add"]}," in the Result Export section and select FTP from the drop-down menu. Edit all the information, including your Host, Port, Username, Password."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you want to connect to FTP Server with FTPS(explicit) or FTPES(implicit), select Use SSL? and select proper options."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191107-003156.e7d49fa7c7a931d98a241e1cf232d330b9f8a6c7ba2699ebadffa2148e9de8d9.9dee5338.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"with-pgp-encryption-configuration","__idx":6},"children":["With PGP Encryption Configuration"]},{"$$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":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["format"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The output format of file being uploaded file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - csv - tsv"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["csv"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NO"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["encoders"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specifies the encoder's type of the output"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - \"\" - gz - bzip2 - encrypt_pgp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NO"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["public_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The public key to use for encryption"]},{"$$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":["key_identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specifies the Key ID of the encryption subkey used to secure the file. The master key is excluded from the encryption process. (string, required)"]},{"$$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":["amor"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use ASCII armor for the encrypted output (boolean)"]},{"$$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":["compression_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The compression type determines whether to compress the data before encrypting it."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values  - gzip -->  For example, file extension will be .csv.gz.gpg - bzip2 --> For example, file extension will be .csv.bz2.gpg - none --> For example, file extension will be .csv.gpg - zip_builtin --> For example, file extension will be .csv.zip.gpg - zlip_builtin --> For example, file extension will be .csv.z.gpg - bzip2_builtin --> For example, file extension will be .csv.bz2.gpg  ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note: Please ensure that you compress your file before encrypting and uploading. When you decrypt it, the file will return to a compressed format such as .gz or .bz2."]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"optional-schedule-query-export-jobs","__idx":7},"children":["(Optional) Schedule Query Export Jobs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data's scheduler feature supports periodic query execution to achieve high availability."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, if the cron schedule is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * 1'"]},", then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"scheduling-your-job-using-treasure-console","__idx":8},"children":["Scheduling your Job Using Treasure Console"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new query or select an existing query."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},", select None."," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-28-51.f1b242f6ecc7666a0097fdf37edd1682786ec11ef80eff68c66f091bc405c371.0f87d8d4.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the drop-down, select one of the following schedule options:"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-29-47.45289a1c99256f125f4d887e501e204ed61f02223fde0927af5f425a89ace0c0.0f87d8d4.png","alt":""},"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":"Drop-down Value"},"children":["Drop-down Value"]},{"$$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":["Custom cron..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#custom-cron-details"},"children":["Custom cron... details"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@daily (midnight)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight (00:00 am) in the specified time zone."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@hourly (:00)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run every hour at 00 minutes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No schedule."]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"custom-cron-details","__idx":9},"children":["Custom cron... Details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-30-23.0f94a8aa5f75ea03e3fec0c25b0640cd59ee48d1804a83701e5f2372deae466c.0f87d8d4.png","alt":""},"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":"Cron Value"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cron Value"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 * * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once an hour."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 1 * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a month at midnight on the morning of the first day of the month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a job that has no scheduled run time."]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":" *    *    *    *    *\n -    -    -    -    -\n |    |    |    |    |\n |    |    |    |    +----- day of week (0 - 6) (Sunday=0)\n |    |    |    +---------- month (1 - 12)\n |    |    +--------------- day of month (1 - 31)\n |    +-------------------- hour (0 - 23)\n +------------------------- min (0 - 59)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following named entries can be used:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Day of Week: sun, mon, tue, wed, thu, fri, sat."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A single space is required between each field. The values for each field can be composed of:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"fixed-table"},"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":{"width":"35%","data-label":"Field Value"},"children":["Field Value "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Example"},"children":["Example "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"45%","data-label":"Example Description"},"children":["Example Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A single value, within the limits displayed above for each field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A wildcard ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," to indicate no restriction based on the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A range ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2-5'"]},", indicating the range of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1-10 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first 10 days of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A list of comma-separated values ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,3,4,5'"]},", indicating the list of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1,11,21 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A periodicity indicator ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*/5'"]}," to express how often based on the field's valid range of values a schedule is allowed to run."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'30 */2 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 */5 * *'"]}," configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A comma-separated list of any of the above except the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," wildcard is also supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,*/5,8-10'"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 5,*/10,25 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"execute-the-query","__idx":10},"children":["Execute the Query"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to the specified destination."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"activate-a-segment-in-audience-studio","__idx":11},"children":["Activate a Segment in Audience Studio"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also send segment data to the target platform by creating an activation in the Audience Studio."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience Studio"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select a parent segment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the target segment, right-mouse click, and then select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Activation."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," panel, enter an Activation name and configure the activation according to the previous section on Configuration Parameters."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Customize the activation output in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output Mapping"]}," panel."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ouput.b2c7f1d909c4f98ed10f5300df858a4b19f71a3b0834df952f5fb24018a5ea78.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attribute Columns",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export All Columns"]}," to export all columns without making any changes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," to add specific columns for the export. The Output Column Name pre-populates with the same Source column name. You can update the Output Column Name. Continue to select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]},"to add new columns for your activation output."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String Builder",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add string"]}," to create strings for export. Select from the following values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String: Choose any value; use text to create a custom value."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timestamp: The date and time of the export."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Id: The segment ID number."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Name: The segment name."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audience Id: The parent segment number."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/snippet-output-connector-on-audience-studio-2024-08-28.a99525173709da1eb537f839019fa7876ffae95045154c8f2941b030022f792c.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the values to define your schedule and optionally include email notifications."]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":7},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you need to create an activation for a batch journey, review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/journey-orchestration/batch/creating-a-batch-journey-activation"},"children":["Creating a Batch Journey Activation"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage-from-cli","__idx":12},"children":["Usage from CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also use CLI for Result Export to FTP(S)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example,"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-for-ftp","__idx":13},"children":["CLI for FTP"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --result '{\"type\":\"ftp\",\"host\":\"xx.xx.xx.xx\",\"port\":21,\"username\":\"xxxx\",\"password\":\"xxxxx\",\"path_prefix\":\"/path/to/file\",\"file_ext\":\".csv\",\"sequence_format\":\"\",\"header_line\":true,\"quote_policy\":\"MINIMAL\",\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\"}' -d sample_datasets \"select * from www_access\" -T presto\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-for-ftps-implicit-mode","__idx":14},"children":["CLI for FTPS (Implicit mode)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --result '{\"type\":\"ftp\",\"host\":\"xx.xx.xx.xx\",\"port\":990,\"username\":\"xxxx\",\"password\":\"xxxxx\",\"passive_mode\":true,\"ascii_mode\":true,\"ssl\":true,\"ssl_explicit\":false,\"ssl_verify\":false,\"ssl_verify_hostname\":false,\"path_prefix\":\"/path/to/file\",\"file_ext\":\".csv\",\"sequence_format\":\"\",\"header_line\":true,\"quote_policy\":\"MINIMAL\",\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\"}' -d sample_datasets \"select * from www_access\" -T presto\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-for-ftpes-explicit-mode","__idx":15},"children":["CLI for FTPES (Explicit mode)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --result '{\"type\":\"ftp\",\"host\":\"xx.xx.xx.xx\",\"port\":21,\"username\":\"xxxx\",\"password\":\"xxxxx\",\"passive_mode\":true,\"ascii_mode\":true,\"ssl\":true,\"ssl_explicit\":true,\"ssl_verify\":false,\"ssl_verify_hostname\":false,\"path_prefix\":\"/path/to/file\",\"file_ext\":\".csv\",\"sequence_format\":\"\",\"header_line\":true,\"quote_policy\":\"MINIMAL\",\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\"}' -d sample_datasets \"select * from www_access\" -T presto\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"legacy-modedeprecated","__idx":16},"children":["Legacy mode(Deprecated)"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We kept this feature for backward compatibility and will stop providing it in the near future."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"for-on-demand-jobs","__idx":17},"children":["For On-Demand Jobs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For on-demand jobs, just add the --result option to the td query command. After the job is finished, the results are sent to the specified FTP server."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query \\\n  --result 'ftp://user:password@domain.com/path.csv' \\\n  -w -d testdb \\\n  \"SELECT code, COUNT(1) AS cnt FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a port number is not specified, the default value is 21."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The request body is in CSV format (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://www.ietf.org/rfc/rfc4180.txt"},"children":["RFC 4180"]},") where the first line is a header with the column names, the new line is CRLF, the text encoding is UTF-8, and the quotation character is double-quoted."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"_c0,_c1\na,b\nc,\" d \"\ne,f\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-scheduled-jobs","__idx":18},"children":["For Scheduled Jobs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For scheduled jobs, just add the --result option when scheduling a job. After every job run, the results are sent in the same manner as on-demand jobs."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td result:create myftp ftp://user:password@domain.com/\n\ntd sched:create hourly_count_example \"0 * * * *\" \\\n-d testdb \\\n--result myftp:path.csv \\\n\"SELECT code, COUNT(1) AS cnt FROM www_access GROUP BY code\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"references","__idx":19},"children":["References"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Embulk-encoder-Encryption document: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/embulk-encoder-encryption-pgp"},"children":["Embulk Encoder Encryption PGP"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"faq-for-the-ftp-data-connector","__idx":20},"children":["FAQ for the FTP Data Connector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: Please ensure that you compress your file before encrypting and uploading."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1.  When you decrypt using non-built-in encrypti on, the file will return to a compressed format such as .gz or .bz2."]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When you decrypt using built-in encrypti on, the file will return to raw data."]}]}]},"headings":[{"value":"FTP Server Export Integration","id":"ftp-server-export-integration","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Static IP Address of Treasure Data Integration","id":"static-ip-address-of-treasure-data-integration","depth":2},{"value":"Get your Credential for your FTP(S) Server","id":"get-your-credential-for-your-ftps-server","depth":2},{"value":"Write the Query","id":"write-the-query","depth":2},{"value":"Specify the Result Export target","id":"specify-the-result-export-target","depth":3},{"value":"With PGP Encryption Configuration","id":"with-pgp-encryption-configuration","depth":3},{"value":"(Optional) Schedule Query Export Jobs","id":"optional-schedule-query-export-jobs","depth":3},{"value":"Scheduling your Job Using Treasure Console","id":"scheduling-your-job-using-treasure-console","depth":4},{"value":"Custom cron... Details","id":"custom-cron-details","depth":4},{"value":"Execute the Query","id":"execute-the-query","depth":3},{"value":"Activate a Segment in Audience Studio","id":"activate-a-segment-in-audience-studio","depth":2},{"value":"Usage from CLI","id":"usage-from-cli","depth":2},{"value":"CLI for FTP","id":"cli-for-ftp","depth":3},{"value":"CLI for FTPS (Implicit mode)","id":"cli-for-ftps-implicit-mode","depth":3},{"value":"CLI for FTPES (Explicit mode)","id":"cli-for-ftpes-explicit-mode","depth":3},{"value":"Legacy mode(Deprecated)","id":"legacy-modedeprecated","depth":3},{"value":"For On-Demand Jobs","id":"for-on-demand-jobs","depth":4},{"value":"For Scheduled Jobs","id":"for-scheduled-jobs","depth":3},{"value":"References","id":"references","depth":2},{"value":"FAQ for the FTP Data Connector","id":"faq-for-the-ftp-data-connector","depth":2}],"frontmatter":{"seo":{"title":"FTP Server Export Integration","description":"Learn how to export job results to an FTP server using Treasure AI, with support for FTPS and FTPES protocols and step-by-step configuration guidance."}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/ftp-server-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}