[英]Mule - SFTP remote archiving
I am processing a large csv file in Mule from an SFTP server. 我正在从SFTP服务器处理Mule中的大型csv文件。
I need to read it in from an input directory, move it to a tmp directory and when finished move it to an archive directory. 我需要从输入目录中读取它,将其移动到tmp目录,完成后将其移动到存档目录。
The first two i can accomplish easily. 前两个我可以轻松完成。 But what is the best way to move it to the archive folder when finished?
但完成后将其移动到存档文件夹的最佳方法是什么?
The archiveDir option on the sftp transport only archives a copy on the local server where mule is running but not on the remote sftp server. sftp传输上的archiveDir选项仅在运行mule但不在远程sftp服务器上的本地服务器上归档副本。
Use something like this in the mule flow while connecting to sftp server. 连接到sftp服务器时,在mule流中使用类似的东西。
<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 查看: https : //docs.mulesoft.com/connectors/sftp/sftp-copy-move
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.