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.)

FTP Folder As Network Drive

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.

@echo off
set prep="C:\Program Files\Tableau\Tableau Prep Builder 2019.1\scripts\tableau-prep-cli.bat"
set flow="C:\Automation\FTP_TEST.tfl"
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%
PAUSE

Here is a screen grab of the flow run.

Connecting to files in FTP

 

Leave a Reply

Your email address will not be published. Required fields are marked *