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

# Import Data from Files on an SFTP Server

> Import CSV, Excel, and Parquet files from an SFTP server into Exploratory without writing R script. Covers SSH private key connections, host key verification, merging multiple files, and scheduled updates.

If your team exchanges files through an SFTP server, you can import data directly from the server. You don't need to download the files to your computer first, and you don't need to write R script.

This page shows how to import three monthly sales order CSV files (4,000 rows each) from an SFTP server and merge them into one data frame.

## What the SFTP data source is

The SFTP data source imports files from an SFTP server. It has the following features.

* You can import CSV (delimited text), Excel, and Parquet files.
* You can authenticate with an SSH private key or a password.
* Host keys verify that you are connecting to the right server.
* You can import one file, or merge multiple files while importing.
* You can update published data on a schedule. See "Update on a schedule" below.

## What to prepare

Ask your SFTP server administrator for the following information. This page uses these example values.

| Item | Example in this page |
| - | - |
| Host | `sftp.example.com` |
| Port | `22` |
| Username | `sftp-user` |
| Authentication | Private Key |
| Private key file | A private key file in OpenSSH format |
| Root folder | The folder where you start browsing files. If you leave it empty, you start in the user's home directory. |

Use a private key file in OpenSSH format. You cannot use a PuTTY format (`.ppk`) file.

## 1. Create a connection

You create a connection the first time you import a file. After that, you can select the saved connection.

1. Click the + ❶ next to "Data Frames" on the left.

2. Select "File" ❷ from the menu.

   ![Click + next to Data Frames, then select File from the menu](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-01.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=75be3af5929e63b4547576fefb675c38)

   The "File Data Source" dialog opens.

3. Click the "SFTP" tab ❶ at the top.

4. Select "Text (CSV, Delimited)" ❷.

   ![Click the SFTP tab, then select Text (CSV, Delimited)](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-02.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=eecf487dcd27ff432712027f705f3095)

   The "SFTP" tab shows three types: Excel, Text (CSV, Delimited), and Parquet.

5. The next dialog depends on whether you already have an SFTP connection. If you have none, the "Add Connection - SFTP" dialog opens automatically. Go to step 7.

6. If you already have a connection, the "SFTP - Select CSV Files" dialog opens. Click "Add Connection" ❶ at the top of the dialog.

   ![Click Add Connection at the top of the SFTP - Select CSV Files dialog](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-03.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=7345405453db3e6813268e013dbfafd7)

   The "Add Connection - SFTP" dialog opens.

7. Enter a clear name in "Connection Name" ❶. This page uses `Sales Data SFTP`.

   ![Enter Sales Data SFTP in Connection Name](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-04.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=cc027cd0713831821b915c80d4f69be3)

8. Enter `sftp.example.com` in "Host" ❶.

   ![Enter sftp.example.com in Host](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-05.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=71d0ccb486abaa9368e727886f46bfbb)

9. Enter `22` in "Port" ❶.

   ![Enter 22 in Port](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-06.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=c08d86f9556a6db1fb02e0755a79b15a)

10. Enter `sftp-user` in "Username" ❶.

    ![Enter sftp-user in Username](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-07.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=787532efdb3873b5f80e5439e4946b29)

11. Check that "Authentication" is set to the default, "Private Key".

12. To connect with a password, select "Password" ❶ in "Authentication". A "Password" field appears in place of "Private Key File" and "Passphrase".

    ![Select Password in Authentication to show the Password field](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-08.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=8e2f0cfeb18ead303796db83d96afbf4)

    This page uses a private key, so switch back to "Private Key" and continue.

13. Click "Select File..." ❶ under "Private Key File" and select your private key file. The path of the selected file appears to the right of the button.

    ![Select a file under Private Key File](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-09.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=10813d71f86b7140d3a2582fc36c26ab)

    If the private key has a passphrase, enter it in "Passphrase".

14. Enter the path of the folder that holds your files in "Root Folder" ❶. In this example, it is `/Users/Shared/sftp-demo-en`. If you leave "Root Folder" empty, Exploratory uses the home directory.

    ![Enter a path in Root Folder](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-10.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=05a2c1e0fd544c9c662f563e91de3ac0)

    Below it, the "Host Keys" section shows "No host key is set." In the next section, you get the host key.

## 2. Check and save the host key

A host key verifies that you are connecting to the right server. Before you save the connection, get the server's host key and check its fingerprint.

1. Click "Get Host Key" ❶ in "Host Keys".

   ![Click Get Host Key, then check the key type and fingerprint](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-11.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=85dff28c3afa2abb9150f6f63062d401)

   After Exploratory gets the key, it shows "Key Type" and "Fingerprint (SHA256)" ❷.

2. Compare the fingerprint with the one your server administrator gave you. If they match, continue. If they don't match, don't save the connection. Ask your administrator.

3. Click "Add" ❶ at the bottom of the dialog to save the connection.

   ![Click Add to save the connection](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-12.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=5ebe58de203e64947b3341c38dea6007)

   If you haven't fetched the host key, Exploratory shows "Get the host key first." and doesn't save the connection. The host key is saved as part of the connection.

4. If you just created your first connection, the dialog for selecting files opens next. If you created the connection from "Add Connection", the "Data Connections" list appears. Click the × ❶ at the top right to close it.

   ![Close the Data Connections list with the × at the top right](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-13.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=8727498a10d2ad86fb3c5b9904808b2d)

## 3. Select files and import

In this section, you merge the three CSV files in the `orders` folder and import them.

1. Select the connection you created, "Sales Data SFTP", from the "Connection" drop-down ❶. The contents of the root folder appear in the list.

   ![Select Sales Data SFTP from the Connection drop-down](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-14.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=cbd99df635761744e6c3aa88ba28c314)

2. Click the `orders` ❶ folder to open it.

   ![Open the orders folder](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-15.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=a3d5e81f44a25fe56ce8e74a8fafcf71)

   The three files in the `orders` folder appear.

   ![The three CSV files in the orders folder appear in the list](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-16.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=8305eeac1bedafe3705dfb89b80e87a3)

3. If you have many files, type part of a file name in the "Search" ❶ box at the top right and press Enter to narrow the list. This page uses `2026_02`.

   ![Type 2026\_02 in the Search box at the top right](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-17.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=adab2c70d4eeae1ad1e9f878cdd96c20)

   The list shows only `orders_2026_02.csv`, which contains `2026_02`.

   ![The search shows only orders\_2026\_02.csv](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-18.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=26414e20625facf7ca98e54ac478b9fb)

4. Click the × ❶ in the search box to clear the search.

   ![Click the × in the search box to clear the search](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-19.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=66ce77629477fd2dfb1183360b5f3319)

5. Select the check box ❶ in the list header to select all three files.

   ![Select the check box in the header to select all three files](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-20.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=401bb2fffbe93b63cacaf96b29aae9f7)

6. Click "Import & Merge" ❶.

   ![Click Import & Merge](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-21.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=6fd95fb38e91bd644520122bd07d3bb5)

   The "Import & Merge Text File Data" dialog opens and shows the names of the three files you selected.

   ![The Import & Merge Text File Data dialog shows the three selected file names](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-22.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=7cee22102845eebad48df4dd9b8a4663)

   To import only one file, select its check box and click "Import".

7. Check the file contents and columns in the preview. The first column, "id", holds the name of the file each row came from. Settings such as character encoding and delimiter work the same way as when you import a local CSV file.

   ![Check the file contents and columns in the preview](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-23.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=06aaff4ec53dae8b8712189c69654203)

8. Click "Import" ❶.

   ![Click Import](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-24.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=0402c7e2fb574e9d1839836f97a529fa)

   The "Create Data Frame" dialog opens.

9. Enter `orders_2026_q1` in "Name" ❶.

10. Click "Create" ❷.

    ![Enter a name for the data frame, then click Create](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-25.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=fa55b72908a6b5e80f430c0928c29bea)

    Exploratory creates the data frame.

11. Check that "12,000 Rows 11 Columns" ❶ appears at the top of the data frame. The 4,000 rows from each of the three files are now in one data frame.

    ![The imported data frame shows 12,000 Rows 11 Columns](https://mintcdn.com/exploratory-inc/EtgUJE6vLOFfHv1z/en/import/images/sftp-26.png?fit=max\&auto=format\&n=EtgUJE6vLOFfHv1z\&q=85\&s=5bc4ece17dc9a668421ea8018bd26421)

    You can use the file names in the "id" column to summarize or filter the data by file.

## Update on a schedule

The SFTP data source can update published data on a schedule. For how to set up a schedule, see [Manage Schedules](https://docs.exploratory.io/en/schedule/manage.md).

* For a connection that uses a private key, Exploratory encrypts the contents of the private key file and sends it with the data when you publish.
* If Exploratory cannot read the private key file, it marks the data as not updatable.

### If the SFTP server restricts source IP addresses

Scheduled updates connect to your SFTP server from Exploratory's servers. If your SFTP server restricts source IP addresses, ask the SFTP server administrator.

## Limits and notes

* You cannot use a private key in PuTTY format (`.ppk`). In PuTTYgen, use "Export OpenSSH key" in the "Conversions" menu to convert it to OpenSSH format, then select the converted file.
* If the curl package of your installed R doesn't support SFTP, the import stops with the error "EXP-DATASRC-36". Reinstall the R packages from "R Packages" in the menu that opens when you click the user area at the bottom left of the start screen.
* If the server's host key changes, it no longer matches the saved host key, and the import fails with the error "EXP-DATASRC-39". If you changed the server's key on purpose, open the connection settings and click "Get Host Key" to get it again. If you didn't expect the change, ask the server administrator.
* If authentication fails, you get the error "EXP-DATASRC-38". Check the username, the password, or the private key file and passphrase.
* If Exploratory cannot connect to the server, you get the error "EXP-DATASRC-41". Check the host name and port, and check that the SFTP server allows connections from your IP address.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.