span8
span4
span8
span4
Note: As of FME Server 2016, there is an SFTP Subscriber available.
After running a translation, you may want to upload your output to a secure server. SFTP (Secure File Transfer Protocol) is a protocol which can be used to transfer files securely to and from a remote computer. Popular uses of SFTP include:
At this time, a built-in method has not been developed to perform this type of file transfer within FME . However, we can use a very simple python shutdown script and the WinSCP SFTP client to complete this process.
The example workspace "generate_and_upload_using_WinSCP.fmw" contains a simple workflow. It writes a text file to a user-specified directory and then the entire directory is uploaded to an SFTP server using WinSCP. To accomplish this, FME runs a shutdown Python script which invokes the WinSCP application and provides it with the information needed to complete the transfer.
#Command list - NOTE: Edit below to add correct WinSCP directory as well as the FTP username, password and host. eg: admin:admin@ftp.example.com command = ["<strong>C:\\Program Files (x86)\\WinSCP\\winscp.com</strong>", "/command", "option confirm off", "open <strong>MYUSER:MYPASS@MYHOST</strong>", "put " + fmeoutdir, "close", "exit"]
Once the script has been edited, test the output and determine if it was uploaded to the SFTP server. The process should complete successfully with the output folder uploaded securely to your server.
You can now incorporate this workflow into your own personal projects.
@bruceharold Thanks for the note Bruce. I've updated the article so that other are aware of the new functionality.
Example Workflow using FME, Python and Oracle
Setting up a workspace to deploy in production, staging and local
Using a Python Startup/Shutdown Script or PythonCaller to Perform Geoprocessing with Arcpy
Create Spatial Index after loading to ArcSDE - using Load only mode
How to access and use FME Store Solutions
Run an FME Workspace from Python using FMEWorkspaceRunner
Startup and Shutdown TCL Script Examples
© 2019 Safe Software Inc | Legal