How-to

How to load files from an FTP or SFTP server

For data that arrives as files on a server rather than through an API — connect once, browse the directories, and load what you need.

What you will do

You will create an FTP or SFTP connection, navigate the directory tree, preview a file to confirm it is the one you want, and load it as a dataset.

The connection is saved, so returning next month for a newer file does not mean re-entering credentials.

When this is useful

  • A partner or vendor drops extracts onto a file server on a schedule.
  • An older internal system exports files rather than exposing an API.
  • You need one file out of a directory containing hundreds.
  • Regular batch files are the interface you have been given, and you want them beside everything else.

Before you start

  • Server details — Host, and the credentials the server expects.
  • Network access — The server must be reachable from where DataLens runs.
  • A rough idea of the path — You can browse to find files, but knowing the directory saves clicking through a deep tree.

Steps

  1. Open Data → Connections → FTP / SFTP

    Select Data, then Connections, then the FTP / SFTP tab.

    The FTP / SFTP Connector form.

  2. Enter the server details and name the connection

    Fill in the host and the credentials the server requires, and give the connection a name in Connection Name.

    A host is required before you can browse — the Browse Files action stays disabled until one is entered.

  3. Browse the directories

    Select Browse Files. DataLens lists the contents of the current path.

    Select a folder name to descend into it. Use Up to go back a level, and the refresh control to re-list a directory whose contents may have changed.

    A file listing showing the current path, with folders you can open and files you can select.

  4. Preview the file you want

    Select Preview on a file to see its columns and a sample of rows before importing anything.

    This matters most when a directory holds several similarly named files and only one is the current extract.

    A preview of columns and sample rows for that file.

  5. Load it as a dataset

    Select the file and load it. It becomes a dataset under Data → Datasets, exactly like an uploaded file.

    The new dataset with its row and column counts.

  6. Save the connection

    Select Save Connection so the server is listed under My Connections and next month's file is a few clicks rather than a fresh setup.

What happens next

The loaded file behaves like any other dataset — clean it in Prepare, profile it in Govern, model it, chart it or publish it.

Where files arrive regularly and you need the changes rather than the whole file each time, look at CDC Sync for database sources.

Example

A finance team receives a daily positions file on an SFTP server. Rather than downloading and re-uploading it by hand, they save an SFTP connection once, then each morning browse to the day's file, preview it to confirm the date, and load it.

Tips

  • Preview before loading. In a directory of near-identical filenames it is the only reliable way to confirm you have the right one.
  • Name the connection after the partner or system, not the hostname.
  • If Browse Files does nothing, check the host field is filled in — the action is disabled without one.

Limitations

  • Loading a file is a point-in-time action. The connector does not watch the directory and load new files automatically.
  • Files must be in a format DataLens can read as rows. Archives and binary formats are not extracted.
  • The server must be reachable from where DataLens runs.

Related questions

More of these on the DataLens FAQ page.

Can DataLens pick up files from an SFTP server automatically?

You save the connection once and can return to it, but loading a file is an action you take. The connector does not watch a directory and ingest new files on its own.

Try this in DataLens

DataLens is in private beta. Request access and work through this guide on your own data.

Request beta access