Load CSV, TSV, JSON, Parquet and Excel files into the Lake from an upload, an SFTP or FTP server, or an S3 bucket. Use a file datasource when your data arrives as files and new files must load on a schedule.
On Source, answer Where do the files come from? with one of three options:
| Option | Use it when |
|---|---|
| Upload files | The files are on this computer. You drop them into the form. |
| SFTP / FTP | A file server holds the files. Each run copies new and changed files. |
| S3 bucket | An Amazon S3 or S3-compatible store holds the files. Each run copies new and changed objects. |
The choice is fixed after creation: The source is fixed once the data source is created. While uploads are still in the form, remove them first to switch: Remove the uploaded files to switch to SFTP / FTP or an S3 bucket.
Amazon S3 is also a datasource type of its own, with its own form. This page covers the S3 bucket option. For the other one, see Connect Amazon S3.
A few mechanics and limits:
| Setting | What it does | Default |
|---|---|---|
| Protocol | SFTP (SSH), FTPS (FTP over TLS) or FTP (unencrypted). Changing it moves the port to that protocol's default, unless you typed another port. | SFTP (SSH) |
| Port | The server port. | 22 for SFTP, 21 for FTPS and FTP |
| Authentication | Password or Private key. Private key works with SFTP only. FTP and FTPS use a password. | Password |
| Remote folder | The folder to read, absolute or relative to the login folder. | Empty: the login folder |
| Subfolders | Include subfolders or This folder only. | Include subfolders |
| Stability wait (seconds) | Skips files modified more recently than this until the next run, so half-written files are not copied. Maximum 3600. | 60 |
| Mirror deletes | Deletes the stored copy when the file is removed from the server. Off keeps every copy. Needs Leave files on the server. | Off |
| After a file is copied | Leave files on the server, Move files to another folder or Delete files from the server. | Leave files on the server |
| Move to folder | Shown for Move files to another folder. Must be outside the remote folder. | Empty |
Click Test connection before you save. For SFTP, check the server fingerprint, then click Trust this host; saving needs a trusted key, and Next stays blocked with Trust the server host key before continuing. For FTPS with a self-signed or private certificate, check the fingerprint with your server administrator, then click Pin this certificate; until it is pinned, Next stays blocked with The server certificate is not issued by a trusted authority. Pin it before continuing. A certificate from a public authority works without pinning. If you change the server or its sign-in details after a test, the form asks for a new test: The server changed - run the connection test again.
Plain FTP sends the password and every file unencrypted. Use SFTP or FTPS unless the server is on a trusted private network.
s3:/ / or a folder. Folder (prefix) limits the files to one prefix. Empty reads the whole bucket.On Format, check the preview and set the options for the file type you load. CSV and TSV dialects, JSON shapes, encodings, Excel workbook options and the preview are described on File formats and preview.
Suggested groups lists groups that match your files; click Add all to add them all. An imported table keeps its Table name and its group cannot be removed. Full grouping detail is on Group files into tables.
Every table loaded from a file source carries six extra columns: _file, _path, _file_size, _file_arrived_at, _file_date and _rescued_data. They behave like ordinary table columns and stay hidden from the preview sample.
_file and _path identify the stored file a row came from; _file_size and _file_arrived_at carry its size and arrival time._file_date holds the date extracted from the file name or path. Turn the extraction on for a group to fill it; see Group files into tables._file_date can be the Date Column of an incremental load, and it is listed first for files. A date column inside the files makes every run read every file, and the form warns you. See Choose a sync type._rescued_data holds the raw text of a value that did not fit its column when Bad values is Rescue.The Summary lists the source, format and tables, and flags files that match no table or more than one. Under Stored files, turn on Delete stored files after a number of days to set Keep files for (days), which defaults to 90. With the switch off, files are kept until you delete them. The switch is hidden for S3 buckets, and disabled for servers that leave files in place: a removed copy would be fetched again on the next sync.
After saving, open the source and go to its Source step. The Files section lists every stored file, with search, statuses, download and delete; it is described on Stored files.
The full permission rules are on Who can do what in the Lake.
For the messages you may see while you set up a file datasource, read Lake troubleshooting.
No. The source is fixed once the data source is created. While uploads are still in the form, remove them first to switch to SFTP, FTP or an S3 bucket. To load from another place, create a new datasource.
Files are stored under the code, so the General step locks them while uploads sit in the form. Remove the uploaded files on the Source step to change them, or save the datasource first.
Set Stability wait (seconds) on the Source step. A file modified more recently than this is skipped until the next run. The default is 60 seconds and the maximum is 3600.
Loads keep using the current file until the new copy is ready, then later loads and downloads return the new content. The stored path and its date are kept. While the replacement is prepared, its row shows beside the original and neither row can be deleted.
It copies new and changed files from the server or bucket right away, instead of waiting for the next scheduled run. It works for SFTP, FTP and S3 sources. If a fetch is already running, a new one is refused because the files are already being fetched.
Treat it as a possible attack. If nobody re-installed or replaced the server, check with your server owner before you continue. A changed key shows The server host key changed. Review it and trust the new key before continuing. A changed certificate shows The server certificate changed. Review it and pin the new certificate before continuing.
Every table carries _file, _path, _file_size, _file_arrived_at, _file_date and _rescued_data. They record where each row came from, hold the date extracted from the file name or path, and keep the raw text of values that did not fit. They stay hidden from the preview sample.
Yes. Turn on Extract a date from each file (_file_date) for the group, then choose _file_date as the Date Column in the table's incremental settings. A date column inside the files, rather than in the name, makes every run read every file, so use _file_date for file-level loads. See Choose a sync type.
A file can be up to 50 GB. An Excel workbook can be up to 1 GB. Large files upload in 16 MB parts and resume after network errors.
An upload session belongs to the person who started it, and only that person can use its files. Start your own upload, or ask that person to finish or save the datasource.