Connect CSV File From FTP / SFTP Server



Additionally, to connecting to a dynamic CSV file via link from your dropbox box or google drive, you also have the option to connect to a dynamic CSV file from a secure FTP or SFTP Server.


FTP or File Transfer Protocol and SFTP or Secure File Transfer Protocol are network protocols which allow you to securely transfer files between computers and servers on a network. With datapine you are able to connect to a CSV file saved to a FTP / SFTP server. Similar to connecting a CSV file via link, this feature enables you to update such files easily later on (see also Update CSV).


Please note: Changing your flat file on the server will be automatically detected and reflected in your charts after updating.





First, you need to create a link to the CSV file on your FTP / SFTP Server:


1. Please make sure that your CSV file meets our requirements. For example, the CSV file needs to be comma (,), semicolon (;) or tab separated and include a header row. Also make sure that your file doesn’t include any other information than the headers and the values below (such as descriptive lines of text in the first rows or totals at the bottom row). If so, remove these rows before saving the file to your FTP / SFTP server.


2. Upload your CSV file to your FTP / SFTP server.


3. To directly link this CSV to datapine you will need to generate a URL using the following information:


a) Username: The name of a user that can access the file on your server.


b) Password: The user password for authentication.


c) Hostname: This is your server address and might be an IP or URL.


d) Port: This is the port number used to access the FTP / SFTP server. In case you haven’t defined a port number for your server use the default port 21.


e) Filename: This is the name of your CSV file. If you have stored your file in a folder or subfolder add the full path to your filename.



Depending on the type of your file protocol, arrange your URL in the following structure:


a) FTP: ftp://user:password@hostname:port/filename.csv


b) SFTP: sftp://user:password@hostname:port/filename.csv



In case your file is stored in a folder or subfolder please include the file path like this:


a) FTP: ftp://user:password@hostname:port/folder/subfolder/filename.csv


b) SFTP: sftp://user:password@hostname:port/folder/subfolder/filename.csv





1. Click on Connect in the menu bar.


2. If you already have a datasource connected, please click + Add Data Source at the top left in the datapine interface. If not, proceed directly with Step 3.


how to add a new data source to datapine


3. Select the option File from FTP Server.


where to connect files from ftp server in datapine


4. Now enter the link to your CSV file on the FTP Server.


5. Click Upload File.


Please note: The SFTP / FTP file name is case-sensitive, therefore if the case doesn’t match the upload will fail and you will receive the error message “Error during sftp server connection“.



where and how to input the link to your csv file on your ftp server in datapine


6. Follow step 6 from Upload a CSV from your computer to adjust the file format if needed, for example the data type of a column or column names, or how fields in your file are separated. Additionally, you need to choose the interval in which your file will be automatically updated. On default your file will be updated automatically every 24 hours.



Afterwards just click Import File and you’re done.