> ## Documentation Index
> Fetch the complete documentation index at: https://www.domo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SFTP Writeback Connector

## Intro

Use this connector to export your data from a Domo DataSet to an SFTP server. To learn more about SFTP, visit the [SSH File Transfer Protocol Wikipedia page](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol).

You export data to an SFTP server in the Data Center. This topic discusses the fields and menus specific to the SFTP Writeback connector user interface. General information for adding DataSets, setting update schedules, and editing DataSet information is discussed in [Adding a DataSet Using a Data Connector](/docs/s/article/360042926274).

<Note>**Note:** The owner of a writeback DataSet must also be an owner or co-owner of the input DataSet.</Note>

***

## Prerequisites

To configure this connector, you need the following:

* Your Domo Client ID and Client Secret. Learn how to get your [Domo Client ID and Secret](/docs/s/article/000005240#create-api-clients).

* Your SFTP server hostname.

  <Warning>**Important:** The SFTP server hostname must have `sftp://` at the beginning of the URL and must not end with a forward slash (`/`).</Warning>

* Your SFTP server port number.

* Your SFTP server username and password.

* Your SFTP server SSH private key.

* The passphrase for your SSH private key.

<Note>**Note:** Domo does not support SSH keys generated using `ssh-keygen`. The SSH keys must be DES or RSA keys (in PEM format) generated by OpenSSL.</Note>

You can convert an OpenSSH private key to the old PEM format using the `ssh-keygen` utility:

```
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa
```

This updates the same file with the RSA key.

## Configure the Connection

This section lists the options in the **Credentials** and **Details** panes on the SFTP Writeback Connector page. The components of the other panes on this page, **Scheduling** and **Name & Describe Your DataSet**, are universal across most connector types and are discussed in greater length in [Adding a DataSet Using a Data Connector](/docs/s/article/360042926274).

### Credentials Pane

This pane contains fields for entering credentials to connect to your Domo developer account as well as your SFTP server. Depending on the configuration of the SFTP server, you may need a Private Key and Passphrase, username and password, or both. The following table describes what is needed for each field:

| Field              | Description                                                                                                                                                           |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Domo Client ID     | Enter your Domo Client ID.                                                                                                                                            |
| Domo Client Secret | Enter your Domo Client Secret.                                                                                                                                        |
| Hostname           | Enter your SFTP server hostname. **Important:** The SFTP server hostname must have `sftp://` at the beginning of the URL and must not end with a forward slash (`/`). |
| Port               | Enter your SFTP server port number.                                                                                                                                   |
| Username           | Enter your SFTP server username.                                                                                                                                      |
| Password           | Enter your SFTP server password.                                                                                                                                      |
| SSH Private Key    | Enter your SFTP server SSH private key (RSA).                                                                                                                         |
| Passphrase         | Enter the passphrase for your SSH private key.                                                                                                                        |

After you enter valid credentials, you can use the same account any time you set up a new Domo-SFTP connection. You can manage connector accounts in the **Accounts** tab in the Data Center. For more information about this tab, see [Managing User Accounts for Connectors](/docs/s/article/360042926054).

### Details Pane

This pane contains a number of fields for specifying your data and indicating where it's going.

| Menu                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Input DataSet ID                     | Enter the DataSet ID (GUID) for the DataSet you want to copy to the SFTP server. You can find the ID by opening the details view for the DataSet in the Data Center and looking at the portion of the URL following `datasources/`. For example, in the URL `https://mycompany.domo.com/datasources/845305d8-da3d-4107-a9d6-13ef3f86d4a4/details/overview`, the DataSet ID is `845305d8-da3d-4107-a9d6-13ef3f86d4a4`. **Note:** You must either own this DataSet or have the Admin role in Domo.                                                                                                                                                                                                                                                                                                                              |
| Path                                 | Enter the path in your SFTP server where you want the data to be saved.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Select the Filename                  | Select the output filename. If you choose **Use Input Dataset Name** and your DataSet name contains the macro `<current_date>`, the connector replaces `<current_date>` with today's date in the format selected from the **Date Format** dropdown.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Filename                             | Enter the output filename for your data. To add the current date to the filename, use the `<current_date>` macro. For example, if the filename is `domo_<current_date>`, the output file generated in SFTP is `domo_` followed by today's date in the format selected from the **Date Format** dropdown. If the Date Format is set to `MMddyyyy_HHmmss`, the output file generated is `domo_05162021_161244`. You can also fetch data from any number of days back from the current date. For example, to fetch yesterday's data, enter the filename as `domo_<current_date-1>`. Other examples: `domo_<current_date-2>` fetches data from two days ago; `domo_<current_date-3>` fetches data from three days ago. **Note:** Your output file is stored as a CSV file. You do not need to add the extension to your filename. |
| Date Format                          | Select the date format for the macro replacement in the filename. This option is only applicable when the **Filename** or **Input Dataset Name** contains `<current_date>`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Include Advanced Functions           | Select this checkbox to include the Advanced Functions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| File Extension                       | This field appears when you select the **Include Advanced Functions** checkbox. Select the extension you want to use for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Enter File Extension                 | This field appears when you select the **Include Advanced Functions** checkbox and set **File Extension** to **User Defined Extension**. Enter the file extension.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Delimiter                            | This field appears when you select the **Include Advanced Functions** checkbox. Select the character to be used as a delimiter for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Enter Delimiter                      | This field appears when you select the **Include Advanced Functions** checkbox and set **Delimiter** to **Other**. Enter the character to be used as a delimiter for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Quote Character                      | This field appears when you select the **Include Advanced Functions** checkbox. Select the character to be used for enclosing values in your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Choose the Escape Character          | This field appears when you select the **Include Advanced Functions** checkbox. Select the escape character for the input DataSet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Enter Quote Character                | This field appears when you select the **Include Advanced Functions** checkbox and set **Quote Character** to **Other**. Enter the character to be used as a quote character for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Line Feed Delimiter                  | This field appears when you select the **Include Advanced Functions** checkbox. Select the character to be used as a line feed delimiter in your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Enter Line Feed Delimiter            | This field appears when you select the **Include Advanced Functions** checkbox and set **Line Feed Delimiter** to **Other**. Enter the character to be used as a line feed delimiter for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| File Encoding                        | This field appears when you select the **Include Advanced Functions** checkbox. Select the encoding scheme for your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Skip Headers                         | Select this checkbox to skip the header of your output file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| My Domo Input DataSet is very large. | Select this checkbox to export a very large DataSet from Domo to SFTP. When this checkbox is selected, the connector uses a different and faster process. The export process does not support Advanced Functions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

### Other Panes

For information about the remaining sections of the connector interface, including how to configure scheduling, retry, and update options, see [Adding a DataSet Using a Data Connector](/docs/s/article/360042926274).
