Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Learn more about SFTP Server Export Integration.

The Data Connector for SFTP enables you to import files stored on your SFTP server to Arm Treasure Data.

For sample workflows of importing files from your STFP server, view Treasure Boxes.


  • Basic knowledge of Treasure Data.

  • Requires that your private key has an OpenSSH 7.8 format.

  • Requires that the OpenSSH format private key was generated using the '-m PEM' option.

  • The default format of the private key after OpenSSH.
  • Before using this connector, determine valid protocols for your environment.
    If you intend to SFTP, you can use this Data Connector integration for SFTP.
    If FTP/FTPS, try connect with FTP Data ConnectorImport Integration.
    • If you are using a firewall, check your accepted IP range/port. Server administrators sometimes change the default port number from TCP/22 for security reasons.

  • Requires that your private key has an OpenSSH 7.8 format.

  • Requires that the OpenSSH format private key was generated using the '-m PEM' option.

    • “PuTTY” and other formats are not supported

  • .The default format of the private key after OpenSSH
    • .

  • After installation and configuration, review the job log. Warning and errors provide information about the success of your import. For example, you can identify the source file names associated with import errors.


SFDC input supports these authentication types:





  • Support only the STORED and DEFLATE compression methods.
  • Multi-part gzip file may not work

Use the TD Console to Create your Connection


  1. Open TD Console.

  2. Navigate to Integrations Hub > Catalog.

  3. Search and select SFTP.

    Image RemovedImage Added

  4. Select Create 

  5. The following dialog opens.

    Image Modified


  6. Enter the required credentials for your remote SFTP instance. Set the following parameters.

    • Host: The host information of the remote SFTP instance, for example an IP address.

    • Port: The connection port on the remote FTP SFTP instance, the default is 22.

    • User: The user name used to connect to the remote FTP instance.

    • Authentication mode: The way you choose to authenticate with your SFTP server. Credential and OAuth are supported.

    • Secret key file: Required if 'public / private key pair' is selected from `Authentication Mode`. (The key type ed25519 is not supported but the ecdsa key type is supported.)

    • Passphrase for secret key file: (Optional) If required, provide a passphrase for the provided secret file.

    • Retry limit: Number of times to retry a failed connection (default 10).

    • Timeout: Connection timeout in seconds (default 600).

  7. Select Continue. Type a name for your connection.

    Image Modified

  8. If you would like to share this connection with other users in your organization, check the Share with others checkbox. If this box is unchecked this connection is visible only to you.

  9. Select Done.


To get the data from your SFTP server into Treasure Data, you can set up an ad hoc one-time transfer or a recurring transfer at a regular interval. After creating the authenticated connection, you are automatically taken to Authentications.

  1. Search for the connection you created. 

  2. Select New Source.

    Image Removed



  1. Type a name for your Source in the Data Transfer field.

    Image Modified


  2. Click Next

Source Table

  1. The Source dialog opens.

    Image Modified


  2. Edit the following parameters 



User directory root

Path prefix

Prefix of target files (string, required)

Path match pattern

Type a regular expression to query file paths. If a file path doesn’t match with the specified pattern, the file is skipped. For example, if you specify the pattern  .csv$ # , then a file is skipped if its path doesn’t match the pattern.


 Enables incremental loading (boolean, optional. default: true. If incremental loading is enabled, the config diff for the next execution will include last_path parameter so that the next execution skips files before the path. Otherwise, last_path is not included.

Start after path

Only paths lexicographically greater than this will be imported.

Data Settings

  1. Select Next.
    The Data Settings page opens.

  2. Optionally, edit the data settings or skip this page of the dialog.

    Image Modified



Excerpt Include
PD:Applying Import Integration Filters
PD:Applying Import Integration Filters


You can see a preview of your data before running the import by selecting Generate Preview.

Data shown in the data preview is approximated from your source. It is not the actual data that is imported.


Select Next.
Data preview is optional and you can safely skip to the next page of the dialog if you want.


To preview your data, select Generate Preview. Optionally, select Next. 


Verify that the data looks approximately like you expect it to.




Excerpt Include
Data Preview
Data Preview

Data Placement

Excerpt Include
Data Placement
Data Placement