有没有办法只追加文件的更改数据而不是使用 Apache Camel 覆盖文件?

问题描述 投票:0回答:1

我是 Apache Camel 新手,我尝试在 sftp 和本地之间进行 csv 文件同步:

public class MyRouteBuilder extends RouteBuilder {


    public void configure() {

        from("sftp://user@address/location?password=password")
        .to("file:location_dir");     
    }

}

问题是当我在源中的 csv 文件上插入新行时,它将覆盖目标中的文件,而不是附加新行

有没有办法可以仅附加文件的增量,而不是使用 Apache Camel 覆盖文件?

apache-camel
1个回答
0
投票

试试这个:

.to("file:location_dir?fileExist=Append")
© www.soinside.com 2019 - 2024. All rights reserved.