Mule - Remote SFTP Archiving

I am processing a large csv file in Mule from an SFTP server.

I need to read it from the input directory, move it to the tmp directory, and when finished move it to the archive directory.

The first two I can perform easily. But what is the best way to move it to the archive folder at the end?

The archiveDir parameter on the sftp transport only archives a copy on the local server running mule, but not on the remote sftp server.

+5
source share
1 answer

Use something like this in the mule stream when connecting to the sftp server.

<flow name="receive_files">
....// sftp connection configuration
....
    <wire-tap>
                    <file:outbound-endpoint path="${global.workdir}/dir1/dir2/archive/inbound/#[function:datestamp-yyyy-MM-dd_HH-mm-ss.SSS]" />
                </wire-tap>
...
..
</flow>

Check out: https://docs.mulesoft.com/connectors/sftp/sftp-copy-move

0
source

Source: https://habr.com/ru/post/1526377/


All Articles