How to connect to FTP with Tableau Prep
It is common to use FTP as a file transfer mechanism between businesses. Tableau Prep cant connect to FTP out of the box, but we can make it work with a free utility called FTPUSE.
Install the utility and add a FTP folder as local drive by entering the below command in an elevated command prompt.
FTPUSE DRIVE_LETTER: yourserver.domain.com/path password /USER:username
Now the FTP folder appears as a network drive in our PC. Please note that the drive will be disconnected on reboot. (We will remedy this in our flow schedule BAT file.)
This mapping works like a normal network drive in PREP. Since the mapping is not permanent, it is safer to remap the drive before running the flow . Here is the complete BAT file I used for running the flow.
set prep="C:\Program Files\Tableau\Tableau Prep Builder 2019.1\scripts\tableau-prep-cli.bat"
if exist X:\ (
echo Disconnecting existing mapping....
ftpuse X: /delete
echo Mapping FTP folder to network drive....
ftpuse X: yourserver/path password /USER:username
call %prep% -t %flow%
Here is a screen grab of the flow run.